Commit graph

396 commits

Author SHA1 Message Date
sluicebox
511e5441e3 SCI32: Enable Mac code (remove ENABLE_SCI32_MAC) 2019-10-11 14:18:26 -07:00
Kawa
9aadb27267 SCI: Add some more SCI11+ features
Also gate them behind the presence of a 184.VOC resource instead of GID_CATDATE. This should not matter with regards to the remap effects -- the 2015 and 2016 demos had none, and the first that did has an unknown release status. Only the 2017 demo would fall, which would be easily fixed by dropping in a valid 184.VOC patch file.
2019-06-23 01:46:53 +03:00
Filippos Karapetis
d2f5023ee9 SCI: Do not apply script patches when checking for static selectors
Fixes bug #10969
2019-06-08 13:57:34 +03:00
Filippos Karapetis
9551e64bdf SCI: Remove unnecessary two-phase Kernel initialisation
Adapted from csnover's commit 8c96c1fd3e1568b61ee0594522615466f26a7793
2019-05-12 19:05:51 +03:00
sluicebox
7353524d89 SCI: Fix LONGBOW broken pub messages 2019-04-06 15:01:49 +03:00
Kawa
ca2209cb5f SCI: Add support for The Dating Pool (#1403) 2018-12-02 22:56:19 +02:00
Filippos Karapetis
5684273ee1 SCI: Add support for text loading in Hoyle 3 Amiga 2018-08-21 03:36:05 +03:00
Colin Snover
743082ac8c SCI32: Disable all SCI32 Mac code
This code is currently untestable and is almost certainly at least
partly based on guesswork & not actual reverse-engineering (as was
the case for all other pre-2015 SCI32 code), so future developers
interested in adding SCI32 Mac support should use it only as an
intermediate reference rather than as known good code.
2017-09-24 22:56:59 -05:00
Colin Snover
7334f33a3d SCI: State SCI version in error if kernel subop detection fails 2017-06-17 13:09:27 -05:00
Willem Jan Palenstijn
e2e3f7c4c5 SCI: Move bpk/logkernel to main breakpoint infrastructure
This changes the syntax for bpk and logkernel:

Enable breakpoint on kernel call:

bpk FrameOut

Enable logging for kernel call:

bpk FrameOut log
For backward compatibility this has an alias: logkernel FrameOut

Removing a kernel call breakpoint is done with bp_del/bc now.
2017-06-10 21:32:35 +02:00
Colin Snover
ccf5665fac SCI32: Remove dead code 2017-05-27 23:36:11 -05:00
Colin Snover
42406cb11a SCI32: Undummy AvoidPath for SCI3
Used by LSL7.
2017-04-23 13:07:25 -05:00
Colin Snover
4c0f2a3738 SCI: Move ScummVM kernel calls to 0xe0 2017-04-22 13:01:35 -05:00
Colin Snover
f4d3664d3f SCI: Replace magic numbers in reg_t handling with symbols 2017-03-30 19:46:27 -05:00
Colin Snover
3b34f17fb3 SCI32: Add kWebConnect and kWinExec
Used by Phant2.
2017-03-30 19:46:27 -05:00
Colin Snover
31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover
0744dc4109 SCI32: Fix spinloop in Hoyle5
Hoyle5 will spin on kGetTime between 15 and 300 ticks in multiple
game scripts in order to delay execution (for example, after
choosing opponents and clicking "okay"). This causes ScummVM to
be unresponsive and wastes CPU time.

This commit patches the spin subroutines to instead call a kernel
function (kWait) that waits without a spin loop. This kernel
function was removed in SCI2, and has been added back in ScummVM
specifically for Hoyle5, so this patch will not work with the
original interpreter.
2017-01-16 12:16:12 -06:00
Colin Snover
7567940ba1 SCI32: Clean up SCI3-only opcodes
SCI3 includes four new opcodes:

* op_info[0x26][0] puts -info- flag in accumulator
* op_infoSP[0x26][1] pushes -info- flag to stack
* op_superP[0x27][0] puts -super- reference in accumulator
* op_superPSP[0x27][1] pushes -super- reference to stack

The implementation of these opcodes was correct already, but the
opcode names given were a bit misleading (the value is not always
stored to accumulator), and magic numbers were used for these
opcodes in places.

A review of the opcode table in Phant2 indicates that there are
no other new opcodes for SCI3.
2017-01-09 19:34:54 -06:00
Colin Snover
3f91726765 SCI32: Rewrite kArray & kString
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
2016-09-29 19:39:16 -05:00
Martin Kiewitz
97d444a569 SCI: Fix kernel signature comment 2016-09-21 21:46:15 +02:00
Colin Snover
2071196f42 SCI32: Add bitmap segment and remove GC option from hunk segment 2016-08-01 10:37:14 -05:00
Colin Snover
a9b7b40c66 SCI32: Disable kernel call 0x23 on LSL6hires
LSL6hires calls 0x23 (Graph/Robot) from game scripts, but it is a
null function in the game's interpreter.
2016-07-12 14:43:56 -05:00
Willem Jan Palenstijn
4b72a42da9 SCI: Remove presumably long-outdated FIXME 2016-07-02 21:31:29 +02:00
Willem Jan Palenstijn
08f1727b08 SCI: Improve kernel subfunction logging
ExecStack now stores the kernel call number as well as the subfunction.
This allows kStub and backtraces to log the actual subfunction called.

The kernel call number in ExecStack used to be stored in the
debugSelector field. It now has its own field, to avoid confusion.
2016-07-02 21:25:53 +02:00
Filippos Karapetis
6958aa9890 SCI: Separate the demos of QFG4, PQ4 and GK1 from their full versions
The demo versions of these games were using a very different engine -
SCI1.1 vs SCI2/SCI2.1. Thus, we split them into different game IDs,
to avoid mixing specific game checks for them, as well as specific
game workarounds, which are different for the demos than the full
versions. Also, the demos should be working when SCI32 is disabled.
For these games, we don't use ADGF_DEMO, to avoid game IDs like
foodemo-demo
2016-03-08 20:36:02 +02:00
Martin Kiewitz
0aa9924df1 SCI: add user option for high resolution graphics
Instead of choosing Windows as platform, users can now also simply
click this option for Gabriel Knight 1 + King's Quest 6
Defaults to high resolution graphics
2016-01-22 02:01:28 +01:00
Martin Kiewitz
0b5a09f836 SCI32: fix kString calling from within kArray
(didn't work since the introduction of kString signatures and the
kString split-up)
2016-01-04 14:58:02 +01:00
Martin Kiewitz
0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Martin Kiewitz
7f9f305111 SCI: improve debug output for signature mismatch
dump parameter list to debugger as well
2015-03-20 16:06:19 +01:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Martin Kiewitz
ba3656d84e SCI: fix script patcher for games w/o vocab 2013-11-21 22:41:07 +01:00
Matthew Hoops
0031c41db8 COMMON: Change kPlatformPC to kPlatformDOS
"PC" was very ambiguous and now it matches what we show in the GUI.

This also corrects sword2's platform to Windows.
2013-05-02 18:43:10 -04:00
Matthew Hoops
ee86e671f1 SCI: Fix Phantasmagoria Mac's kDoSound 2013-04-28 13:43:17 -04:00
Matthew Hoops
81f5a89093 SCI: Fix SCI32 BE selector name count 2013-04-26 21:31:32 -04:00
Filippos Karapetis
a0ad504059 SCI: Update some kernel table related comments 2012-07-04 01:06:58 +03:00
Filippos Karapetis
72c59baf24 SCI: Merge and simplify the code that sets the kernel functions 2012-07-04 01:02:15 +03:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis
041b1447c0 SCI: Replace RAW_IS_OBJECT with a method 2012-06-15 22:32:15 +03:00
Filippos Karapetis
160732b2f7 Revert "SCI: Change Script::getObject() to accept a reg_t"
This reverts commit 577d7e41c9.
2012-06-15 22:32:14 +03:00
Filippos Karapetis
577d7e41c9 SCI: Change Script::getObject() to accept a reg_t
This is needed for upcoming changes to the Script class
2012-06-15 12:24:14 +03:00
Willem Jan Palenstijn
0192d2f2de SCI: Fix restarting SCI engine with different SCI version 2011-11-29 18:34:34 +01:00
Willem Jan Palenstijn
097b4e5c7a SCI: Add RtL FIXME 2011-11-29 16:11:33 +01:00
Filippos Karapetis
701e318360 SCI: Set the correct number of kernel functions for SCI3 2011-10-18 02:36:59 +03:00
Filippos Karapetis
b807041ad2 SCI: Ignore invalid pointers if the kernel function signature specifies it
SCI scripts can send stale pointers to kernel functions (e.g. after
loading a saved game). This is normal in some cases (such as kDisplay
and kGraphRestoreBox), and their signatures are set to allow invalid
pointers.
Thus, in such cases, allow invalid pointers, as the kernel functions
will handle them themselves. Fixes bug #3412002, and properly fixes bugs
#3389579, #3292251, #3308087 and #3056811. Removed a relevant TODO.
2011-09-22 04:18:13 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Matthew Hoops
758e495872 SCI: Add support for the KQ5 FM Towns resource format
Thanks to alexbevi for providing details on the format
2011-02-16 14:24:38 -05:00
Matthew Hoops
53d862af0b SCI: Add support for BE selector name tables
svn-id: r55780
2011-02-05 08:16:29 +00:00
Filippos Karapetis
da52b3a267 SCI2.1: Added a comment with the SCI2.1 games using a SCI2 kernel
svn-id: r55176
2011-01-08 23:14:11 +00:00
Filippos Karapetis
32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +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