Commit Graph

333 Commits

Author SHA1 Message Date
Filippos Karapetis
2b87eebdb0 SCI: Moved the handling of the op_line debug opcode inside 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-07 20:24:49 +00:00
Filippos Karapetis
6b250f8c9b SCI2/2.1: Improvements to the find_callk debug function, and some kernel function updates
- Improved the find_callk function to properly find the end of script objects, by
monitoring jump calls
- Added three extra special calls to find_callk: find kernel function calls to dummy,
unused and unmapped kernel functions
- Updated several kernel function calls because of the above functionality
- The above functionality has also uncovered a VM bug in some SCI2/2.1 opcode - added 
a FIXME for it

svn-id: r55151
2011-01-07 18:25:38 +00:00
Filippos Karapetis
a6994413ea SCI2.1: Show the kernel table used in the "version" console command
Transitive SCI2.1 games (e.g. QFG4CD and PQ4CD, as well as GK2 demo) used a SCI2 table,
with some added functions. If a SCI2.1 game is loaded, show what kernel table it uses

svn-id: r55136
2011-01-07 00:05:14 +00:00
Filippos Karapetis
430dc10c49 SCI: VMD video related changes
- VMD videos are now properly started from the associated play subop of the 
kPlayVMD kernel call, and are now properly positioned on screen, and doubled
only if the games require them to be
- Added an enum for VMD video flags

svn-id: r55003
2010-12-22 13:51:35 +00:00
Filippos Karapetis
de2ef2edc0 SCI: Removed the system strings code and replaced it with a much more simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
2010-12-07 00:47:05 +00:00
Filippos Karapetis
16006c78f5 SCI: Fixed a bug in the show_instruments console command
svn-id: r54477
2010-11-25 15:59:30 +00:00
Filippos Karapetis
7fc171e3bc SCI: Some slight changes to get the "find_callk" console command working in KQ5
- Ignore invalid object in KQ5 script 784
- Script 980 looks to be an unused leftover, as its object contain references to
classes placed in script 988, which is missing

svn-id: r54455
2010-11-24 11:57:11 +00:00
Filippos Karapetis
788598a689 SCI: Fixed the "version" console command in SCI1.1 and earlier games
svn-id: r54406
2010-11-21 10:31:02 +00:00
Filippos Karapetis
ac7c488c7c SCI: kArray wasn't changed in late SCI2.1/SCI3 games (thanks to waltervn)
svn-id: r54402
2010-11-21 02:06:20 +00:00
Filippos Karapetis
97d31c6ac6 SCI: Added the kString/kArray type in the "version" console command
svn-id: r54401
2010-11-21 00:58:06 +00:00
Filippos Karapetis
ba6de1bcdf SCI: Added sanity checks for SCI3 scripts bigger than 64KB
- Extended the "verify_scripts" console command for SCI3 scripts
- Added a check for such large scripts when scripts are loaded, with
an error for now, till a mechanism to support such scripts with a
16-bit addressing scheme is in place (e.g. overlaying, or splitting
scripts). Either way, such scripts should span over more than one segment

svn-id: r54304
2010-11-17 20:46:59 +00:00
Filippos Karapetis
e4c967a301 SCI: Added the SCI3 equivalent of initialiseObjects(), from a patch by lskovlun
svn-id: r54281
2010-11-17 09:10:43 +00:00
Filippos Karapetis
0470e47145 SCI: The heap was a separate resource in SCI1.1 - SCI2.1 games only. It was later
merged into the script files again in SCI3

svn-id: r54279
2010-11-17 08:30:08 +00:00
Filippos Karapetis
553d571c50 SCI: Specify that -1 means "all maps" when listing base36-encoded resources
svn-id: r54278
2010-11-17 08:18:56 +00:00
Filippos Karapetis
9d318497f7 SCI: Unified the functionality and parameters of the disasm and disasm_addr commands
svn-id: r54276
2010-11-17 08:05:11 +00:00
Filippos Karapetis
c2d9c1b06b SCI: Added the ability to display original script bytecode in the "disasm" console command
svn-id: r54275
2010-11-17 00:05:09 +00:00
Filippos Karapetis
8b14137c07 SCI: Some video related changes
- Now playVideo() is used when playing videos from the console (reducing
code duplication)
- Added support for 16bpp scaling in scale2x, so that the 16-bit color
Duck videos are scaled correctly

svn-id: r54210
2010-11-11 19:22:56 +00:00
Matthew Hoops
da33617061 SCI: Allow duck videos to be played from the console
svn-id: r54195
2010-11-11 05:18:40 +00:00
Matthew Hoops
dc02bd2b4e SCI: Add missing new line
svn-id: r54189
2010-11-10 14:40:23 +00:00
Max Horn
ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00
Max Horn
a984fb17c2 GUI: Add GCC_PRINTF to GUI::Debugger::DebugPrintf & fix resulting warnings
svn-id: r54007
2010-11-01 16:03:35 +00:00
Filippos Karapetis
dca3c8d8bf SCI: Play time related changes
- Added support for savegame play time
- Removed obsolete variables for calculating the play time (EngineState::gameStartTime and Console::_enterTime)
- Renamed some variables to camelCase

svn-id: r53974
2010-10-31 01:45:24 +00:00
Filippos Karapetis
d7f8fc108e SCI: Updated help page on the new console command "map_instrument"
svn-id: r53910
2010-10-28 22:58:39 +00:00
Filippos Karapetis
408d0e6c5f SCI: Fixed typo
svn-id: r53905
2010-10-28 15:33:28 +00:00
Filippos Karapetis
0e7444a463 SCI: Fixed compilation and added include safeguards to map-mt32-to-gm.h
svn-id: r53904
2010-10-28 15:27:44 +00:00
Filippos Karapetis
a7b5133903 SCI: Improved the description of the "map_instrument" console command a bit. Also, the dynamic mappings are now checked before the static ones
svn-id: r53903
2010-10-28 13:00:21 +00:00
Filippos Karapetis
3a4647dc50 SCI: Several changes related to MT-32 -> GM mapping
- Changed C - style comments in map-mt32-to-gm.h to C++ - style comments
- Added a new dynamic MT-32 -> GM mapping, complementary to the normal one, which can be done on the fly using the new console command "map_instrument"
- The "show_instruments" command has been moved to the music section and now displays the instruments of the game which aren't in the MT32-> GM mapping

svn-id: r53902
2010-10-28 12:48:51 +00:00
Filippos Karapetis
8a08ca1f39 SCI: Cleanup, invoking pauseEngine() on Console::preEnter() and Console::postEnter()
svn-id: r53890
2010-10-27 21:43:08 +00:00
Filippos Karapetis
e85f43877a SCI: Proper pausing/resuming of MIDI music in SciEngine::pauseEngineIntern(), Console::preEnter() and Console::postEnter() and added a sanity check in SciEngine::getDebugger()
svn-id: r53886
2010-10-27 19:22:37 +00:00
Filippos Karapetis
d251521f63 SCI: Added the ability to filter out results of the "class_table" command
svn-id: r53673
2010-10-21 13:13:56 +00:00
Torbjörn Andersson
2a19d755de SCI: Silence GCC warning
svn-id: r53649
2010-10-20 20:39:08 +00:00
Filippos Karapetis
3d85d6804b SCI: Added a new debug command, "find_callk"
This command can be used to find the object methods (including their
corresponding objects and owner scripts) that call a specific kernel
call. This shall aid us track all the spots where a particular kernel
function is called from, therefore it'll be a bit easier to find
examples where unimplemented kernel functions are called

svn-id: r53646
2010-10-20 17:31:29 +00:00
Torbjörn Andersson
54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Willem Jan Palenstijn
f98536eef5 SCI: Allow multiple word groups in parser
In SCI01 and up, each typed word may be interpreted as multiple
class,group pairs. This patch adds support to the vocabulary and
parser. It uses the matcher support added in r52985.

This fixes parser issues in German LSL3, but needs testing.

svn-id: r52989
2010-10-03 10:49:42 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Filippos Karapetis
4e27844fef SCI: Some changes regarding resources
- Renamed the debug command "resource_size" to "resource_info", as it now provides
the location of where a specified resource is found (i.e. the resource.xxx file, or
the file name itself, if the resource is a patch)
- "duskdump" shows the original location of dumped resources
- loadResource() now shows the location of files that couldn't be loaded

svn-id: r52667
2010-09-10 14:07:32 +00:00
Lars Skovlund
e51b0f6b56 SCI/Debugger: Show class names in addition to addresses in class_table output.
svn-id: r52657
2010-09-09 13:38:00 +00:00
Martin Kiewitz
cf3289ee3f SCI: adding "bpr" and "bpw" debug commands
"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-02 09:05:08 +00:00
Martin Kiewitz
f1ad1f1738 SCI: "version" now shows cantBeHere selector
svn-id: r52045
2010-08-12 21:33:23 +00:00
Sven Hesse
96e079a9f7 SCI: Directly use the new Graphics::VMDDecoder class
svn-id: r51922
2010-08-08 01:08:48 +00:00
Martin Kiewitz
fcede4680a SCI: adding bpk debug command
currently removing or listing such breakpoints is not yet supported

svn-id: r51710
2010-08-03 19:06:40 +00:00
Johannes Schickel
dd38e424e7 SCI: Fix leaks in ResourceManager::listResources caller code.
svn-id: r51666
2010-08-02 22:27:26 +00:00
Matthew Hoops
142fb8a1f1 SCI: Don't include the time running the debugger in the game running time
svn-id: r51548
2010-07-31 19:18:35 +00:00
Martin Kiewitz
d49d1d60fe SCI: added said spec dump ability to logkernel
svn-id: r51242
2010-07-24 11:51:09 +00:00
Martin Kiewitz
b984d9afc0 SCI: logkernel changes
removing old manual debug code, use logkernel * on/off to log all calls

svn-id: r51222
2010-07-23 20:59:27 +00:00
Martin Kiewitz
3a45e47c5c SCI: adding new debug command logkernel
svn-id: r51220
2010-07-23 20:47:15 +00:00
Filippos Karapetis
529af0fc3e Extended the "version" console command to also show the game version found in the VERSION file
svn-id: r51150
2010-07-22 16:22:48 +00:00
Filippos Karapetis
d53e5fbfb7 SCI: Removed the restoring parameter of the run_vm() function
svn-id: r51076
2010-07-20 23:15:07 +00:00
Matthew Hoops
5b4fd084b0 SCI: Fix order of characters when using hexDumpReg.
svn-id: r50998
2010-07-18 17:48:48 +00:00
Willem Jan Palenstijn
921c9a8e33 SCI: Add basic debugging command for 'said'
svn-id: r50991
2010-07-18 13:31:05 +00:00