Ticket #9020: TFMXPatch1.diff
File TFMXPatch1.diff, 93.1 KB (added by , 15 years ago) |
---|
-
dists/msvc9/scummvm-tfmx.sln
1 2 Microsoft Visual Studio Solution File, Format Version 10.00 3 # Visual Studio 2008 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scummvm", "scummvm-tfmx.vcproj", "{8434CB15-D08F-427D-9E6D-581AE5B28440}" 5 EndProject 6 Global 7 GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 Debug|Win32 = Debug|Win32 9 Release|Win32 = Release|Win32 10 EndGlobalSection 11 GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 {8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug|Win32.ActiveCfg = Debug|Win32 13 {8434CB15-D08F-427D-9E6D-581AE5B28440}.Debug|Win32.Build.0 = Debug|Win32 14 {8434CB15-D08F-427D-9E6D-581AE5B28440}.Release|Win32.ActiveCfg = Release|Win32 15 {8434CB15-D08F-427D-9E6D-581AE5B28440}.Release|Win32.Build.0 = Release|Win32 16 EndGlobalSection 17 GlobalSection(SolutionProperties) = preSolution 18 HideSolutionNode = FALSE 19 EndGlobalSection 20 EndGlobal -
dists/msvc9/scummvm-tfmx.vcproj
1 <?xml version="1.0" encoding="windows-1252"?> 2 <VisualStudioProject 3 ProjectType="Visual C++" 4 Version="9,00" 5 Name="scummvm" 6 ProjectGUID="{8434CB15-D08F-427D-9E6D-581AE5B28440}" 7 RootNamespace="scummvm" 8 Keyword="Win32Proj" 9 TargetFrameworkVersion="131072" 10 > 11 <Platforms> 12 <Platform 13 Name="Win32" 14 /> 15 </Platforms> 16 <ToolFiles> 17 </ToolFiles> 18 <Configurations> 19 <Configuration 20 Name="Debug|Win32" 21 OutputDirectory="$(SolutionDir)$(SolutionName)-$(ConfigurationName)" 22 IntermediateDirectory="$(SolutionDir)$(SolutionName)-$(ConfigurationName)" 23 ConfigurationType="1" 24 CharacterSet="2" 25 > 26 <Tool 27 Name="VCPreBuildEventTool" 28 /> 29 <Tool 30 Name="VCCustomBuildTool" 31 /> 32 <Tool 33 Name="VCXMLDataGeneratorTool" 34 /> 35 <Tool 36 Name="VCWebServiceProxyGeneratorTool" 37 /> 38 <Tool 39 Name="VCMIDLTool" 40 /> 41 <Tool 42 Name="VCCLCompilerTool" 43 Optimization="0" 44 InlineFunctionExpansion="0" 45 AdditionalIncludeDirectories="../../;../../engines" 46 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 47 MinimalRebuild="true" 48 ExceptionHandling="1" 49 BasicRuntimeChecks="3" 50 RuntimeLibrary="1" 51 BufferSecurityCheck="true" 52 EnableFunctionLevelLinking="true" 53 DisableLanguageExtensions="false" 54 ForceConformanceInForLoopScope="true" 55 RuntimeTypeInfo="true" 56 UsePrecompiledHeader="0" 57 WarningLevel="4" 58 SuppressStartupBanner="false" 59 Detect64BitPortabilityProblems="false" 60 DebugInformationFormat="4" 61 DisableSpecificWarnings="4512" 62 /> 63 <Tool 64 Name="VCManagedResourceCompilerTool" 65 /> 66 <Tool 67 Name="VCResourceCompilerTool" 68 /> 69 <Tool 70 Name="VCPreLinkEventTool" 71 /> 72 <Tool 73 Name="VCLinkerTool" 74 AdditionalDependencies="winmm.lib sdl.lib" 75 OutputFile="$(OutDir)\$(ProjectName)-tfmx.exe" 76 LinkIncremental="2" 77 IgnoreDefaultLibraryNames="libc.lib;libcmt.lib;msvcrt.lib" 78 GenerateDebugInformation="true" 79 ProgramDatabaseFile="$(OutDir)/scummvm.pdb" 80 SubSystem="1" 81 EntryPointSymbol="WinMainCRTStartup" 82 RandomizedBaseAddress="1" 83 DataExecutionPrevention="0" 84 TargetMachine="1" 85 /> 86 <Tool 87 Name="VCALinkTool" 88 /> 89 <Tool 90 Name="VCManifestTool" 91 /> 92 <Tool 93 Name="VCXDCMakeTool" 94 /> 95 <Tool 96 Name="VCBscMakeTool" 97 /> 98 <Tool 99 Name="VCFxCopTool" 100 /> 101 <Tool 102 Name="VCAppVerifierTool" 103 /> 104 <Tool 105 Name="VCPostBuildEventTool" 106 /> 107 </Configuration> 108 <Configuration 109 Name="Release|Win32" 110 OutputDirectory="$(SolutionDir)$(SolutionName)-$(ConfigurationName)" 111 IntermediateDirectory="$(SolutionDir)$(SolutionName)-$(ConfigurationName)" 112 ConfigurationType="1" 113 CharacterSet="2" 114 WholeProgramOptimization="1" 115 > 116 <Tool 117 Name="VCPreBuildEventTool" 118 /> 119 <Tool 120 Name="VCCustomBuildTool" 121 /> 122 <Tool 123 Name="VCXMLDataGeneratorTool" 124 /> 125 <Tool 126 Name="VCWebServiceProxyGeneratorTool" 127 /> 128 <Tool 129 Name="VCMIDLTool" 130 /> 131 <Tool 132 Name="VCCLCompilerTool" 133 AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" 134 Optimization="2" 135 EnableIntrinsicFunctions="true" 136 OmitFramePointers="true" 137 AdditionalIncludeDirectories="../../;../../engines" 138 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 139 StringPooling="true" 140 MinimalRebuild="false" 141 ExceptionHandling="1" 142 RuntimeLibrary="0" 143 BufferSecurityCheck="false" 144 EnableFunctionLevelLinking="false" 145 DisableLanguageExtensions="false" 146 ForceConformanceInForLoopScope="true" 147 RuntimeTypeInfo="true" 148 UsePrecompiledHeader="0" 149 WarningLevel="4" 150 DebugInformationFormat="0" 151 /> 152 <Tool 153 Name="VCManagedResourceCompilerTool" 154 /> 155 <Tool 156 Name="VCResourceCompilerTool" 157 /> 158 <Tool 159 Name="VCPreLinkEventTool" 160 /> 161 <Tool 162 Name="VCLinkerTool" 163 AdditionalDependencies="winmm.lib sdl.lib" 164 OutputFile="$(OutDir)\$(ProjectName)-tfmx.exe" 165 LinkIncremental="1" 166 SuppressStartupBanner="true" 167 IgnoreDefaultLibraryNames="libc.lib" 168 GenerateDebugInformation="false" 169 SubSystem="1" 170 OptimizeReferences="2" 171 EnableCOMDATFolding="2" 172 EntryPointSymbol="WinMainCRTStartup" 173 RandomizedBaseAddress="1" 174 DataExecutionPrevention="0" 175 TargetMachine="1" 176 /> 177 <Tool 178 Name="VCALinkTool" 179 /> 180 <Tool 181 Name="VCManifestTool" 182 /> 183 <Tool 184 Name="VCXDCMakeTool" 185 /> 186 <Tool 187 Name="VCBscMakeTool" 188 /> 189 <Tool 190 Name="VCFxCopTool" 191 /> 192 <Tool 193 Name="VCAppVerifierTool" 194 /> 195 <Tool 196 Name="VCPostBuildEventTool" 197 /> 198 </Configuration> 199 </Configurations> 200 <References> 201 </References> 202 <Files> 203 <Filter 204 Name="base" 205 > 206 <File 207 RelativePath="..\..\base\commandLine.cpp" 208 > 209 </File> 210 <File 211 RelativePath="..\..\base\commandLine.h" 212 > 213 </File> 214 <File 215 RelativePath="..\..\base\internal_version.h" 216 > 217 </File> 218 <File 219 RelativePath="..\..\base\main.cpp" 220 > 221 </File> 222 <File 223 RelativePath="..\..\base\main.h" 224 > 225 </File> 226 <File 227 RelativePath="..\..\base\plugins.cpp" 228 > 229 </File> 230 <File 231 RelativePath="..\..\base\plugins.h" 232 > 233 </File> 234 <File 235 RelativePath="..\..\base\version.cpp" 236 > 237 </File> 238 <File 239 RelativePath="..\..\base\version.h" 240 > 241 </File> 242 </Filter> 243 <Filter 244 Name="common" 245 > 246 <File 247 RelativePath="..\..\common\algorithm.h" 248 > 249 </File> 250 <File 251 RelativePath="..\..\common\archive.cpp" 252 > 253 </File> 254 <File 255 RelativePath="..\..\common\archive.h" 256 > 257 </File> 258 <File 259 RelativePath="..\..\common\array.h" 260 > 261 </File> 262 <File 263 RelativePath="..\..\backends\base-backend.h" 264 > 265 </File> 266 <File 267 RelativePath="..\..\common\config-file.cpp" 268 > 269 </File> 270 <File 271 RelativePath="..\..\common\config-file.h" 272 > 273 </File> 274 <File 275 RelativePath="..\..\common\config-manager.cpp" 276 > 277 </File> 278 <File 279 RelativePath="..\..\common\config-manager.h" 280 > 281 </File> 282 <File 283 RelativePath="..\..\common\debug.cpp" 284 > 285 </File> 286 <File 287 RelativePath="..\..\common\debug.h" 288 > 289 </File> 290 <File 291 RelativePath="..\..\common\endian.h" 292 > 293 </File> 294 <File 295 RelativePath="..\..\common\error.h" 296 > 297 </File> 298 <File 299 RelativePath="..\..\common\events.h" 300 > 301 </File> 302 <File 303 RelativePath="..\..\common\file.cpp" 304 > 305 </File> 306 <File 307 RelativePath="..\..\common\file.h" 308 > 309 </File> 310 <File 311 RelativePath="..\..\common\frac.h" 312 > 313 </File> 314 <File 315 RelativePath="..\..\common\fs.cpp" 316 > 317 </File> 318 <File 319 RelativePath="..\..\common\fs.h" 320 > 321 </File> 322 <File 323 RelativePath="..\..\common\func.h" 324 > 325 </File> 326 <File 327 RelativePath="..\..\common\hash-str.h" 328 > 329 </File> 330 <File 331 RelativePath="..\..\common\hashmap.cpp" 332 > 333 </File> 334 <File 335 RelativePath="..\..\common\hashmap.h" 336 > 337 </File> 338 <File 339 RelativePath="..\..\common\iff_container.h" 340 > 341 </File> 342 <File 343 RelativePath="..\..\common\keyboard.h" 344 > 345 </File> 346 <File 347 RelativePath="..\..\common\list.h" 348 > 349 </File> 350 <File 351 RelativePath="..\..\common\list_intern.h" 352 > 353 </File> 354 <File 355 RelativePath="..\..\common\md5.cpp" 356 > 357 </File> 358 <File 359 RelativePath="..\..\common\md5.h" 360 > 361 </File> 362 <File 363 RelativePath="..\..\common\memorypool.cpp" 364 > 365 </File> 366 <File 367 RelativePath="..\..\common\memorypool.h" 368 > 369 </File> 370 <File 371 RelativePath="..\..\common\mutex.cpp" 372 > 373 </File> 374 <File 375 RelativePath="..\..\common\mutex.h" 376 > 377 </File> 378 <File 379 RelativePath="..\..\common\noncopyable.h" 380 > 381 </File> 382 <File 383 RelativePath="..\..\common\pack-end.h" 384 > 385 </File> 386 <File 387 RelativePath="..\..\common\pack-start.h" 388 > 389 </File> 390 <File 391 RelativePath="..\..\common\ptr.h" 392 > 393 </File> 394 <File 395 RelativePath="..\..\common\queue.h" 396 > 397 </File> 398 <File 399 RelativePath="..\..\common\rect.h" 400 > 401 </File> 402 <File 403 RelativePath="..\..\common\savefile.h" 404 > 405 </File> 406 <File 407 RelativePath="..\..\common\scummsys.h" 408 > 409 </File> 410 <File 411 RelativePath="..\..\common\serializer.h" 412 > 413 </File> 414 <File 415 RelativePath="..\..\common\singleton.h" 416 > 417 </File> 418 <File 419 RelativePath="..\..\common\stack.h" 420 > 421 </File> 422 <File 423 RelativePath="..\..\common\str.cpp" 424 > 425 </File> 426 <File 427 RelativePath="..\..\common\str.h" 428 > 429 </File> 430 <File 431 RelativePath="..\..\common\stream.cpp" 432 > 433 </File> 434 <File 435 RelativePath="..\..\common\stream.h" 436 > 437 </File> 438 <File 439 RelativePath="..\..\common\system.cpp" 440 > 441 </File> 442 <File 443 RelativePath="..\..\common\system.h" 444 > 445 </File> 446 <File 447 RelativePath="..\..\common\timer.h" 448 > 449 </File> 450 <File 451 RelativePath="..\..\common\unarj.cpp" 452 > 453 </File> 454 <File 455 RelativePath="..\..\common\unarj.h" 456 > 457 </File> 458 <File 459 RelativePath="..\..\common\unzip.cpp" 460 > 461 </File> 462 <File 463 RelativePath="..\..\common\unzip.h" 464 > 465 </File> 466 <File 467 RelativePath="..\..\common\util.cpp" 468 > 469 </File> 470 <File 471 RelativePath="..\..\common\util.h" 472 > 473 </File> 474 <File 475 RelativePath="..\..\common\xmlparser.cpp" 476 > 477 </File> 478 <File 479 RelativePath="..\..\common\xmlparser.h" 480 > 481 </File> 482 <File 483 RelativePath="..\..\common\zlib.cpp" 484 > 485 </File> 486 <File 487 RelativePath="..\..\common\zlib.h" 488 > 489 </File> 490 </Filter> 491 <Filter 492 Name="sound" 493 > 494 <File 495 RelativePath="..\..\sound\adpcm.cpp" 496 > 497 </File> 498 <File 499 RelativePath="..\..\sound\adpcm.h" 500 > 501 </File> 502 <File 503 RelativePath="..\..\sound\aiff.cpp" 504 > 505 </File> 506 <File 507 RelativePath="..\..\sound\aiff.h" 508 > 509 </File> 510 <File 511 RelativePath="..\..\sound\audiocd.cpp" 512 > 513 </File> 514 <File 515 RelativePath="..\..\sound\audiocd.h" 516 > 517 </File> 518 <File 519 RelativePath="..\..\sound\audiostream.cpp" 520 > 521 </File> 522 <File 523 RelativePath="..\..\sound\audiostream.h" 524 > 525 </File> 526 <File 527 RelativePath="..\..\sound\flac.cpp" 528 > 529 </File> 530 <File 531 RelativePath="..\..\sound\flac.h" 532 > 533 </File> 534 <File 535 RelativePath="..\..\sound\fmopl.cpp" 536 > 537 </File> 538 <File 539 RelativePath="..\..\sound\fmopl.h" 540 > 541 </File> 542 <File 543 RelativePath="..\..\sound\iff.cpp" 544 > 545 <FileConfiguration 546 Name="Debug|Win32" 547 > 548 <Tool 549 Name="VCCLCompilerTool" 550 ObjectFile="$(IntDir)\$(InputName)1.obj" 551 XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" 552 /> 553 </FileConfiguration> 554 <FileConfiguration 555 Name="Release|Win32" 556 > 557 <Tool 558 Name="VCCLCompilerTool" 559 ObjectFile="$(IntDir)\$(InputName)1.obj" 560 XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" 561 /> 562 </FileConfiguration> 563 </File> 564 <File 565 RelativePath="..\..\sound\iff.h" 566 > 567 </File> 568 <File 569 RelativePath="..\..\sound\mididrv.cpp" 570 > 571 </File> 572 <File 573 RelativePath="..\..\sound\mididrv.h" 574 > 575 </File> 576 <File 577 RelativePath="..\..\sound\midiparser.cpp" 578 > 579 </File> 580 <File 581 RelativePath="..\..\sound\midiparser.h" 582 > 583 </File> 584 <File 585 RelativePath="..\..\sound\midiparser_smf.cpp" 586 > 587 </File> 588 <File 589 RelativePath="..\..\sound\midiparser_xmidi.cpp" 590 > 591 </File> 592 <File 593 RelativePath="..\..\sound\mixer.cpp" 594 > 595 </File> 596 <File 597 RelativePath="..\..\sound\mixer.h" 598 > 599 </File> 600 <File 601 RelativePath="..\..\sound\mixer_intern.h" 602 > 603 </File> 604 <File 605 RelativePath="..\..\sound\mp3.cpp" 606 > 607 </File> 608 <File 609 RelativePath="..\..\sound\mp3.h" 610 > 611 </File> 612 <File 613 RelativePath="..\..\sound\mpu401.cpp" 614 > 615 </File> 616 <File 617 RelativePath="..\..\sound\mpu401.h" 618 > 619 </File> 620 <File 621 RelativePath="..\..\sound\musicplugin.cpp" 622 > 623 </File> 624 <File 625 RelativePath="..\..\sound\musicplugin.h" 626 > 627 </File> 628 <File 629 RelativePath="..\..\sound\null.cpp" 630 > 631 </File> 632 <File 633 RelativePath="..\..\sound\rate.cpp" 634 > 635 </File> 636 <File 637 RelativePath="..\..\sound\rate.h" 638 > 639 </File> 640 <File 641 RelativePath="..\..\sound\shorten.cpp" 642 > 643 </File> 644 <File 645 RelativePath="..\..\sound\shorten.h" 646 > 647 </File> 648 <File 649 RelativePath="..\..\sound\timestamp.cpp" 650 > 651 </File> 652 <File 653 RelativePath="..\..\sound\timestamp.h" 654 > 655 </File> 656 <File 657 RelativePath="..\..\sound\vag.cpp" 658 > 659 </File> 660 <File 661 RelativePath="..\..\sound\vag.h" 662 > 663 </File> 664 <File 665 RelativePath="..\..\sound\voc.cpp" 666 > 667 </File> 668 <File 669 RelativePath="..\..\sound\voc.h" 670 > 671 </File> 672 <File 673 RelativePath="..\..\sound\vorbis.cpp" 674 > 675 </File> 676 <File 677 RelativePath="..\..\sound\vorbis.h" 678 > 679 </File> 680 <File 681 RelativePath="..\..\sound\wave.cpp" 682 > 683 </File> 684 <File 685 RelativePath="..\..\sound\wave.h" 686 > 687 </File> 688 <Filter 689 Name="softhsynth" 690 > 691 <File 692 RelativePath="..\..\sound\softsynth\adlib.cpp" 693 > 694 <FileConfiguration 695 Name="Debug|Win32" 696 > 697 <Tool 698 Name="VCCLCompilerTool" 699 ObjectFile="$(IntDir)/$(InputName)1.obj" 700 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 701 /> 702 </FileConfiguration> 703 <FileConfiguration 704 Name="Release|Win32" 705 > 706 <Tool 707 Name="VCCLCompilerTool" 708 ObjectFile="$(IntDir)/$(InputName)1.obj" 709 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 710 /> 711 </FileConfiguration> 712 </File> 713 <File 714 RelativePath="..\..\sound\softsynth\emumidi.h" 715 > 716 </File> 717 <File 718 RelativePath="..\..\sound\softsynth\fluidsynth.cpp" 719 > 720 </File> 721 <File 722 RelativePath="..\..\sound\softsynth\mt32.cpp" 723 > 724 <FileConfiguration 725 Name="Debug|Win32" 726 > 727 <Tool 728 Name="VCCLCompilerTool" 729 ObjectFile="$(IntDir)/$(InputName)1.obj" 730 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 731 /> 732 </FileConfiguration> 733 <FileConfiguration 734 Name="Release|Win32" 735 > 736 <Tool 737 Name="VCCLCompilerTool" 738 ObjectFile="$(IntDir)/$(InputName)1.obj" 739 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 740 /> 741 </FileConfiguration> 742 </File> 743 <File 744 RelativePath="..\..\sound\softsynth\pcspk.cpp" 745 > 746 </File> 747 <File 748 RelativePath="..\..\sound\softsynth\pcspk.h" 749 > 750 </File> 751 <File 752 RelativePath="..\..\sound\softsynth\ym2612.cpp" 753 > 754 <FileConfiguration 755 Name="Debug|Win32" 756 > 757 <Tool 758 Name="VCCLCompilerTool" 759 ObjectFile="$(IntDir)/$(InputName)1.obj" 760 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 761 /> 762 </FileConfiguration> 763 <FileConfiguration 764 Name="Release|Win32" 765 > 766 <Tool 767 Name="VCCLCompilerTool" 768 ObjectFile="$(IntDir)/$(InputName)1.obj" 769 XMLDocumentationFileName="$(IntDir)/$(InputName)1.xdc" 770 /> 771 </FileConfiguration> 772 </File> 773 <File 774 RelativePath="..\..\sound\softsynth\ym2612.h" 775 > 776 </File> 777 <Filter 778 Name="mt32" 779 > 780 <File 781 RelativePath="..\..\sound\softsynth\mt32\freeverb.cpp" 782 > 783 </File> 784 <File 785 RelativePath="..\..\sound\softsynth\mt32\freeverb.h" 786 > 787 </File> 788 <File 789 RelativePath="..\..\sound\softsynth\mt32\i386.cpp" 790 > 791 </File> 792 <File 793 RelativePath="..\..\sound\softsynth\mt32\i386.h" 794 > 795 </File> 796 <File 797 RelativePath="..\..\sound\softsynth\mt32\mt32_file.cpp" 798 > 799 </File> 800 <File 801 RelativePath="..\..\sound\softsynth\mt32\mt32_file.h" 802 > 803 </File> 804 <File 805 RelativePath="..\..\sound\softsynth\mt32\mt32emu.h" 806 > 807 </File> 808 <File 809 RelativePath="..\..\sound\softsynth\mt32\part.cpp" 810 > 811 </File> 812 <File 813 RelativePath="..\..\sound\softsynth\mt32\part.h" 814 > 815 </File> 816 <File 817 RelativePath="..\..\sound\softsynth\mt32\partial.cpp" 818 > 819 </File> 820 <File 821 RelativePath="..\..\sound\softsynth\mt32\partial.h" 822 > 823 </File> 824 <File 825 RelativePath="..\..\sound\softsynth\mt32\partialManager.cpp" 826 > 827 </File> 828 <File 829 RelativePath="..\..\sound\softsynth\mt32\partialManager.h" 830 > 831 </File> 832 <File 833 RelativePath="..\..\sound\softsynth\mt32\structures.h" 834 > 835 </File> 836 <File 837 RelativePath="..\..\sound\softsynth\mt32\synth.cpp" 838 > 839 </File> 840 <File 841 RelativePath="..\..\sound\softsynth\mt32\synth.h" 842 > 843 </File> 844 <File 845 RelativePath="..\..\sound\softsynth\mt32\tables.cpp" 846 > 847 </File> 848 <File 849 RelativePath="..\..\sound\softsynth\mt32\tables.h" 850 > 851 </File> 852 </Filter> 853 <Filter 854 Name="opl" 855 > 856 <File 857 RelativePath="..\..\sound\softsynth\opl\dosbox.cpp" 858 > 859 </File> 860 <File 861 RelativePath="..\..\sound\softsynth\opl\dosbox.h" 862 > 863 </File> 864 <File 865 RelativePath="..\..\sound\softsynth\opl\mame.cpp" 866 > 867 </File> 868 <File 869 RelativePath="..\..\sound\softsynth\opl\mame.h" 870 > 871 </File> 872 <File 873 RelativePath="..\..\sound\softsynth\opl\opl_impl.h" 874 > 875 </File> 876 <File 877 RelativePath="..\..\sound\softsynth\opl\opl_inc.h" 878 > 879 </File> 880 </Filter> 881 </Filter> 882 <Filter 883 Name="mods" 884 > 885 <File 886 RelativePath="..\..\sound\mods\infogrames.cpp" 887 > 888 </File> 889 <File 890 RelativePath="..\..\sound\mods\infogrames.h" 891 > 892 </File> 893 <File 894 RelativePath="..\..\sound\mods\module.cpp" 895 > 896 </File> 897 <File 898 RelativePath="..\..\sound\mods\module.h" 899 > 900 </File> 901 <File 902 RelativePath="..\..\sound\mods\paula.cpp" 903 > 904 </File> 905 <File 906 RelativePath="..\..\sound\mods\paula.h" 907 > 908 </File> 909 <File 910 RelativePath="..\..\sound\mods\protracker.cpp" 911 > 912 </File> 913 <File 914 RelativePath="..\..\sound\mods\protracker.h" 915 > 916 </File> 917 <File 918 RelativePath="..\..\sound\mods\rjp1.cpp" 919 > 920 </File> 921 <File 922 RelativePath="..\..\sound\mods\rjp1.h" 923 > 924 </File> 925 <File 926 RelativePath="..\..\sound\mods\soundfx.cpp" 927 > 928 </File> 929 <File 930 RelativePath="..\..\sound\mods\soundfx.h" 931 > 932 </File> 933 <File 934 RelativePath="..\..\sound\mods\tfmx.cpp" 935 > 936 </File> 937 <File 938 RelativePath="..\..\sound\mods\tfmx.h" 939 > 940 </File> 941 </Filter> 942 </Filter> 943 <Filter 944 Name="txt" 945 > 946 <File 947 RelativePath="..\..\COPYING" 948 > 949 </File> 950 <File 951 RelativePath="..\..\NEWS" 952 > 953 </File> 954 <File 955 RelativePath="..\..\README" 956 > 957 </File> 958 <File 959 RelativePath="..\..\TODO" 960 > 961 </File> 962 </Filter> 963 <Filter 964 Name="rsc" 965 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 966 > 967 <File 968 RelativePath="..\..\icons\scummvm.ico" 969 > 970 </File> 971 <File 972 RelativePath="..\..\dists\scummvm.rc" 973 > 974 </File> 975 </Filter> 976 <Filter 977 Name="backends" 978 > 979 <File 980 RelativePath="..\..\backends\base-backend.cpp" 981 > 982 </File> 983 <Filter 984 Name="sdl" 985 > 986 <File 987 RelativePath="..\..\backends\platform\sdl\events.cpp" 988 > 989 </File> 990 <File 991 RelativePath="..\..\backends\platform\sdl\graphics.cpp" 992 > 993 </File> 994 <File 995 RelativePath="..\..\backends\platform\sdl\hardwarekeys.cpp" 996 > 997 </File> 998 <File 999 RelativePath="..\..\backends\platform\sdl\main.cpp" 1000 > 1001 <FileConfiguration 1002 Name="Debug|Win32" 1003 > 1004 <Tool 1005 Name="VCCLCompilerTool" 1006 ObjectFile="$(IntDir)\$(InputName)1.obj" 1007 XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" 1008 /> 1009 </FileConfiguration> 1010 <FileConfiguration 1011 Name="Release|Win32" 1012 > 1013 <Tool 1014 Name="VCCLCompilerTool" 1015 ObjectFile="$(IntDir)\$(InputName)1.obj" 1016 XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" 1017 /> 1018 </FileConfiguration> 1019 </File> 1020 <File 1021 RelativePath="..\..\backends\platform\sdl\sdl.cpp" 1022 > 1023 </File> 1024 <File 1025 RelativePath="..\..\backends\platform\sdl\sdl.h" 1026 > 1027 </File> 1028 </Filter> 1029 <Filter 1030 Name="fs" 1031 > 1032 <File 1033 RelativePath="..\..\backends\fs\abstract-fs.cpp" 1034 > 1035 </File> 1036 <File 1037 RelativePath="..\..\backends\fs\abstract-fs.h" 1038 > 1039 </File> 1040 <File 1041 RelativePath="..\..\backends\fs\fs-factory.h" 1042 > 1043 </File> 1044 <File 1045 RelativePath="..\..\backends\fs\stdiostream.cpp" 1046 > 1047 </File> 1048 <File 1049 RelativePath="..\..\backends\fs\stdiostream.h" 1050 > 1051 </File> 1052 <Filter 1053 Name="windows" 1054 > 1055 <File 1056 RelativePath="..\..\backends\fs\windows\windows-fs-factory.cpp" 1057 > 1058 </File> 1059 <File 1060 RelativePath="..\..\backends\fs\windows\windows-fs-factory.h" 1061 > 1062 </File> 1063 </Filter> 1064 </Filter> 1065 <Filter 1066 Name="midi" 1067 > 1068 <File 1069 RelativePath="..\..\backends\midi\windows.cpp" 1070 > 1071 </File> 1072 </Filter> 1073 <Filter 1074 Name="timer" 1075 > 1076 <File 1077 RelativePath="..\..\backends\timer\default\default-timer.cpp" 1078 > 1079 </File> 1080 <File 1081 RelativePath="..\..\backends\timer\default\default-timer.h" 1082 > 1083 </File> 1084 </Filter> 1085 <Filter 1086 Name="saves" 1087 > 1088 <File 1089 RelativePath="..\..\backends\saves\default\default-saves.cpp" 1090 > 1091 </File> 1092 <File 1093 RelativePath="..\..\backends\saves\default\default-saves.h" 1094 > 1095 </File> 1096 <File 1097 RelativePath="..\..\backends\saves\savefile.cpp" 1098 > 1099 </File> 1100 </Filter> 1101 <Filter 1102 Name="events" 1103 > 1104 <Filter 1105 Name="default" 1106 > 1107 <File 1108 RelativePath="..\..\backends\events\default\default-events.cpp" 1109 > 1110 </File> 1111 <File 1112 RelativePath="..\..\backends\events\default\default-events.h" 1113 > 1114 </File> 1115 </Filter> 1116 </Filter> 1117 <Filter 1118 Name="keymapper" 1119 > 1120 <File 1121 RelativePath="..\..\backends\keymapper\action.cpp" 1122 > 1123 </File> 1124 <File 1125 RelativePath="..\..\backends\keymapper\action.h" 1126 > 1127 </File> 1128 <File 1129 RelativePath="..\..\backends\keymapper\hardware-key.h" 1130 > 1131 </File> 1132 <File 1133 RelativePath="..\..\backends\keymapper\keymap.cpp" 1134 > 1135 </File> 1136 <File 1137 RelativePath="..\..\backends\keymapper\keymap.h" 1138 > 1139 </File> 1140 <File 1141 RelativePath="..\..\backends\keymapper\keymapper.cpp" 1142 > 1143 </File> 1144 <File 1145 RelativePath="..\..\backends\keymapper\keymapper.h" 1146 > 1147 </File> 1148 <File 1149 RelativePath="..\..\backends\keymapper\remap-dialog.cpp" 1150 > 1151 </File> 1152 <File 1153 RelativePath="..\..\backends\keymapper\remap-dialog.h" 1154 > 1155 </File> 1156 <File 1157 RelativePath="..\..\backends\keymapper\types.h" 1158 > 1159 </File> 1160 </Filter> 1161 <Filter 1162 Name="vkeybd" 1163 > 1164 <File 1165 RelativePath="..\..\backends\vkeybd\image-map.cpp" 1166 > 1167 </File> 1168 <File 1169 RelativePath="..\..\backends\vkeybd\image-map.h" 1170 > 1171 </File> 1172 <File 1173 RelativePath="..\..\backends\vkeybd\keycode-descriptions.h" 1174 > 1175 </File> 1176 <File 1177 RelativePath="..\..\backends\vkeybd\polygon.cpp" 1178 > 1179 </File> 1180 <File 1181 RelativePath="..\..\backends\vkeybd\polygon.h" 1182 > 1183 </File> 1184 <File 1185 RelativePath="..\..\backends\vkeybd\virtual-keyboard-gui.cpp" 1186 > 1187 </File> 1188 <File 1189 RelativePath="..\..\backends\vkeybd\virtual-keyboard-gui.h" 1190 > 1191 </File> 1192 <File 1193 RelativePath="..\..\backends\vkeybd\virtual-keyboard-parser.cpp" 1194 > 1195 </File> 1196 <File 1197 RelativePath="..\..\backends\vkeybd\virtual-keyboard-parser.h" 1198 > 1199 </File> 1200 <File 1201 RelativePath="..\..\backends\vkeybd\virtual-keyboard.cpp" 1202 > 1203 </File> 1204 <File 1205 RelativePath="..\..\backends\vkeybd\virtual-keyboard.h" 1206 > 1207 </File> 1208 </Filter> 1209 </Filter> 1210 <Filter 1211 Name="gui" 1212 > 1213 <File 1214 RelativePath="..\..\gui\about.cpp" 1215 > 1216 </File> 1217 <File 1218 RelativePath="..\..\gui\about.h" 1219 > 1220 </File> 1221 <File 1222 RelativePath="..\..\gui\browser.cpp" 1223 > 1224 </File> 1225 <File 1226 RelativePath="..\..\gui\browser.h" 1227 > 1228 </File> 1229 <File 1230 RelativePath="..\..\gui\chooser.cpp" 1231 > 1232 </File> 1233 <File 1234 RelativePath="..\..\gui\chooser.h" 1235 > 1236 </File> 1237 <File 1238 RelativePath="..\..\gui\console.cpp" 1239 > 1240 </File> 1241 <File 1242 RelativePath="..\..\gui\console.h" 1243 > 1244 </File> 1245 <File 1246 RelativePath="..\..\gui\credits.h" 1247 > 1248 </File> 1249 <File 1250 RelativePath="..\..\gui\debugger.cpp" 1251 > 1252 </File> 1253 <File 1254 RelativePath="..\..\gui\debugger.h" 1255 > 1256 </File> 1257 <File 1258 RelativePath="..\..\gui\dialog.cpp" 1259 > 1260 </File> 1261 <File 1262 RelativePath="..\..\gui\dialog.h" 1263 > 1264 </File> 1265 <File 1266 RelativePath="..\..\gui\editable.cpp" 1267 > 1268 </File> 1269 <File 1270 RelativePath="..\..\gui\editable.h" 1271 > 1272 </File> 1273 <File 1274 RelativePath="..\..\gui\EditTextWidget.cpp" 1275 > 1276 </File> 1277 <File 1278 RelativePath="..\..\gui\EditTextWidget.h" 1279 > 1280 </File> 1281 <File 1282 RelativePath="..\..\gui\GuiManager.cpp" 1283 > 1284 </File> 1285 <File 1286 RelativePath="..\..\gui\GuiManager.h" 1287 > 1288 </File> 1289 <File 1290 RelativePath="..\..\gui\Key.cpp" 1291 > 1292 </File> 1293 <File 1294 RelativePath="..\..\gui\Key.h" 1295 > 1296 </File> 1297 <File 1298 RelativePath="..\..\gui\launcher.cpp" 1299 > 1300 </File> 1301 <File 1302 RelativePath="..\..\gui\launcher.h" 1303 > 1304 </File> 1305 <File 1306 RelativePath="..\..\gui\ListWidget.cpp" 1307 > 1308 </File> 1309 <File 1310 RelativePath="..\..\gui\ListWidget.h" 1311 > 1312 </File> 1313 <File 1314 RelativePath="..\..\gui\massadd.cpp" 1315 > 1316 </File> 1317 <File 1318 RelativePath="..\..\gui\massadd.h" 1319 > 1320 </File> 1321 <File 1322 RelativePath="..\..\gui\message.cpp" 1323 > 1324 </File> 1325 <File 1326 RelativePath="..\..\gui\message.h" 1327 > 1328 </File> 1329 <File 1330 RelativePath="..\..\gui\object.cpp" 1331 > 1332 </File> 1333 <File 1334 RelativePath="..\..\gui\object.h" 1335 > 1336 </File> 1337 <File 1338 RelativePath="..\..\gui\options.cpp" 1339 > 1340 </File> 1341 <File 1342 RelativePath="..\..\gui\options.h" 1343 > 1344 </File> 1345 <File 1346 RelativePath="..\..\gui\PopUpWidget.cpp" 1347 > 1348 </File> 1349 <File 1350 RelativePath="..\..\gui\PopUpWidget.h" 1351 > 1352 </File> 1353 <File 1354 RelativePath="..\..\gui\saveload.cpp" 1355 > 1356 </File> 1357 <File 1358 RelativePath="..\..\gui\saveload.h" 1359 > 1360 </File> 1361 <File 1362 RelativePath="..\..\gui\ScrollBarWidget.cpp" 1363 > 1364 </File> 1365 <File 1366 RelativePath="..\..\gui\ScrollBarWidget.h" 1367 > 1368 </File> 1369 <File 1370 RelativePath="..\..\gui\TabWidget.cpp" 1371 > 1372 </File> 1373 <File 1374 RelativePath="..\..\gui\TabWidget.h" 1375 > 1376 </File> 1377 <File 1378 RelativePath="..\..\gui\themebrowser.cpp" 1379 > 1380 </File> 1381 <File 1382 RelativePath="..\..\gui\themebrowser.h" 1383 > 1384 </File> 1385 <File 1386 RelativePath="..\..\gui\ThemeEngine.cpp" 1387 > 1388 </File> 1389 <File 1390 RelativePath="..\..\gui\ThemeEngine.h" 1391 > 1392 </File> 1393 <File 1394 RelativePath="..\..\gui\ThemeEval.cpp" 1395 > 1396 </File> 1397 <File 1398 RelativePath="..\..\gui\ThemeLayout.cpp" 1399 > 1400 </File> 1401 <File 1402 RelativePath="..\..\gui\ThemeLayout.h" 1403 > 1404 </File> 1405 <File 1406 RelativePath="..\..\gui\ThemeParser.cpp" 1407 > 1408 </File> 1409 <File 1410 RelativePath="..\..\gui\ThemeParser.h" 1411 > 1412 <FileConfiguration 1413 Name="Debug|Win32" 1414 > 1415 <Tool 1416 Name="VCCustomBuildTool" 1417 /> 1418 </FileConfiguration> 1419 </File> 1420 <File 1421 RelativePath="..\..\gui\widget.cpp" 1422 > 1423 </File> 1424 <File 1425 RelativePath="..\..\gui\widget.h" 1426 > 1427 </File> 1428 </Filter> 1429 <Filter 1430 Name="graphics" 1431 > 1432 <File 1433 RelativePath="..\..\graphics\colormasks.h" 1434 > 1435 </File> 1436 <File 1437 RelativePath="..\..\graphics\cursorman.cpp" 1438 > 1439 </File> 1440 <File 1441 RelativePath="..\..\graphics\cursorman.h" 1442 > 1443 </File> 1444 <File 1445 RelativePath="..\..\graphics\dither.cpp" 1446 > 1447 </File> 1448 <File 1449 RelativePath="..\..\graphics\dither.h" 1450 > 1451 </File> 1452 <File 1453 RelativePath="..\..\graphics\font.cpp" 1454 > 1455 </File> 1456 <File 1457 RelativePath="..\..\graphics\font.h" 1458 > 1459 </File> 1460 <File 1461 RelativePath="..\..\graphics\fontman.cpp" 1462 > 1463 </File> 1464 <File 1465 RelativePath="..\..\graphics\fontman.h" 1466 > 1467 </File> 1468 <File 1469 RelativePath="..\..\graphics\iff.cpp" 1470 > 1471 </File> 1472 <File 1473 RelativePath="..\..\graphics\iff.h" 1474 > 1475 </File> 1476 <File 1477 RelativePath="..\..\graphics\imagedec.cpp" 1478 > 1479 </File> 1480 <File 1481 RelativePath="..\..\graphics\imagedec.h" 1482 > 1483 </File> 1484 <File 1485 RelativePath="..\..\graphics\primitives.cpp" 1486 > 1487 </File> 1488 <File 1489 RelativePath="..\..\graphics\primitives.h" 1490 > 1491 </File> 1492 <File 1493 RelativePath="..\..\graphics\scaler.cpp" 1494 > 1495 </File> 1496 <File 1497 RelativePath="..\..\graphics\scaler.h" 1498 > 1499 </File> 1500 <File 1501 RelativePath="..\..\graphics\surface.cpp" 1502 > 1503 </File> 1504 <File 1505 RelativePath="..\..\graphics\surface.h" 1506 > 1507 </File> 1508 <File 1509 RelativePath="..\..\graphics\thumbnail.cpp" 1510 > 1511 </File> 1512 <File 1513 RelativePath="..\..\graphics\thumbnail.h" 1514 > 1515 </File> 1516 <File 1517 RelativePath="..\..\graphics\VectorRenderer.cpp" 1518 > 1519 </File> 1520 <File 1521 RelativePath="..\..\graphics\VectorRenderer.h" 1522 > 1523 </File> 1524 <File 1525 RelativePath="..\..\graphics\VectorRendererSpec.cpp" 1526 > 1527 </File> 1528 <File 1529 RelativePath="..\..\graphics\VectorRendererSpec.h" 1530 > 1531 </File> 1532 <Filter 1533 Name="scaler" 1534 > 1535 <File 1536 RelativePath="..\..\graphics\scaler\2xsai.cpp" 1537 > 1538 </File> 1539 <File 1540 RelativePath="..\..\graphics\scaler\aspect.cpp" 1541 > 1542 </File> 1543 <File 1544 RelativePath="..\..\graphics\scaler\hq2x.cpp" 1545 > 1546 </File> 1547 <File 1548 RelativePath="..\..\graphics\scaler\hq2x.h" 1549 > 1550 </File> 1551 <File 1552 RelativePath="..\..\graphics\scaler\hq2x_i386.asm" 1553 > 1554 <FileConfiguration 1555 Name="Debug|Win32" 1556 > 1557 <Tool 1558 Name="VCCustomBuildTool" 1559 CommandLine="nasm.exe -f win32 -g -o "$(OutDir)\$(InputName).obj" "$(InputPath)"
" 1560 Outputs="$(OutDir)\$(InputName).obj" 1561 /> 1562 </FileConfiguration> 1563 <FileConfiguration 1564 Name="Release|Win32" 1565 > 1566 <Tool 1567 Name="VCCustomBuildTool" 1568 CommandLine="nasm.exe -f win32 -o "$(OutDir)\$(InputName).obj" "$(InputPath)"
" 1569 Outputs="$(OutDir)\$(InputName).obj" 1570 /> 1571 </FileConfiguration> 1572 </File> 1573 <File 1574 RelativePath="..\..\graphics\scaler\hq3x.cpp" 1575 > 1576 </File> 1577 <File 1578 RelativePath="..\..\graphics\scaler\hq3x.h" 1579 > 1580 </File> 1581 <File 1582 RelativePath="..\..\graphics\scaler\hq3x_i386.asm" 1583 > 1584 <FileConfiguration 1585 Name="Debug|Win32" 1586 > 1587 <Tool 1588 Name="VCCustomBuildTool" 1589 CommandLine="nasm.exe -f win32 -g -o "$(OutDir)\$(InputName).obj" "$(InputPath)"
" 1590 Outputs="$(OutDir)\$(InputName).obj" 1591 /> 1592 </FileConfiguration> 1593 <FileConfiguration 1594 Name="Release|Win32" 1595 > 1596 <Tool 1597 Name="VCCustomBuildTool" 1598 CommandLine="nasm.exe -f win32 -o "$(OutDir)\$(InputName).obj" "$(InputPath)"
" 1599 Outputs="$(OutDir)\$(InputName).obj" 1600 /> 1601 </FileConfiguration> 1602 </File> 1603 <File 1604 RelativePath="..\..\graphics\scaler\intern.h" 1605 > 1606 </File> 1607 <File 1608 RelativePath="..\..\graphics\scaler\scale2x.cpp" 1609 > 1610 </File> 1611 <File 1612 RelativePath="..\..\graphics\scaler\scale2x.h" 1613 > 1614 </File> 1615 <File 1616 RelativePath="..\..\graphics\scaler\scale3x.cpp" 1617 > 1618 </File> 1619 <File 1620 RelativePath="..\..\graphics\scaler\scale3x.h" 1621 > 1622 </File> 1623 <File 1624 RelativePath="..\..\graphics\scaler\scalebit.cpp" 1625 > 1626 </File> 1627 <File 1628 RelativePath="..\..\graphics\scaler\scalebit.h" 1629 > 1630 </File> 1631 <File 1632 RelativePath="..\..\graphics\scaler\thumbnail_intern.cpp" 1633 > 1634 </File> 1635 </Filter> 1636 <Filter 1637 Name="fonts" 1638 > 1639 <File 1640 RelativePath="..\..\graphics\fonts\consolefont.cpp" 1641 > 1642 </File> 1643 <File 1644 RelativePath="..\..\graphics\fonts\newfont.cpp" 1645 > 1646 </File> 1647 <File 1648 RelativePath="..\..\graphics\fonts\newfont_big.cpp" 1649 > 1650 </File> 1651 <File 1652 RelativePath="..\..\graphics\fonts\scummfont.cpp" 1653 > 1654 </File> 1655 </Filter> 1656 <Filter 1657 Name="video" 1658 > 1659 <File 1660 RelativePath="..\..\graphics\video\dxa_decoder.cpp" 1661 > 1662 </File> 1663 <File 1664 RelativePath="..\..\graphics\video\dxa_decoder.h" 1665 > 1666 </File> 1667 <File 1668 RelativePath="..\..\graphics\video\flic_decoder.cpp" 1669 > 1670 </File> 1671 <File 1672 RelativePath="..\..\graphics\video\flic_decoder.h" 1673 > 1674 </File> 1675 <File 1676 RelativePath="..\..\graphics\video\mpeg_player.cpp" 1677 > 1678 </File> 1679 <File 1680 RelativePath="..\..\graphics\video\mpeg_player.h" 1681 > 1682 </File> 1683 <File 1684 RelativePath="..\..\graphics\video\smk_decoder.cpp" 1685 > 1686 </File> 1687 <File 1688 RelativePath="..\..\graphics\video\smk_decoder.h" 1689 > 1690 </File> 1691 <File 1692 RelativePath="..\..\graphics\video\video_player.cpp" 1693 > 1694 </File> 1695 <File 1696 RelativePath="..\..\graphics\video\video_player.h" 1697 > 1698 </File> 1699 <Filter 1700 Name="coktelvideo" 1701 > 1702 <File 1703 RelativePath="..\..\graphics\video\coktelvideo\coktelvideo.cpp" 1704 > 1705 </File> 1706 <File 1707 RelativePath="..\..\graphics\video\coktelvideo\coktelvideo.h" 1708 > 1709 </File> 1710 <File 1711 RelativePath="..\..\graphics\video\coktelvideo\indeo3.cpp" 1712 > 1713 </File> 1714 <File 1715 RelativePath="..\..\graphics\video\coktelvideo\indeo3.h" 1716 > 1717 </File> 1718 </Filter> 1719 </Filter> 1720 </Filter> 1721 <Filter 1722 Name="engines" 1723 > 1724 <File 1725 RelativePath="..\..\engines\advancedDetector.cpp" 1726 > 1727 </File> 1728 <File 1729 RelativePath="..\..\engines\advancedDetector.h" 1730 > 1731 </File> 1732 <File 1733 RelativePath="..\..\engines\dialogs.cpp" 1734 > 1735 </File> 1736 <File 1737 RelativePath="..\..\engines\dialogs.h" 1738 > 1739 </File> 1740 <File 1741 RelativePath="..\..\engines\engine.cpp" 1742 > 1743 </File> 1744 <File 1745 RelativePath="..\..\engines\engine.h" 1746 > 1747 </File> 1748 <File 1749 RelativePath="..\..\engines\game.cpp" 1750 > 1751 </File> 1752 <File 1753 RelativePath="..\..\engines\game.h" 1754 > 1755 </File> 1756 <File 1757 RelativePath="..\..\engines\metaengine.h" 1758 > 1759 </File> 1760 </Filter> 1761 <Filter 1762 Name="TFMX" 1763 > 1764 <File 1765 RelativePath="..\..\TFMX\README.txt" 1766 > 1767 </File> 1768 <File 1769 RelativePath="..\..\tfmx\tfmxdebug.cpp" 1770 > 1771 </File> 1772 <File 1773 RelativePath="..\..\tfmx\tfmxdebug.h" 1774 > 1775 </File> 1776 <File 1777 RelativePath="..\..\TFMX\tfmxplayer.cpp" 1778 > 1779 </File> 1780 </Filter> 1781 </Files> 1782 <Globals> 1783 </Globals> 1784 </VisualStudioProject> -
sound/module.mk
29 29 mods/paula.o \ 30 30 mods/rjp1.o \ 31 31 mods/soundfx.o \ 32 mods/tfmx.o \ 32 33 softsynth/adlib.o \ 33 34 softsynth/opl/dosbox.o \ 34 35 softsynth/opl/mame.o \ -
sound/mods/tfmx.cpp
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #include "common/scummsys.h" 27 #include "common/endian.h" 28 #include "common/stream.h" 29 #include "common/util.h" 30 #include "common/debug.h" 31 32 #include "sound/mods/tfmx.h" 33 34 #include "tfmx/tfmxdebug.h" 35 36 namespace Audio { 37 38 const uint16 Tfmx::noteIntervalls[64] = { 39 1710, 1614, 1524, 1438, 1357, 1281, 1209, 1141, 1077, 1017, 960, 908, 40 856, 810, 764, 720, 680, 642, 606, 571, 539, 509, 480, 454, 41 428, 404, 381, 360, 340, 320, 303, 286, 270, 254, 240, 227, 42 214, 202, 191, 180, 170, 160, 151, 143, 135, 127, 120, 113, 43 214, 202, 191, 180, 170, 160, 151, 143, 135, 127, 120, 113, 44 214, 202, 191, 180 }; 45 46 47 48 Tfmx::Tfmx(int rate, bool stereo) 49 : Paula(stereo, rate), _resource() { 50 _playerCtx.enabled = false; 51 _playerCtx.song = -1; 52 53 for (int i = 0; i < kNumVoices; ++i) 54 _channelCtx[i].paulaChannel = i; 55 } 56 57 Tfmx::~Tfmx() { 58 } 59 60 void Tfmx::interrupt() { 61 assert(!_end); 62 for (int i = 0; i < kNumVoices; ++i) { 63 ChannelContext &channel = _channelCtx[i]; 64 65 if (channel.countDmaInterrupts) { 66 // wait for DMA Interupts to happen 67 int doneDma = getChannelDmaCount(channel.paulaChannel); 68 if (doneDma > channel.dmaCount) { 69 debug("channel %d, DMA done", i); 70 channel.countDmaInterrupts = false; 71 channel.macroRun = true; 72 } 73 } 74 75 // TODO: Sometimes a macro will be executed here 76 77 // apply timebased effects on Parameters 78 effects(channel); 79 80 // see if we have to run the macro-program 81 if (channel.macroRun) { 82 if (channel.macroWait == 0) { 83 // run macro 84 while (macroStep(channel)) 85 ; 86 } else 87 --channel.macroWait; 88 } 89 // FIXME handle Volume 90 Paula::setChannelVolume(channel.paulaChannel, 0x40); 91 } 92 93 // Patterns are only processed each _playerCtx.timerCount + 1 tick 94 if (_playerCtx.song >= 0 && !_playerCtx.patternCount--) { 95 _playerCtx.patternCount = _playerCtx.patternSkip; 96 advancePatterns(); 97 } 98 } 99 100 void Tfmx::effects(ChannelContext &channel) { 101 if (channel.sfxLockTime >= 0) 102 --channel.sfxLockTime; 103 else 104 channel.sfxLocked = false; 105 106 // TODO: macroNote pending? 107 if (0) { 108 channel.sfxLocked = false; 109 // TODO: macronote 110 } 111 112 // vibratio 113 114 // porta 115 116 // envelope 117 } 118 119 FORCEINLINE bool Tfmx::macroStep(ChannelContext &channel) { 120 const byte *const macroPtr = (byte *)(_resource.getMacroPtr(channel.macroOffset) + channel.macroStep); 121 ++channel.macroStep; 122 //int channelNo = ((byte*)&channel-(byte*)_channelCtx)/sizeof(ChannelContext); 123 124 displayMacroStep(macroPtr); 125 126 int32 temp = 0; 127 128 switch (macroPtr[0]) { 129 case 0x00: // Reset + DMA Off. Parameters: deferWait, addset, vol 130 channel.envReset = 0; 131 channel.vibReset = 0; 132 channel.portaRate = 0; 133 // FT 134 case 0x13: // DMA Off. Parameters: deferWait, addset, vol 135 // TODO: implement PArameters 136 Paula::disableChannel(channel.paulaChannel); 137 channel.deferWait = macroPtr[1] >= 1; 138 if (channel.deferWait) { 139 // if set, then we expect a DMA On in the same tick. 140 Paula::setChannelPeriod(channel.paulaChannel, 4); 141 Paula::setChannelSampleLen(channel.paulaChannel, 1); 142 // in this state we then need to allow some commands that normally 143 // would halt the macroprogamm to continue instead. 144 // those commands are: Wait, WaitDMA, AddPrevNote, AddNote, SetNote, <unknown Cmd> 145 // DMA On is affected aswell 146 // TODO remember time disabled?. 147 } else { 148 //TODO ? 149 } 150 return true; 151 152 case 0x01: // DMA On 153 channel.countDmaInterrupts = false; 154 if (channel.deferWait) { 155 // TODO 156 // there is actually a small delay in the player, but I think that 157 // only allows to clear DMA-State on real Hardware 158 } 159 Paula::enableChannel(channel.paulaChannel); 160 channel.deferWait = false; 161 return true; 162 163 case 0x02: // SetBeginn. Parameters: SampleOffset(L) 164 channel.sampleStart = READ_BE_UINT32(macroPtr) & 0xFFFFFF; 165 Paula::setChannelSampleStart(channel.paulaChannel, _resource.getSamplePtr(channel.sampleStart)); 166 return true; 167 168 case 0x03: // SetLength. Parameters: SampleLength(W) 169 channel.sampleLen = READ_BE_UINT16(¯oPtr[2]); 170 Paula::setChannelSampleLen(channel.paulaChannel, channel.sampleLen); 171 return true; 172 173 case 0x04: // Wait. Parameters: Ticks to wait(W). 174 // TODO: some unkown Parameter? (macroPtr[1] & 1) 175 channel.macroWait = READ_BE_UINT16(¯oPtr[2]); 176 return false; 177 178 case 0x10: // Loop Key Up. Parameters: Loopcount, MacroStep(W) 179 if (!channel.keyUp) 180 return true; 181 // FT 182 case 0x05: // Loop. Parameters: Loopcount, MacroStep(W) 183 // debug("Step %d, Loopcount: %02X", channel.macroStep, channel.macroLoopCount); 184 if (channel.macroLoopCount != 0) { 185 if (channel.macroLoopCount == 0xFF) 186 channel.macroLoopCount = macroPtr[1]; 187 channel.macroStep = READ_BE_UINT16(¯oPtr[2]); 188 } 189 --channel.macroLoopCount; 190 return true; 191 192 case 0x06: // Jump. Parameters: MacroIndex, MacroStep(W) 193 channel.macroOffset = _macroOffset[macroPtr[1] % kMaxMacroOffsets]; 194 channel.macroStep = READ_BE_UINT16(¯oPtr[2]); 195 channel.macroLoopCount = 0xFF; 196 return true; 197 198 case 0x07: // Stop Macro 199 channel.macroRun = false; 200 return false; 201 202 case 0x1F: // AddPrevNote. Parameters: Note, Finetune(W) 203 case 0x08: // AddNote. Parameters: Note, Finetune(W) 204 temp = (macroPtr[0] == 0x08) ? channel.note : channel.prevNote; 205 // Fallthrough to SetNote 206 case 0x09: { // SetNote. Parameters: Note, Finetune(W) 207 const uint16 noteInt = noteIntervalls[(temp + macroPtr[1]) & 0x3F]; 208 const uint16 finetune = READ_BE_UINT16(¯oPtr[2]) + channel.fineTune + 0x0100; 209 channel.portaDestPeriod = (uint16)((noteInt * finetune) >> 8); 210 if (!channel.portaRate) { 211 channel.period = channel.portaDestPeriod; 212 Paula::setChannelPeriod(channel.paulaChannel, channel.portaDestPeriod); 213 } 214 return channel.deferWait; 215 } 216 217 case 0x0A: // Clear Effects 218 channel.envReset = 0; 219 channel.vibReset = 0; 220 channel.portaRate = 0; 221 return true; 222 223 case 0x0B: // Portamento. Parameters: count, speed 224 macroPtr[1]; 225 macroPtr[3]; 226 return true; 227 228 case 0x0C: // Vibrato. Parameters: Speed, intensity 229 macroPtr[1]; 230 macroPtr[3]; 231 return true; 232 233 case 0x0D: // Add Volume. Parameters: unknown, volume 234 macroPtr[2]; 235 macroPtr[3]; 236 return true; 237 238 case 0x0E: // Set Volume. Parameters: unknown, volume 239 macroPtr[2]; 240 macroPtr[3]; 241 return true; 242 243 case 0x0F: // Envelope. Parameters: speed, count, endvol 244 macroPtr[1]; 245 macroPtr[2]; 246 macroPtr[3]; 247 return true; 248 249 case 0x11: // AddBegin. Parameters: times, Offset(W) 250 // TODO: implement Parameter 251 macroPtr[1]; 252 // debug("prev: %06X, after: %06X", channel.sampleStart, channel.sampleStart + (int16)READ_BE_UINT16(¯oPtr[2])); 253 channel.sampleStart += (int16)READ_BE_UINT16(¯oPtr[2]); 254 Paula::setChannelSampleStart(channel.paulaChannel, _resource.getSamplePtr(channel.sampleStart)); 255 return true; 256 257 case 0x12: // AddLen. Parameters: added Length(W) 258 channel.sampleLen += READ_BE_UINT16(¯oPtr[2]); 259 Paula::setChannelSampleLen(channel.paulaChannel, channel.sampleLen); 260 return true; 261 262 case 0x14: // Wait key up. Parameters: wait cycles(W) 263 if (!channel.keyUp || channel.macroLoopCount == 0) { 264 channel.macroLoopCount = 0xFF; 265 return true; 266 } else if (channel.macroLoopCount == 0xFF) 267 channel.macroLoopCount = macroPtr[3]; 268 --channel.macroLoopCount; 269 return false; 270 271 case 0x15: // Subroutine. Parameters: MacroIndex, Macrostep(W) 272 channel.macroReturnOffset = channel.macroOffset; 273 channel.macroReturnStep = channel.macroStep; 274 275 channel.macroOffset = _macroOffset[macroPtr[1] % kMaxMacroOffsets]; 276 channel.macroStep = READ_BE_UINT16(¯oPtr[2]); 277 // TODO: MI does some weird stuff there. Figure out which varioables need to be set 278 return true; 279 280 case 0x16: // Return from Sub. 281 channel.macroOffset = channel.macroReturnOffset; 282 channel.macroStep = channel.macroReturnStep; 283 return true; 284 285 case 0x17: // set Period. Parameters: Period(W) 286 channel.portaDestPeriod = READ_BE_UINT16(¯oPtr[2]); 287 if (!channel.portaRate) { 288 channel.period = channel.portaDestPeriod; 289 Paula::setChannelPeriod( channel.paulaChannel, channel.portaDestPeriod); 290 } 291 return true; 292 293 case 0x18: // Sampleloop. Parameters: Offset from Samplestart(W) 294 // TODO: MI loads 24 bit, but thats useless? 295 temp = READ_BE_UINT16(¯oPtr[2]); 296 assert(!(temp & 1)); 297 channel.sampleStart += temp & 0xFFFE; 298 channel.sampleLen -= (temp / 2); 299 Paula::setChannelSampleStart(channel.paulaChannel, _resource.getSamplePtr(channel.sampleStart)); 300 Paula::setChannelSampleLen(channel.paulaChannel, channel.sampleLen); 301 return true; 302 303 case 0x19: // set one-shot Sample 304 channel.sampleStart = 0; 305 channel.sampleLen = 1; 306 Paula::setChannelSampleStart(channel.paulaChannel, _resource.getSamplePtr(0)); 307 Paula::setChannelSampleLen(channel.paulaChannel, 1); 308 return true; 309 310 case 0x1A: // Wait on DMA. Parameters: Cycles-1(W) to wait 311 channel.dmaCount = READ_BE_UINT16(¯oPtr[2]); 312 channel.countDmaInterrupts = true; 313 channel.macroRun = false; 314 Paula::setChannelDmaCount(channel.paulaChannel); 315 return channel.deferWait; 316 317 case 0x1B: // Random play. Parameters: macro/speed/mode 318 macroPtr[1]; 319 macroPtr[2]; 320 macroPtr[3]; 321 return true; 322 323 case 0x1C: // Splitkey. Parameters: key/macrostep(W) 324 macroPtr[1]; 325 READ_BE_UINT16(¯oPtr[2]); 326 return true; 327 328 case 0x1D: // Splitvolume. Parameters: volume/macrostep 329 macroPtr[1]; 330 READ_BE_UINT16(¯oPtr[2]); 331 return true; 332 333 case 0x1E: // Addvol+note. Parameters: note/CONST./volume 334 return true; 335 336 case 0x20: // Signal. Parameters: signalnumber/value 337 return true; 338 339 case 0x21: // Play macro. Parameters: macro/chan/detune 340 return true; 341 #if defined(TFMX_NOT_IMPLEMENTED) 342 // used by Gem`X according to the docs 343 case 0x22: // SID setbeg. Parameters: sample-startadress 344 return true; 345 case 0x23: // SID setlen. Parameters: buflen/sourcelen 346 return true; 347 case 0x24: // SID op3 ofs. Parameters: offset 348 return true; 349 case 0x25: // SID op3 frq. Parameters: speed/amplitude 350 return true; 351 case 0x26: // SID op2 ofs. Parameters: offset 352 return true; 353 case 0x27: // SID op2 frq. Parameters: speed/amplitude 354 return true; 355 case 0x28: // ID op1. Parameters: speed/amplitude/TC 356 return true; 357 case 0x29: // SID stop. Parameters: flag (1=clear all) 358 return true; 359 // 30-34 used by Carribean Disaster 360 #endif 361 default: 362 return channel.deferWait; 363 } 364 } 365 366 void Tfmx::advancePatterns() { 367 doTrackstep: 368 if (_playerCtx.pendingTrackstep) { 369 while (trackStep()) 370 ; 371 _playerCtx.pendingTrackstep = false; 372 } 373 374 for (int i = 0; i < kNumChannels; ++i) { 375 assert(!_playerCtx.pendingTrackstep); 376 377 const uint8 pattCmd = _patternCtx[i].command; 378 if (pattCmd < 0x90) { // execute Patternstep 379 // FIXME: 0x90 is very likely a bug, 0x80 would make more sense 380 assert(pattCmd < 0x80); 381 382 if (_patternCtx[i].wait == 0) { 383 // issue all Steps for this tick 384 while (patternStep(_patternCtx[i])) 385 ; 386 } else 387 --_patternCtx[i].wait; 388 389 } else if (pattCmd == 0xFE) { // Stop voice in pattern.expose 390 _patternCtx[i].command = 0xFF; 391 clearChannel(_channelCtx[_patternCtx[i].expose % kNumVoices]); 392 } // else this pattern-Channel is stopped 393 394 if (_playerCtx.pendingTrackstep) { 395 // we load the next Trackstep Command and then process all Channels again 396 // TODO Optionally disable looping 397 if (_trackCtx.startInd == _trackCtx.stopInd) 398 _trackCtx.posInd = _trackCtx.startInd; 399 else 400 ++_trackCtx.posInd; 401 goto doTrackstep; 402 } 403 } 404 } 405 406 FORCEINLINE bool Tfmx::patternStep(PatternContext &pattern) { 407 const byte *const patternPtr = (byte *)(_resource.getPatternPtr(pattern.offset) + pattern.step); 408 ++pattern.step; 409 410 debug("Pattern %04X +%d", pattern.offset, pattern.step-1); 411 displayPatternstep(patternPtr); 412 413 const byte pattCmd = patternPtr[0]; 414 415 if (pattCmd < 0xF0) { // Playnote 416 const byte flags = pattCmd >> 6; // 0-1 means note, 2 means wait, 3 means portamento 417 byte noteCmd = pattCmd + pattern.expose; 418 byte param3 = patternPtr[3]; 419 if (flags == 2) { 420 // Store wait-value in context and delete it the (note)command 421 pattern.wait = param3; 422 param3 = 0; 423 } 424 if (flags != 3) 425 noteCmd &= 0x3F; 426 noteCommand(noteCmd, patternPtr[1], patternPtr[2], param3); 427 return (flags != 2); 428 429 } else { // Patterncommand 430 switch (pattCmd & 0xF) { 431 case 0: // End Pattern + Next Trackstep 432 pattern.command = 0xFF; 433 _playerCtx.pendingTrackstep = true; 434 return false; 435 436 case 1: // Loop Pattern. Parameters: Loopcount, PatternStep(W) 437 if (pattern.loopCount != 0) { 438 if (pattern.loopCount == 0xFF) 439 pattern.loopCount = patternPtr[1]; 440 pattern.step = READ_BE_UINT16(&patternPtr[2]); 441 } 442 --pattern.loopCount; 443 return true; 444 445 case 2: // Jump. Parameters: PatternIndex, PatternStep(W) 446 pattern.offset = _patternOffset[patternPtr[1]]; 447 pattern.step = READ_BE_UINT16(&patternPtr[2]); 448 return true; 449 450 case 3: // Wait. Paramters: ticks to wait 451 pattern.wait = patternPtr[1]; 452 // TODO check for 0? 453 return false; 454 455 case 14: // Stop custompattern 456 // TODO ? 457 // FT 458 case 4: // Stop this pattern 459 pattern.command = 0xFF; 460 // TODO: try figuring out if this was the last Channel? 461 return false; 462 463 case 5: // Kup^-Set key up 464 case 6: // Vibrato 465 case 7: // Envelope 466 case 12: // Lock 467 noteCommand(pattCmd, patternPtr[1], patternPtr[2], patternPtr[3]); 468 return true; 469 470 case 8: // Subroutine 471 return true; 472 case 9: // Return from Subroutine 473 return true; 474 case 10: // fade master volume 475 return true; 476 477 case 11: { // play pattern. Parameters: patternCmd, channel, expose 478 PatternContext &target = _patternCtx[patternPtr[2] % kNumChannels]; 479 480 target.command = patternPtr[1]; 481 target.offset = _patternOffset[patternPtr[1] % kMaxPatternOffsets]; 482 target.expose = patternPtr[3]; 483 target.step = 0; 484 target.wait = 0; 485 target.loopCount = 0xFF; 486 } 487 return true; 488 case 13: // Cue 489 return true; 490 case 15: // NOP 491 return true; 492 } 493 } 494 495 return true; 496 } 497 498 bool Tfmx::trackStep() { 499 const uint16 *const trackData = _resource.getTrackPtr(_trackCtx.posInd); 500 501 debug( "TStep %04X", _trackCtx.posInd); 502 displayTrackstep(trackData); 503 504 if (trackData[0] != FROM_BE_16(0xEFFE)) { 505 // 8 commands for Patterns 506 for (int i = 0; i < 8; ++i) { 507 const uint patCmd = READ_BE_UINT16(&trackData[i]); 508 509 // First byte is pattern number 510 const uint patNum = (patCmd >> 8); 511 512 // if highest bit is set then keep previous pattern 513 if (patNum < 0x80) { 514 _patternCtx[i].command = (uint8)patNum; 515 _patternCtx[i].step = 0; 516 _patternCtx[i].wait = 0; 517 _patternCtx[i].loopCount = 0xFF; 518 _patternCtx[i].offset = _patternOffset[patNum]; 519 } 520 521 // second byte expose is always set 522 _patternCtx[i].expose = patCmd & 0xFF; 523 } 524 return false; 525 526 } else { 527 // 16 byte Trackstep Command 528 int temp; 529 switch (READ_BE_UINT16(&trackData[1])) { 530 case 0: // Stop Player. No Parameters 531 _playerCtx.enabled = 0; 532 stopPaula(); 533 return false; 534 535 case 1: // Branch/Loop section of tracksteps. Parameters: branch target, loopcount 536 // this depends on the current loopCounter 537 temp = _trackCtx.loopCount; 538 if (temp > 0) { 539 // if trackloop is positive, we decrease one loop and continue at start of loop 540 --_trackCtx.loopCount; 541 _trackCtx.posInd = READ_BE_UINT16(&trackData[2]); 542 } else if (temp == 0) { 543 // if trackloop is 0, we reached last iteration and continue with next trackstep 544 _trackCtx.loopCount = (uint16)-1; 545 } else /*if (_context.TrackLoop < 0)*/ { 546 // if TrackLoop is negative then we reached the loop instruction the first time 547 // and we setup the Loop 548 _trackCtx.posInd = READ_BE_UINT16(&trackData[2]); 549 _trackCtx.loopCount = READ_BE_UINT16(&trackData[3]); 550 } 551 break; 552 553 case 2: // Set Tempo. Parameters: tempo, divisor 554 _playerCtx.patternCount = _playerCtx.patternSkip = READ_BE_UINT16(&trackData[2]); // tempo 555 temp = READ_BE_UINT16(&trackData[3]); // divisor 556 557 if (!(temp & 0x8000) && (temp & 0x1FF)) 558 setInterruptFreqUnscaled(temp & 0x1FF); 559 break; 560 561 case 3: // Unknown, stops player aswell 562 case 4: // Fade 563 default: 564 debug("Unknown Command: %02X", READ_BE_UINT16(&trackData[1])); 565 // MI-Player handles this by stopping the player, we just continue 566 } 567 ++_trackCtx.posInd; 568 return true; 569 } 570 } 571 572 void Tfmx::noteCommand(const uint8 note, const uint8 param1, const uint8 param2, const uint8 param3) { 573 ChannelContext &channel = _channelCtx[param2 % kNumVoices]; 574 575 if (note == 0xFC) { // Lock 576 channel.sfxLocked = (param1 != 0); 577 channel.sfxLockTime = param3; // only 1 byte read! 578 return; 579 } 580 if (channel.sfxLocked) 581 return; 582 583 if (note < 0xC0) { // Play Note 584 channel.prevNote = channel.note; 585 channel.note = note; 586 channel.macroOffset = _macroOffset[param1 % kMaxMacroOffsets]; 587 channel.relVol = (param2 >> 4) & 0xF; 588 channel.fineTune = (int16)param3; 589 590 initMacroProgramm(channel); 591 channel.keyUp = true; 592 593 } else if (note < 0xF0) { // do that porta stuff 594 channel.portaReset = param1; 595 channel.portaTime = 1; 596 if (!channel.portaRate) 597 channel.portaPeriod = channel.portaDestPeriod; 598 channel.portaRate = param3; 599 600 channel.note = note & 0x3F; 601 channel.portaDestPeriod = noteIntervalls[channel.note]; 602 } else switch (note & 0xF) { // Command 603 case 5: // Key Up Release 604 channel.keyUp = false; 605 break; 606 case 6: // Vibratio 607 channel.vibReset = param1 & 0xFE; 608 channel.vibTime = param1 / 2; 609 channel.vibFlag = 1; 610 channel.vibOffset = 0; 611 break; 612 case 7: // Envelope 613 channel.envRate = param1; 614 channel.envReset = channel.envTime = (param2 >> 4) + 1; 615 channel.envEndVolume = param3; 616 break; 617 } 618 } 619 620 bool Tfmx::load(Common::SeekableReadStream &musicData, Common::SeekableReadStream &sampleData) { 621 bool res; 622 623 assert(0 == _resource._mdatData); 624 assert(0 == _resource._sampleData); 625 626 // TODO: Sanity checks if we have a valid TFMX-Module 627 // TODO: check for Stream-Errors (other than using asserts) 628 629 // 0x0000: 10 Bytes Header "TFMX-SONG " 630 // 0x000A: int16 ? 631 // 0x000C: int32 ? 632 musicData.read(_resource.header, 10); 633 _resource.headerFlags = musicData.readUint16BE(); 634 _resource.headerUnknown = musicData.readUint32BE(); 635 636 // This might affect timing 637 // bool isPalModule = (_resource.headerFlags & 2) != 0; 638 639 // 0x0010: 6*40 Textfield 640 musicData.read(_resource.textField, 6 * 40); 641 642 /* 0x0100: Songstart x 32*/ 643 for (int i = 0; i < kNumSubsongs; ++i) 644 _subsong[i].songstart = musicData.readUint16BE(); 645 646 /* 0x0140: Songend x 32*/ 647 for (int i = 0; i < kNumSubsongs; ++i) 648 _subsong[i].songend = musicData.readUint16BE(); 649 650 /* 0x0180: Tempo x 32*/ 651 for (int i = 0; i < kNumSubsongs; ++i) 652 _subsong[i].tempo = musicData.readUint16BE(); 653 654 /* 0x01c0: unused ? */ 655 musicData.skip(16); 656 657 /* 0x01d0: trackstep, pattern data p, macro data p */ 658 uint32 offTrackstep = musicData.readUint32BE(); 659 uint32 offPatternP = musicData.readUint32BE(); 660 uint32 offMacroP = musicData.readUint32BE(); 661 662 // This is how MI`s TFMX-Player tests for unpacked Modules. 663 if (offTrackstep == 0) { 664 offTrackstep = 0x600 + 0x200; 665 offPatternP = 0x200 + 0x200; 666 offMacroP = 0x400 + 0x200; 667 } 668 669 _resource._trackstepOffset = offTrackstep; 670 671 // Read in pattern starting offsets 672 musicData.seek(offPatternP); 673 for (int i = 0; i < kMaxPatternOffsets; ++i) 674 _patternOffset[i] = musicData.readUint32BE(); 675 676 res = musicData.err(); 677 assert(!res); 678 679 // Read in macro starting offsets 680 musicData.seek(offMacroP); 681 for (int i = 0; i < kMaxMacroOffsets; ++i) 682 _macroOffset[i] = musicData.readUint32BE(); 683 684 res = musicData.err(); 685 assert(!res); 686 687 // Read in whole mdat-file 688 int32 size = musicData.size(); 689 assert(size != -1); 690 // TODO: special routine if size = -1? 691 692 _resource._mdatData = new byte[size]; 693 assert(_resource._mdatData); 694 _resource._mdatLen = size; 695 musicData.seek(0); 696 musicData.read(_resource._mdatData, size); 697 698 res = musicData.err(); 699 assert(!res); 700 musicData.readByte(); 701 res = musicData.eos(); 702 assert(res); 703 704 705 // TODO: It would be possible to analyze the pointers and be able to 706 // seperate the file in trackstep, patterns and macro blocks 707 // Modules could do weird stuff like having those blocks mixed though. 708 // TODO: Analyze pointers if they are correct offsets, 709 // so that accesses can be unchecked later 710 711 // Read in whole sample-file 712 size = sampleData.size(); 713 assert(size >= 4); 714 assert(size != -1); 715 // TODO: special routine if size = -1? 716 717 _resource._sampleData = new byte[size]; 718 assert(_resource._sampleData); 719 _resource._sampleLen = size; 720 sampleData.seek(0); 721 sampleData.read(_resource._sampleData, size); 722 for (int i = 0; i < 4; ++i) 723 _resource._sampleData[i] = 0; 724 725 res = sampleData.err(); 726 assert(!res); 727 sampleData.readByte(); 728 res = sampleData.eos(); 729 assert(res); 730 731 return true; 732 } 733 734 735 void Tfmx::doMacro(int macro, int note) { 736 assert(0 <= macro && macro < kMaxMacroOffsets); 737 assert(0 <= note && note < 0xC0); 738 739 _playerCtx.song = -1; 740 _playerCtx.volume = 0x40; 741 742 const int channel = 0; 743 _channelCtx[channel].sfxLocked = false; 744 _channelCtx[channel].note = 0; 745 clearChannel(_channelCtx[channel]); 746 747 noteCommand(note, macro, channel, 0); 748 749 setTimerBaseValue(kPalCiaClock); 750 setInterruptFreqUnscaled(kPalDefaultCiaVal); 751 startPaula(); 752 } 753 754 void Tfmx::doSong(int songPos) { 755 assert(0 <= songPos && songPos < kNumSubsongs); 756 757 _playerCtx.song = (int8)songPos; 758 _playerCtx.volume = 0x40; 759 760 _trackCtx.loopCount = -1; 761 _trackCtx.startInd = _trackCtx.posInd = _subsong[songPos].songstart; 762 _trackCtx.stopInd = _subsong[songPos].songend; 763 764 const uint16 tempo = _subsong[songPos].tempo; 765 uint16 ciaIntervall; 766 767 if (tempo >= 0x10) { 768 ciaIntervall = (uint16)(kCiaBaseInterval / tempo); 769 _playerCtx.patternSkip = 0; 770 } else { 771 ciaIntervall = kPalDefaultCiaVal; 772 _playerCtx.patternSkip = tempo; 773 } 774 775 _playerCtx.patternCount = 0; 776 777 _playerCtx.pendingTrackstep = true; 778 779 for (int i = 0; i < kNumChannels; ++i) { 780 _patternCtx[i].command = 0xFF; 781 _patternCtx[i].expose = 0; 782 } 783 784 setTimerBaseValue(kPalCiaClock); 785 setInterruptFreqUnscaled(ciaIntervall); 786 startPaula(); 787 } 788 789 } -
sound/mods/paula.cpp
27 27 28 28 namespace Audio { 29 29 30 Paula::Paula(bool stereo, int rate, int interruptFreq) :30 Paula::Paula(bool stereo, int rate, uint interruptFreq) : 31 31 _stereo(stereo), _rate(rate), _intFreq(interruptFreq) { 32 32 33 33 clearVoices(); … … 36 36 _voice[2].panning = 191; 37 37 _voice[3].panning = 63; 38 38 39 if (_intFreq <= 0)39 if (_intFreq == 0) 40 40 _intFreq = _rate; 41 41 42 _curInt = _intFreq; 42 _curInt = 0; 43 _timerBase = 1; 43 44 _playing = false; 44 45 _end = true; 45 46 } … … 55 56 _voice[voice].length = 0; 56 57 _voice[voice].lengthRepeat = 0; 57 58 _voice[voice].period = 0; 59 _voice[voice].periodRepeat = 0; 58 60 _voice[voice].volume = 0; 59 61 _voice[voice].offset = 0; 62 _voice[voice].dmaCount = 0; 60 63 } 61 64 62 65 int Paula::readBuffer(int16 *buffer, const int numSamples) { … … 95 98 96 99 // Handle 'interrupts'. This gives subclasses the chance to adjust the channel data 97 100 // (e.g. insert new samples, do pitch bending, whatever). 98 if (_curInt == _intFreq) { 101 if (_curInt == 0) { 102 _curInt = _intFreq; 99 103 interrupt(); 100 _curInt = 0;101 104 } 102 105 103 106 // Compute how many samples to generate: at most the requested number of samples, 104 107 // of course, but we may stop earlier when an 'interrupt' is expected. 105 const int nSamples = MIN(samples, _intFreq -_curInt);108 const uint nSamples = MIN((uint)samples, _curInt); 106 109 107 110 // Loop over the four channels of the emulated Paula chip 108 111 for (int voice = 0; voice < NUM_VOICES; voice++) { … … 115 118 // the requested output sampling rate (typicall 44.1 kHz or 22.05 kHz) 116 119 // as well as the "period" of the channel we are processing right now, 117 120 // to compute the correct output 'rate'. 118 const double frequency = ( 7093789.2/ 2.0) / _voice[voice].period;121 const double frequency = (kPalSystemClock / 2.0) / _voice[voice].period; 119 122 frac_t rate = doubleToFrac(frequency / _rate); 120 123 121 124 // Cap the volume … … 139 142 mixBuffer<stereo>(p, data, offset, rate, end, _voice[voice].volume, _voice[voice].panning); 140 143 neededSamples -= end; 141 144 145 // TODO correctly handle setting registers after last 2 bytes red from channel 146 142 147 // If we have not yet generated enough samples, and looping is active: loop! 143 148 if (neededSamples > 0 && _voice[voice].lengthRepeat > 2) { 144 149 145 150 // At this point we know that we have used up all samples in the buffer, so reset it. 151 _voice[voice].dmaCount++; 146 152 _voice[voice].data = data = _voice[voice].dataRepeat; 147 153 _voice[voice].length = _voice[voice].lengthRepeat; 154 _voice[voice].period = _voice[voice].periodRepeat; 148 155 sLen = intToFrac(_voice[voice].length); 149 156 157 if (_voice[voice].period != _voice[voice].periodRepeat) { 158 _voice[voice].period = _voice[voice].periodRepeat; 159 const double frequency = (kPalSystemClock / 2.0) / _voice[voice].period; 160 rate = doubleToFrac(frequency / _rate); 161 162 } 163 150 164 // If the "rate" exceeds the sample rate, we would have to perform constant 151 165 // wrap arounds. So, apply the first step of the euclidean algorithm to 152 166 // achieve the same more efficiently: Take rate modulo sLen … … 169 183 170 184 } 171 185 buffer += _stereo ? nSamples * 2 : nSamples; 172 _curInt += nSamples;186 _curInt -= nSamples; 173 187 samples -= nSamples; 174 188 } 175 189 return numSamples; -
sound/mods/tfmx.h
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #ifndef SOUND_MODS_TFMX_H 27 #define SOUND_MODS_TFMX_H 28 29 #include "sound/mods/paula.h" 30 31 namespace { 32 #ifndef NDEBUG 33 inline void boundaryCheck(const void *bufStart, size_t bufLen, const void *address, size_t accessLen = 1) { 34 assert(bufStart <= address && (const byte *)address + accessLen <= (const byte *)bufStart + bufLen); 35 } 36 #else 37 inline void boundaryCheck(const void *, size_t, void *, size_t = 1) {} 38 #endif 39 } 40 41 namespace Audio { 42 43 class Tfmx : public Paula { 44 public: 45 Tfmx(int rate, bool stereo); 46 virtual ~Tfmx(); 47 48 void interrupt(); 49 void doSong(int songPos); 50 void doMacro(int macro, int note); 51 bool load(Common::SeekableReadStream &musicData, Common::SeekableReadStream &sampleData); 52 53 // Note: everythings public so the debug-Routines work. 54 // private: 55 enum {kPalDefaultCiaVal = 11822, kNtscDefaultCiaVal = 14320, kCiaBaseInterval = 0x1B51F8}; 56 enum {kNumVoices = 4, kNumChannels = 8, kNumSubsongs = 32, kMaxPatternOffsets = 128, kMaxMacroOffsets = 128}; 57 58 static const uint16 noteIntervalls[64]; 59 60 struct Resource { 61 uint32 _trackstepOffset; //!< Offset in mdat 62 63 byte *_mdatData; //!< Currently the whole mdat-File 64 byte *_sampleData; //!< Currently the whole sample-File 65 66 uint32 _mdatLen; 67 uint32 _sampleLen; 68 69 byte header[10]; 70 uint16 headerFlags; 71 uint32 headerUnknown; 72 char textField[6 * 40]; 73 74 const uint16 *getTrackPtr(uint16 trackstep = 0) { 75 uint16 *trackData = (uint16 *)(_mdatData + _trackstepOffset + 16 * trackstep); 76 77 boundaryCheck(_mdatData, _mdatLen, trackData, 16); 78 return trackData; 79 } 80 81 const uint32 *getPatternPtr(uint32 offset) { 82 uint32 *pattData = (uint32 *)(_mdatData + offset); 83 84 boundaryCheck(_mdatData, _mdatLen, pattData, 4); 85 return pattData; 86 } 87 88 const uint32 *getMacroPtr(uint32 offset) { 89 uint32 *macroData = (uint32 *)(_mdatData + offset); 90 91 boundaryCheck(_mdatData, _mdatLen, macroData, 4); 92 return macroData; 93 } 94 95 const int8 *getSamplePtr(const uint32 offset) { 96 int8 *sampleData = (int8 *)(_sampleData + offset); 97 98 boundaryCheck(_sampleData, _sampleLen, sampleData, 2); 99 return sampleData; 100 } 101 Resource() : _mdatData(), _mdatLen(), _sampleData(), _sampleLen() {} 102 103 ~Resource() { 104 delete[] _mdatData; 105 delete[] _sampleData; 106 } 107 } _resource; 108 109 uint32 _patternOffset[kMaxPatternOffsets]; //!< Offset in mdat 110 uint32 _macroOffset[kMaxMacroOffsets]; //!< Offset in mdat 111 112 struct Subsong { 113 uint16 songstart; //!< Index in Trackstep-Table 114 uint16 songend; //!< Last index in Trackstep-Table 115 uint16 tempo; 116 } _subsong[kNumSubsongs]; 117 118 struct ChannelContext { 119 byte paulaChannel; 120 121 uint16 macroWait; 122 uint32 macroOffset; 123 uint32 macroReturnOffset; 124 uint16 macroStep; 125 uint32 macroReturnStep; 126 uint8 macroLoopCount; 127 bool macroRun; 128 129 bool sfxLocked; 130 int16 sfxLockTime; 131 bool keyUp; 132 133 bool deferWait; 134 bool countDmaInterrupts; 135 uint16 dmaCount; 136 137 uint32 sampleStart; 138 uint16 sampleLen; 139 uint16 period; 140 141 int8 volume; 142 uint8 relVol; 143 uint8 note; 144 uint8 prevNote; 145 uint16 fineTune; 146 147 uint16 portaDestPeriod; 148 uint16 portaPeriod; 149 uint8 portaReset; 150 uint8 portaTime; 151 int16 portaRate; 152 153 uint8 envReset; 154 uint8 envTime; 155 uint8 envRate; 156 uint8 envEndVolume; 157 158 int16 vibOffset; 159 int8 vibWidth; 160 uint8 vibFlag; 161 uint8 vibReset; 162 uint8 vibTime; 163 164 uint8 addBeginTime; 165 uint8 addBeginReset; 166 int32 addBegin; 167 } _channelCtx[kNumVoices]; 168 169 struct PatternContext { 170 uint32 offset; // patternStart, Offset from mdat 171 uint32 savedOffset; // for subroutine calls 172 uint16 step; // distance from patternStart 173 uint16 savedStep; 174 175 uint8 command; 176 int8 expose; 177 uint8 loopCount; 178 uint8 wait; //!< how many ticks to wait before next Command 179 } _patternCtx[kNumChannels]; 180 181 struct TrackStepContext { 182 uint16 startInd; 183 uint16 stopInd; 184 uint16 posInd; 185 int16 loopCount; 186 } _trackCtx; 187 188 struct PlayerContext { 189 bool enabled; 190 // bool end; 191 int8 song; //!< >= 0 if Song is running (means process Patterns) 192 193 bool pendingTrackstep; 194 195 uint16 patternCount; 196 uint16 patternSkip; //!< skip that amount of CIA-Interrupts 197 198 int8 volume; //!< Master Volume 199 200 /* int8 fadeDest; 201 int8 fadeTime; 202 int8 fadeReset; 203 int8 fadeSlope; */ 204 } _playerCtx; 205 206 void initMacroProgramm(ChannelContext &channel) { 207 channel.macroStep = 0; 208 channel.macroWait = 0; 209 channel.macroRun = true; 210 channel.macroLoopCount = 0xFF; 211 channel.countDmaInterrupts = false; 212 } 213 214 void clearChannel(ChannelContext &channel) { 215 if (!channel.sfxLocked) { 216 channel.macroRun = 0; 217 channel.countDmaInterrupts = false; 218 Paula::disableChannel(channel.paulaChannel); 219 } 220 } 221 222 void effects(ChannelContext &channel); 223 FORCEINLINE bool macroStep(ChannelContext &channel); 224 void advancePatterns(); 225 FORCEINLINE bool patternStep(PatternContext &pattern); 226 bool trackStep(); 227 void noteCommand(uint8 note, uint8 param1, uint8 param2, uint8 param3); 228 229 }; 230 231 } 232 233 #endif -
sound/mods/soundfx.cpp
46 46 47 47 enum { 48 48 NUM_CHANNELS = 4, 49 NUM_INSTRUMENTS = 15, 50 CIA_FREQ = 715909 49 NUM_INSTRUMENTS = 15 51 50 }; 52 51 53 52 SoundFx(int rate, bool stereo); … … 75 74 uint16 _curPos; 76 75 uint8 _ordersTable[128]; 77 76 uint8 *_patternData; 78 int _eventsFreq;79 77 uint16 _effects[NUM_CHANNELS]; 80 78 }; 81 79 82 80 SoundFx::SoundFx(int rate, bool stereo) 83 81 : Paula(stereo, rate) { 82 setTimerBaseValue(kPalCiaClock); 84 83 _ticks = 0; 85 84 _delay = 0; 86 85 memset(_instruments, 0, sizeof(_instruments)); … … 89 88 _curPos = 0; 90 89 memset(_ordersTable, 0, sizeof(_ordersTable)); 91 90 _patternData = 0; 92 _eventsFreq = 0;93 91 memset(_effects, 0, sizeof(_effects)); 94 92 } 95 93 … … 167 165 _curPos = 0; 168 166 _curOrder = 0; 169 167 _ticks = 0; 170 _eventsFreq = CIA_FREQ / _delay; 171 setInterruptFreq(getRate() / _eventsFreq); 168 setInterruptFreqUnscaled(_delay); 172 169 startPaula(); 173 170 } 174 171 … … 252 249 } 253 250 254 251 void SoundFx::disablePaulaChannel(uint8 channel) { 255 setChannelPeriod(channel, 0);252 disableChannel(channel); 256 253 } 257 254 258 255 void SoundFx::setupPaulaChannel(uint8 channel, const int8 *data, uint16 len, uint16 repeatPos, uint16 repeatLen) { -
sound/mods/paula.h
40 40 class Paula : public AudioStream { 41 41 public: 42 42 static const int NUM_VOICES = 4; 43 enum { 44 kPalSystemClock = 7093790, 45 kNtscSystemClock = 7159090, 46 kPalCiaClock = kPalSystemClock / 10, 47 kNtscCiaClock = kNtscSystemClock / 10 48 }; 43 49 44 Paula(bool stereo = false, int rate = 44100, int interruptFreq = 0);50 Paula(bool stereo = false, int rate = 44100, uint interruptFreq = 0); 45 51 ~Paula(); 46 52 47 53 bool playing() const { return _playing; } 48 void setInterruptFreq(int freq) { _curInt = _intFreq = freq; } 54 void setTimerBaseValue( uint32 ticksPerSecond ) { _timerBase = ticksPerSecond; } 55 uint32 getTimerBaseValue() { return _timerBase; } 56 void setSingleInterrupt(uint sampleDelay) { assert(sampleDelay < _intFreq); _curInt = sampleDelay; } 57 void setSingleInterruptUnscaled(uint timerDelay) { 58 setSingleInterrupt((uint)(((double)timerDelay * getRate()) / _timerBase)); 59 } 60 void setInterruptFreq(uint sampleDelay) { _intFreq = sampleDelay; _curInt = 0; } 61 void setInterruptFreqUnscaled(uint timerDelay) { 62 setInterruptFreq((uint)(((double)timerDelay * getRate()) / _timerBase)); 63 } 49 64 void clearVoice(byte voice); 50 65 void clearVoices() { for (int i = 0; i < NUM_VOICES; ++i) clearVoice(i); } 51 66 void startPlay(void) { _playing = true; } … … 65 80 uint32 length; 66 81 uint32 lengthRepeat; 67 82 int16 period; 83 int16 periodRepeat; 68 84 byte volume; 69 85 frac_t offset; 70 86 byte panning; // For stereo mixing: 0 = far left, 255 = far right 87 int dmaCount; 71 88 }; 72 89 73 90 bool _end; … … 90 107 _voice[channel].panning = panning; 91 108 } 92 109 110 void disableChannel(byte channel) { 111 assert(channel < NUM_VOICES); 112 _voice[channel].data = 0; 113 } 114 115 void enableChannel(byte channel) { 116 assert(channel < NUM_VOICES); 117 Channel &ch = _voice[channel]; 118 ch.data = ch.dataRepeat; 119 ch.length = ch.lengthRepeat; 120 // actually first 2 bytes are dropped? 121 ch.offset = intToFrac(0); 122 ch.period = ch.periodRepeat; 123 } 124 93 125 void setChannelPeriod(byte channel, int16 period) { 94 126 assert(channel < NUM_VOICES); 95 _voice[channel].period = period;127 _voice[channel].periodRepeat = period; 96 128 } 97 129 98 130 void setChannelVolume(byte channel, byte volume) { … … 100 132 _voice[channel].volume = volume; 101 133 } 102 134 135 void setChannelSampleStart(byte channel, const int8 *data) { 136 assert(channel < NUM_VOICES); 137 _voice[channel].dataRepeat = data; 138 } 139 140 void setChannelSampleLen(byte channel, uint32 length) { 141 assert(channel < NUM_VOICES); 142 assert(length < 32768/2); 143 _voice[channel].lengthRepeat = 2 * length; 144 } 145 103 146 void setChannelData(uint8 channel, const int8 *data, const int8 *dataRepeat, uint32 length, uint32 lengthRepeat, int32 offset = 0) { 104 147 assert(channel < NUM_VOICES); 105 148 … … 110 153 assert(lengthRepeat < 32768); 111 154 112 155 Channel &ch = _voice[channel]; 113 ch.data = data; 156 157 ch.dataRepeat = data; 158 ch.lengthRepeat = length; 159 enableChannel(channel); 160 ch.offset = intToFrac(offset); 161 114 162 ch.dataRepeat = dataRepeat; 115 ch.length = length;116 163 ch.lengthRepeat = lengthRepeat; 117 ch.offset = intToFrac(offset);118 164 } 119 165 120 166 void setChannelOffset(byte channel, frac_t offset) { … … 128 174 return _voice[channel].offset; 129 175 } 130 176 177 int getChannelDmaCount(byte channel) { 178 assert(channel < NUM_VOICES); 179 return _voice[channel].dmaCount; 180 } 181 182 void setChannelDmaCount(byte channel, int dmaVal = 0) { 183 assert(channel < NUM_VOICES); 184 _voice[channel].dmaCount = dmaVal; 185 } 186 131 187 private: 132 188 Channel _voice[NUM_VOICES]; 133 189 134 190 const bool _stereo; 135 191 const int _rate; 136 int _intFreq; 137 int _curInt; 192 uint _intFreq; 193 uint _curInt; 194 uint32 _timerBase; 138 195 bool _playing; 139 196 140 197 template<bool stereo> -
common/scummsys.h
44 44 45 45 #ifdef _MSC_VER 46 46 #pragma once 47 #if (_MSC_VER < 1300) 47 48 #pragma warning( disable : 4068 ) // turn off "unknown pragma" warning 48 49 #pragma warning( disable : 4103 ) // turn off "alignement changed after including header" warning. We use pack-start.h file 49 50 #pragma warning( disable : 4244 ) // turn off "conversion type" warning … … 54 55 #pragma warning( disable : 4610 ) // turn off "struct can never be instantiated - user defined constructor required" 55 56 #pragma warning( disable : 4701 ) // turn off "potentially uninitialized variables" warning 56 57 #pragma warning( disable : 4800 ) // turn off "forcing value to bool 'true' or 'false' (performance warning)" 58 #endif 57 59 58 60 // vsnprintf is already defined in Visual Studio 2008 59 61 #if (_MSC_VER < 1500) -
Makefile.common
27 27 graphics \ 28 28 sound \ 29 29 backends \ 30 tfmx \ 30 31 common \ 31 32 32 33 ifdef USE_MT32EMU -
base/main.cpp
295 295 296 296 } 297 297 298 #if 1 299 void tfmxmain(int argc, const char * const argv[]); 300 298 301 extern "C" int scummvm_main(int argc, const char * const argv[]) { 299 302 Common::String specialDebug; 300 303 Common::String command; … … 306 309 // Register config manager defaults 307 310 Base::registerDefaults(); 308 311 312 // Load the plugins. 313 PluginManager::instance().loadPlugins(); 314 315 // Init the backend. Must take place after all config data (including 316 // the command line params) was read. 317 system.initBackend(); 318 319 // pass control to my own main-function, including arguments 320 tfmxmain(argc,argv); 321 322 PluginManager::instance().unloadPlugins(); 323 PluginManager::destroy(); 324 Common::ConfigManager::destroy(); 325 Common::SearchManager::destroy(); 326 GUI::GuiManager::destroy(); 327 328 return 0; 329 } 330 #else 331 332 extern "C" int scummvm_main(int argc, const char * const argv[]) { 333 Common::String specialDebug; 334 Common::String command; 335 336 // Verify that the backend has been initialized (i.e. g_system has been set). 337 assert(g_system); 338 OSystem &system = *g_system; 339 340 // Register config manager defaults 341 Base::registerDefaults(); 342 309 343 // Parse the command line 310 344 Common::StringMap settings; 311 345 command = Base::parseCommandLine(settings, argc, argv); … … 415 449 416 450 return 0; 417 451 } 452 453 #endif -
tfmx/tfmxdebug.cpp
1 #include "common/scummsys.h" 2 #include "common/endian.h" 3 #include "common/debug.h" 4 #include "common/stream.h" 5 #include "common/util.h" 6 7 #include "sound/mods/tfmx.h" 8 9 #include "tfmx/tfmxdebug.h" 10 11 12 const char *pattcmds[]={ 13 "End --Next track step--", 14 "Loop[count / step.w]", 15 "Cont[patternno./ step.w]", 16 "Wait[count 00-FF--------", 17 "Stop--Stop this pattern-", 18 "Kup^-Set key up/channel]", 19 "Vibr[speed / rate.b]", 20 "Enve[speed /endvolume.b]", 21 "GsPt[patternno./ step.w]", 22 "RoPt-Return old pattern-", 23 "Fade[speed /endvolume.b]", 24 "PPat[patt./track+transp]", 25 "Lock---------ch./time.b]", 26 "----------No entry------", 27 "Stop-Stop custompattern-", 28 "NOP!-no operation-------" 29 }; 30 31 const char *macrocmds[]={ 32 "DMAoff+Resetxx/xx/xx flag/addset/vol ", 33 "DMAon (start sample at selected begin) ", 34 "SetBegin xxxxxx sample-startadress", 35 "SetLen ..xxxx sample-length ", 36 "Wait ..xxxx count (VBI''s) ", 37 "Loop xx/xxxx count/step ", 38 "Cont xx/xxxx macro-number/step ", 39 "-------------STOP----------------------", 40 "AddNote xx/xxxx note/detune ", 41 "SetNote xx/xxxx note/detune ", 42 "Reset Vibrato-Portamento-Envelope ", 43 "Portamento xx/../xx count/speed ", 44 "Vibrato xx/../xx speed/intensity ", 45 "AddVolume ....xx volume 00-3F ", 46 "SetVolume ....xx volume 00-3F ", 47 "Envelope xx/xx/xx speed/count/endvol", 48 "Loop key up xx/xxxx count/step ", 49 "AddBegin xx/xxxx count/add to start", 50 "AddLen ..xxxx add to sample-len ", 51 "DMAoff stop sample but no clear ", 52 "Wait key up ....xx count (VBI''s) ", 53 "Go submacro xx/xxxx macro-number/step ", 54 "--------Return to old macro------------", 55 "Setperiod ..xxxx DMA period ", 56 "Sampleloop ..xxxx relative adress ", 57 "-------Set one shot sample-------------", 58 "Wait on DMA ..xxxx count (Wavecycles)", 59 "Random play xx/xx/xx macro/speed/mode ", 60 "Splitkey xx/xxxx key/macrostep ", 61 "Splitvolume xx/xxxx volume/macrostep ", 62 "Addvol+note xx/fe/xx note/CONST./volume", 63 "SetPrevNote xx/xxxx note/detune ", 64 "Signal xx/xxxx signalnumber/value", 65 "Play macro xx/.x/xx macro/chan/detune ", 66 "SID setbeg xxxxxx sample-startadress", 67 "SID setlen xx/xxxx buflen/sourcelen ", 68 "SID op3 ofs xxxxxx offset ", 69 "SID op3 frq xx/xxxx speed/amplitude ", 70 "SID op2 ofs xxxxxx offset ", 71 "SID op2 frq xx/xxxx speed/amplitude ", 72 "SID op1 xx/xx/xx speed/amplitude/TC", 73 "SID stop xx.... flag (1=clear all)" 74 }; 75 76 const char *const trackstepFmt[] = { 77 "---Stop Player----", 78 "Loop step/count ", 79 "Tempo tempo/ciaDiv", 80 "Timeshare ?/? ", 81 "Fade start/end " 82 "Unknown (cc) " 83 }; 84 85 void displayPatternstep(const void *const vptr) { 86 const byte *const patData = (const byte *const)vptr; 87 88 const byte command = patData[0]; 89 90 if (command < 0xF0) { // Playnote 91 const byte flags = command >> 6; // 0-1 means note+detune, 2 means wait, 3 means portamento? 92 char *flagsSt[] = {"Note ", "Note ", "Wait ", "Porta"}; 93 debug("%s %02X%02X%02X%02X", flagsSt[flags], patData[0], patData[1], patData[2], patData[3]); 94 } else { 95 debug("%s %02X%02X%02X",pattcmds[command&0xF], patData[1], patData[2], patData[3]); 96 } 97 98 } 99 100 void displayTrackstep(const void *const vptr) { 101 const uint16 *const trackData = (const uint16 *const)vptr; 102 103 if (trackData[0] == FROM_BE_16(0xEFFE)) { 104 // 16 byte Trackstep Command 105 const uint16 command = READ_BE_UINT16(&trackData[1]); 106 const uint16 param1 = READ_BE_UINT16(&trackData[2]); 107 const uint16 param2 = READ_BE_UINT16(&trackData[3]); 108 109 110 if (command >= ARRAYSIZE(trackstepFmt)) 111 debug("Unknown (%04X) : %04X %04X", command, param1, param2); 112 else 113 debug("%s: %04X %04X", trackstepFmt[command], param1, param2); 114 } else { 115 const byte *const ptr = (const byte *const)vptr; 116 // 8 commands for Patterns 117 debug("%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X", 118 ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], 119 ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); 120 } 121 } 122 123 void displayMacroStep(const void *const vptr) { 124 const byte *const macroData = (const byte *const)vptr; 125 if (macroData[0] < ARRAYSIZE(macrocmds)) 126 debug("%s %02X%02X%02X", macrocmds[macroData[0]], macroData[1], macroData[2], macroData[3]); 127 else 128 debug("Unkown Macro #%02X %02X%02X%02X", macroData[0], macroData[1], macroData[2], macroData[3]); 129 } 130 131 void dumpTracksteps(Audio::Tfmx &player, uint16 first, uint16 last) { 132 for ( ; first <= last; ++first) { 133 displayTrackstep(player._resource.getTrackPtr(first)); 134 } 135 } 136 137 void dumpTrackstepsBySong(Audio::Tfmx &player, int song) { 138 dumpTracksteps(player, player._subsong[song].songstart, player._subsong[song].songend); 139 } 140 141 void dumpMacro(Audio::Tfmx &player, uint16 macroIndex, uint16 len, uint16 start) { 142 const uint32 * macroPtr = player._resource.getMacroPtr(player._macroOffset[macroIndex]); 143 bool untilMacroStop = (len == 0); 144 while (len--) { 145 displayMacroStep(macroPtr++); 146 } 147 while (untilMacroStop) { 148 untilMacroStop = *(const byte *)macroPtr != 7; 149 displayMacroStep(macroPtr++); 150 } 151 } 152 153 void dumpPattern(Audio::Tfmx &player, uint16 pattIndex, uint16 len, uint16 start) { 154 const uint32 * pattPtr = player._resource.getPatternPtr(player._patternOffset[pattIndex]); 155 if (len == 0) 156 len = (player._patternOffset[pattIndex+1] - player._patternOffset[pattIndex])/4; 157 bool untilMacroStop = (len == 0); 158 while (len--) { 159 displayPatternstep(pattPtr++); 160 } 161 while (untilMacroStop) { 162 byte cmd = *(const byte *)pattPtr; 163 untilMacroStop = cmd != 0 && cmd != 4; 164 displayPatternstep(pattPtr++); 165 } 166 } 167 168 void countAllMacros1(Audio::Tfmx &player, uint16 macroIndex, int *list) { 169 const uint32 * macroPtr = player._resource.getMacroPtr(player._macroOffset[macroIndex]); 170 bool untilMacroStop = true; 171 while (untilMacroStop) { 172 const int type = *(const byte *)macroPtr++; 173 untilMacroStop = type != 7; 174 list[type]++; 175 } 176 } 177 178 void countAllMacros(Audio::Tfmx &player) { 179 int list[256] = {0}; 180 for (int i = 0; i < 128; ++i) 181 countAllMacros1(player, i, list); 182 byte fakeMacro[4] = {0}; 183 for (int i = 0; i < 256; ++i) { 184 fakeMacro[0] = (byte)i; 185 if (list[i] > 0) 186 displayMacroStep(fakeMacro); 187 } 188 189 } -
tfmx/module.mk
1 MODULE := tfmx 2 3 MODULE_OBJS := \ 4 tfmxplayer.o \ 5 tfmxdebug.o 6 7 # Include common rules 8 include $(srcdir)/rules.mk -
tfmx/tfmxdebug.h
1 #ifndef TFMXDEBUG_H 2 3 void displayTrackstep(const void *const vptr); 4 void displayPatternstep(const void *const vptr); 5 void displayMacroStep(const void *const vptr); 6 void dumpTracksteps(Audio::Tfmx &player, uint16 first, uint16 last); 7 void dumpTrackstepsBySong(Audio::Tfmx &player, int song); 8 void dumpMacro(Audio::Tfmx &player, uint16 macroIndex, uint16 len = 0, uint16 start = 0); 9 void dumpPattern(Audio::Tfmx &player, uint16 pattIndex, uint16 len = 0, uint16 start = 0); 10 void countAllMacros(Audio::Tfmx &player); 11 12 #endif // TFMXDEBUG_H 13 No newline at end of file -
tfmx/tfmxplayer.cpp
1 #include "common/scummsys.h" 2 #include "common/system.h" 3 #include "common/stream.h" 4 #include "common/file.h" 5 #include "common/fs.h" 6 #include "common/endian.h" 7 #include "common/debug.h" 8 9 #include "sound/mixer.h" 10 #include "sound/mods/protracker.h" 11 #include "sound/mods/tfmx.h" 12 13 #include "tfmx/tfmxdebug.h" 14 15 #define FILEDIR "" 16 17 using namespace Common; 18 19 void simplePlaybacktest(int argc, const char *const argv[]) { 20 const char *modFilename = "mod.protracker"; 21 if (argc == 2) 22 modFilename = argv[1]; 23 24 25 // get Mixer, assume this never fails 26 Audio::Mixer *mixer = g_system->getMixer(); 27 28 FSNode fileDir(FILEDIR); 29 debug( "searching for Files in Directory: %s", fileDir.getPath().c_str()); 30 31 FSNode musicFile = fileDir.getChild(modFilename); 32 33 SeekableReadStream *fileIn = musicFile.createReadStream(); 34 if (0 == fileIn) { 35 debug( "cant open File %s", musicFile.getName().c_str()); 36 return; 37 } 38 39 Audio::AudioStream *stream = Audio::makeProtrackerStream(fileIn); 40 delete fileIn; 41 if (0 == stream) { 42 debug( "cant open File %s as Protacker-Stream", musicFile.getName().c_str()); 43 return; 44 } 45 46 Audio::SoundHandle soundH; 47 48 mixer->playInputStream(Audio::Mixer::kMusicSoundType, &soundH, stream); 49 while (mixer->isSoundHandleActive(soundH)) 50 g_system->delayMillis(1000); 51 52 53 //mixer->stopAll(); 54 } 55 56 #define MUSICFILE "mdat.monkey" 57 #define SAMPLEFILE "smpl.monkey" 58 59 //#define MUSICFILE "mdat.tworld_1" 60 //#define SAMPLEFILE "smpl.tworld_1" 61 Audio::Tfmx *loadTfmxfile(const char *mdatName, const char *sampleName) { 62 FSNode fileDir(FILEDIR); 63 FSNode musicNode = fileDir.getChild(mdatName); 64 FSNode sampleNode = fileDir.getChild(sampleName); 65 SeekableReadStream *musicIn = musicNode.createReadStream(); 66 if (0 == musicIn) { 67 debug("Couldnt load file %s", MUSICFILE); 68 return 0; 69 } 70 71 SeekableReadStream *sampleIn = sampleNode.createReadStream(); 72 if (0 == sampleIn) { 73 debug("Couldnt load file %s", SAMPLEFILE); 74 delete musicIn; 75 return 0; 76 } 77 78 Audio::Tfmx *player = new Audio::Tfmx(44100, true); 79 player->load(*musicIn, *sampleIn); 80 delete musicIn; 81 delete sampleIn; 82 83 return player; 84 } 85 86 void runFlac(int chan, int bits, int sr, const char *fileName); 87 88 void tfmxmain(const int argc, const char *const argv[]) { 89 debug("Started Scumm&VM"); 90 debug("Sound celebrating utility for monkey melodies & Various Malfunctions"); 91 debug(""); 92 93 //simplePlaybacktest(argc, argv); 94 95 Audio::Tfmx *player = loadTfmxfile(MUSICFILE, SAMPLEFILE); 96 if (!player) { 97 debug("couldnt create TFMX-Player"); 98 return; 99 } 100 101 int i = 1; 102 int playflag = 0; 103 104 105 if (i < argc && argv[i][0] == '-' + strlen(argv[i]) == 2) { 106 int param; 107 switch (argv[i++][1]) { 108 case 'm': 109 if (i < argc) { 110 param = atoi(argv[i]); 111 debug( "play Macro %02X", param); 112 dumpMacro(*player, 0x11); 113 playflag = 1; 114 player->doMacro(param,0x40); 115 ++i; 116 } 117 break; 118 case 's': 119 if (i < argc) { 120 param = atoi(argv[i]); 121 debug( "play Song %02X", param); 122 dumpTrackstepsBySong(*player, param); 123 playflag = 1; 124 player->doSong(param); 125 ++i; 126 } 127 } 128 } 129 130 if (!playflag) { 131 playflag = 1; 132 // player->doMacro(0x18,0x40); 133 player->doSong(4); 134 dumpTrackstepsBySong(*player, 4); 135 } 136 137 138 139 140 #if 0 141 int16 buf[2 * 1024]; 142 143 while( true) 144 player->readBuffer(buf, ARRAYSIZE(buf)); 145 146 #endif 147 int maxsecs = 3*60; 148 if (playflag == 1) { 149 // get Mixer, assume this never fails 150 Audio::Mixer *mixer = g_system->getMixer(); 151 152 Audio::SoundHandle soundH; 153 154 mixer->playInputStream(Audio::Mixer::kMusicSoundType, &soundH, player); 155 while (mixer->isSoundHandleActive(soundH) && --maxsecs) 156 g_system->delayMillis(1000); 157 // player->AllOff(); 158 159 while (mixer->isSoundHandleActive(soundH)); 160 161 mixer->stopHandle(soundH); 162 player = 0; 163 } 164 165 if (playflag == 2) { 166 Common::FSNode file("out.raw"); 167 WriteStream *wav = file.createWriteStream(); 168 int16 buf[2 * 1024]; 169 int32 maxsamples = (maxsecs <= 0) ? 0 : maxsecs * 44100; 170 while (!player->endOfData() && maxsamples > 0) { 171 int read = player->readBuffer(buf, ARRAYSIZE(buf)); 172 wav->write(buf, read * 2); 173 maxsamples -= read/2; 174 } 175 delete wav; 176 177 runFlac(2, 16, 44100, "out.raw"); 178 } 179 180 181 printf("\npress a key"); 182 getc(stdin); 183 184 delete player; 185 } 186 187 void runFlac( int chan, int bits, int sr, const char *fileName) { 188 const char *format = "flac --endian=" 189 #ifdef SCUMM_BIG_ENDIAN 190 "big" 191 #else 192 "little" 193 #endif 194 " --channels=%d -f --bps=%d --sample-rate=%d --sign=signed --force-raw-format %s"; 195 char cmd[1024]; 196 sprintf(cmd, format, chan, bits, sr, fileName); 197 debug(cmd); 198 system(cmd); 199 } 200 201