aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/vm.cpp
AgeCommit message (Collapse)Author
2011-05-13SCI: Don't include several debug tables when REDUCE_MEMORY_USAGE is definedmd5
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-03-28SCI: Fix Compilation with --enable-release set.D G Turner
2011-03-28SCI: Renamed restAdjust to r_rest (like r_acc and r_prev)md5
2011-03-27SCI: Moved some debug functions from vm.cpp to scriptdebug.cppmd5
2011-03-26SCI: Removed the READ_VAR and WRITE_VAR wrappersmd5
2011-03-26SCI: Refactored and cleaned up the VM call stack handling codemd5
- Removed the CallsStruct intermediate stack. Calls are inserted directly in the execution stack - Added a constructor for the ExecStack struct and removed add_exec_stack_varselector() and add_exec_stack_entry()
2011-03-25SCI: Reordered some functionsmd5
2011-03-25SCI: Cleaned up the BreakpointType enum and documented the bpe commandmd5
2011-03-25SCI: Cleaned up send_selector()md5
- Placed all of the associated debug code in a separate function - Unified debug output
2011-03-04SCI: Improved debug output of validate_property()md5
2011-02-28SCI: Fix crash with hunk refs in logkernel outputWillem Jan Palenstijn
2011-02-22SCI: Added code to aid in detecting infinite loops in scriptsmd5
When the ABORT_ON_INFINITE_LOOP define is defined in vm.cpp, the VM will now abort in cases where a conditional statement is followed by an unconditional jump (which will most likely lead to an infinite loop). Aids in detecting infinite loop bugs such as #3040722.
2011-02-21SCI: Fixed script bug #3040722 in QFG3md5
2011-02-21SCI: Added a custom modulo reg_t operatormd5
This version only handles signed integers. The modulo operator was changed in SCI0 late (Iceman, and perhaps all SCI0 0.000.685 and later) so that it handles negative numbers as well. We need to see if there really is a need to keep two different modulo operators (which will only be necessary if any SCI0 game asks for the modulo of a negative number by mistake, or a number larger than 32767). Thus, error out in such a case for SCI0, so that this can be investigated properly
2011-02-20SCI: Moved the gcCountdown() code inside the op_callk case, since that's the ↵md5
only place where it's used
2011-02-19SCI: Refactored the reg_t related operations and comparisonsmd5
This refactoring reduces a lot of code duplication, allows for better control, makes the code more readable and allows us to remove a lot of now unneeded workarounds
2011-02-15SCI: Removed several redundant helper functionsmd5
Removed validate_arithmetic(), signed_validate_arithmetic(), validate_unsignedInteger() and validate_signedInteger()
2011-01-15SCI: cleaned up checkSelectorBreakpoint()Filippos Karapetis
svn-id: r55250
2011-01-07SCI: Moved the handling of the op_line debug opcode inside ↵Filippos Karapetis
readPMachineInstruction() The handling has been moved inside readPMachineInstruction(), instead of run_vm(), as a lot of parts of the code depend on this function handling all opcodes correctly (e.g. the script dissassembler, the features class, find_callk etc) svn-id: r55154
2011-01-01SCI: debugC calls no longer require a debug level of 2 to show outputFilippos Karapetis
svn-id: r55086
2010-12-22SCI: Sync in-game speech/subtitle options with the ones from the ScummVM GUI.Filippos Karapetis
- Obtain speech/subtitle options from the ScummVM GUI and set them in CD games. - Also, set simultaneous speech and subtitles in games that support them (currently SQ4 CD and Freddy Pharkas CD). There is no GUI option for setting simultaneous speech and subtitles in Freddy Pharkas CD, so this is the only current way of achieving this (unless the text speed slider inside the Freddy Pharkas options window is repurposed - but that will require extensive changes) svn-id: r55005
2010-11-21SCI: Removed incorrect pointer arithmetic support for SCI2 stringsFilippos Karapetis
There was never pointer arithmetic support in SCI2 and newer games svn-id: r54400
2010-11-19SCI: Only handle seg_type_string if ENABLE_SCI32 is definedLars Persson
svn-id: r54376
2010-11-19SCI3: Implement new opcode 0x4c.Lars Skovlund
svn-id: r54370
2010-11-19SCI: Added pointer arithmetic support for SCI2 stringsFilippos Karapetis
svn-id: r54365
2010-11-19SCI: Moved the Object class in a separate fileFilippos Karapetis
svn-id: r54361
2010-11-18SCI3: Fix new opcode 0x4eLars Skovlund
svn-id: r54347
2010-11-18SCI3: Added another previously unused opcode (0x27 / 0x4e)Filippos Karapetis
svn-id: r54341
2010-11-18SCI3: Add proper support for the calle instructionLars Skovlund
svn-id: r54327
2010-11-17SCI: Code formattingFilippos Karapetis
svn-id: r54305
2010-11-17SCI3: Implement opcode to retrieve the info selector.Lars Skovlund
svn-id: r54303
2010-11-17SCI3: relocate operand of the lofsa opcodeLars Skovlund
svn-id: r54301
2010-11-17Adapt SCI property instructions (pToa etc.) to SCI3Lars Skovlund
svn-id: r54296
2010-11-17SCI: lofsa/lofss functionality for SCI3Filippos Karapetis
- Updated detectLofsType() for SCI3 - Cleaned up op_lofsa and op_lofss and updated them for SCI3 svn-id: r54293
2010-11-17SCI: Added some SCI3 selector related informationFilippos Karapetis
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in SCI3 scripts, as it's no longer used in SCI3 - Added information about which of the selectors are missing in SCI3. There are some more which are missing, but aren't used in SCI2-SCI3 anyway - Some styling svn-id: r54291
2010-11-09SCI: Added comments for rev. 54150 and fixed a typoFilippos Karapetis
svn-id: r54153
2010-11-09treat pushSelf opcode with low bit set as pushSelf (in fangames only, ↵Lars Skovlund
currently). Fixes bug #3038686. (SCI Fanmade - Circus Quest: Crash when starting). svn-id: r54150
2010-11-02SCI: Remove any use of printfMax Horn
svn-id: r54037
2010-11-01COMMON: Rename String::printf() to String::format()Max Horn
This is a first step towards getting rid of all uses of regular printf, fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase. The name format() reflects the purpose of the function, and parallels String.format() in Java, boost::format, and others. svn-id: r54004
2010-10-07SCI: Still show warning for uninit. reads in release modeWillem Jan Palenstijn
svn-id: r53047
2010-10-07SCI: unknown valgrind cases->fake 0 when officialMartin Kiewitz
we will fake 0 instead of error()ing out in official releases, when an uninitialized temp is read is supposed to get backported svn-id: r53046
2010-09-09SCI: Changed the error message when execute_method() references an invalid ↵Filippos Karapetis
export svn-id: r52653
2010-09-02SCI: Fixed compilation when VM_DEBUG_SEND is enabledFilippos Karapetis
svn-id: r52498
2010-09-02SCI: fixing debug output for bpxMartin Kiewitz
svn-id: r52491
2010-09-02SCI: adding "bpr" and "bpw" debug commandsMartin Kiewitz
"bpr" breakpoint on reading of selectors "bpw" breakpoint of writing of selectors "bpx" is now breakpoint on executing of selectors only svn-id: r52490
2010-09-02JANITORIAL: Remove extra semi-colons.Torbjörn Andersson
svn-id: r52489
2010-08-29SCI: Throttle the invocations of Engine::shouldQuit()Filippos Karapetis
SCI constantly invoked Engine::shouldQuit(), which in turn called 2 virtual functions. This added a significant overhead, as this was called constantly without any throttling whatsoever. Now, the invocation of shouldQuit() is throttled to be on each frame update (i.e. at a rate of 60fps). Thanks to wjp for profiling this. svn-id: r52431
2010-08-25SCI: Make assert stricter.Willem Jan Palenstijn
(Thanks to fuzzie.) svn-id: r52376