Commit Graph
447 Commits
Author SHA1 Message Date
Colin Snover bd7a62e996 SCI: Fix typo in comment 2017-03-30 19:46:27 -05:00
Colin Snover ceacf7df12 SCI: Handle >64KiB offsets in parse_reg_t 2017-03-30 19:46:27 -05:00
Colin Snover a233696212 SCI: Update formatting strings to match updated Span API 2017-03-30 14:23:41 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover 10d97ce379 SCI: Fix more unsafe C-string usage 2017-02-05 12:38:21 -06:00
Colin Snover a238f720db SCI32: Fix nitpicky output errors in SCI32 bitmap debugging 2016-12-19 13:56:37 -06:00
Colin Snover 20c211192d SCI32: Add segment table debugging info for SCI32 arrays 2016-12-19 12:47:48 -06:00
Colin Snover 07919b79ba SCI32: Improve SciBitmap segment table debugging output 2016-12-17 18:55:22 -06:00
Colin Snover 4814682d5f SCI: Improve disassembly output
1. pushi opcode now displays decimal value and selector value (if
   one exists) in-line
2. lofsa, lofss, and super opcodes now display resolved
   object/class names
3. Opcode arguments are visually aligned
2016-11-20 12:31:44 -06:00
Colin Snover 9380b54120 SCI: Add code-address breakpoints to debugger 2016-11-20 12:31:43 -06:00
Colin Snover faaa1a6b1f SCI: Add missing newline in debugger output 2016-11-10 10:49:59 -06:00
Colin Snover a605a891bb SCI: Add reference dump to disk in debugger
This allows references in memory to be dumped to disk for
examination by other tools. In the case of SCI32 bitmaps, data
is output in 8-bit TGA format without transparency, which allows
the current palette to also be examined. (The alternative would
be to use 32-bit TGA to display transparency, and lose the
palette, or dump to a more complicated format that supports 1-bit
transparency.)
2016-11-02 11:27:22 -05:00
Colin Snover d0ec919fb7 SCI: Fix crash when attempting to view invalid list, array, bitmap references 2016-10-09 13:52:04 -05:00
Colin Snover 8c555200d9 SCI32: Change storage type of int16 arrays to hold reg_ts instead
Memory references and integers in SSCI are both 16-bit numbers,
so game scripts frequently (incorrectly) use an IntArray instead
of an IDArray for holding references. Since references in ScummVM
are 32-bit reg_ts, IntArray entries must be large enough to hold
reg_ts in order to be compatible with game scripts that store
references in integer arrays.

The alternative solution is to find and patch all incorrect use of
IntArray across all games. This is possible, but a bit risky from
a save game stability perspective, since incorrect IntArray usage
is sometimes not apparent until well after the array is
instantiated (like GK1's global interview array).

This change invalidates existing SCI32 save games.
2016-10-09 11:21:13 -05:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Colin Snover 4d73736d1f SCI32: Fix compilation warnings 2016-09-29 19:39:16 -05:00
Colin Snover 25c874b9cd SCI32: Add more debugger support for dumping SCI32 arrays 2016-09-29 19:39:16 -05: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
Colin Snover 3cc5e55201 SCI: Fix typo in debugger help 2016-09-29 19:39:16 -05:00
Colin Snover 0f2748b15a SCI32: Implement kRobot 2016-08-19 14:08:22 -05:00
Martin Kiewitz c270b30a79 SCI: Fix pseudo mouse in various SCI1 games like e.g. Larry5
Pseudo mouse was functionality in SCI1+ games, that allowed the
user to control the mouse via keyboard cursor keys.

This new class only worked, when a tiny difference inside
the keyboard driver happened on kMapKeyToDir calls. We previously
tried to enable this behavior depending on cursor type, but
this didn't work correctly (Larry 5 for example was not detected
as such, but had PseudoMouse support).
2016-08-13 14:58:07 +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 4a637d65c3 SCI32: Enable optional explicit memory management of hunk entries
Bitmaps in ScrollWindow and Robot code are managed by the kernel
and not by game scripts, although they must be able to be
referenced through a reg_t. To prevent incorrect GC of bitmaps
that are in use but not referenced by any game script, explicit
memory management of hunk entries can be enabled.
2016-08-01 10:37:14 -05:00
Colin Snover 4cfc387602 SCI32: Split GfxPalette and GfxPalette32 + HunkPalette 2016-07-11 10:39:50 -05: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
Colin Snover a613a27b44 SCI32: Implement line drawing (kAddLine/kUpdateLine/kRemoveLine)
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
2016-06-21 08:14:12 -05:00
Colin Snover 79ddb9e605 SCI: Allow debugging output of all VM variables in one shot 2016-05-25 12:36:53 -05:00
Johannes Schickel 1c6112e121 SCI: Introduce accessors for SegmentObjTable entries.
This makes code not use _table directly whenever possible. An exception is the
save game code which is not easy to adapt due to design deficiencies.
2016-03-25 01:15:26 +01:00
Colin Snover 13f2a2c3bd SCI32: Add debugger command to view screen items in the visible plane list 2016-03-07 16:46:25 -06:00
Filippos Karapetis cdbd7c8add SCI: Use uint32 instead of unsigned int 2016-03-01 01:12:58 +02:00
Lars Skovlund ca623ff490 SCI: Fix compilation on amigaos4 2016-02-29 20:16:37 +01:00
Lars Skovlund 98878d69b8 SCI: Add vocab994 console command
This is intended for early SCI2, but should work with older SCI too,
not that we need it.
2016-02-29 16:00:13 +01:00
Martin Kiewitz 82165bb6f6 SCI: Improve kAnimate fastcast detection, Remove EQ1 hack
- Add "kAnimate fast cast state" to "version" debug command
- Make it possible for script patcher signatures to get fully
used outside of the regular script patcher
- Remove previous fastcast detections and replace them with
a signature heuristic
- Remove object name checking, when fastcast global is set
- Heuristic detects "fast cast" support incorrectly for multilingual
KQ5, but it seems the game never sets the global, so it won't
matter. KQ5 CD (also SCI1 late) has fastcast support.
- Remove hack in GfxView::draw
- Add lots of comments to ScriptPatcher class

This fixes EcoQuest 1 Floppy showing the anemone on top of the
message box (see bug #5170)
2016-02-23 20:17:18 +01:00
Willem Jan Palenstijn ddcf204bd0 SCI: Add help for debuglevel command 2016-02-21 20:42:06 +01:00
Colin Snover 75ccabc325 SCI: Implement accurate renderer architecture for SCI32 2016-02-18 13:18:02 -06:00
Colin Snover aeee621e44 SCI32: Add initial support for palette cycling (kPalCycle) and fading (kPalFade)
Graphics palette code was rewritten between SCI1 and SCI2, so
SCI32 palette engine code has been moved to a separate GfxPalette32
class.
2016-01-07 16:35:09 -06: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 3183ef0854 SCI: add said-details to script_said debug cmd 2015-05-14 20:41:21 +02:00
Martin Kiewitz bfab4c4cbe SCI: debug commands scro, scrs and script_said
implement string collecting for SCI3
implement object offset collecting for SCI0-SCI2
implement said-str offset collecting for SCI0-SCI1
add new debug command scro / script_objects
add new debug command script_said
string without terminating NUL now a warning
the latter happens in qfg2 for amiga room 84
2015-05-14 20:33:21 +02:00
Willem Jan Palenstijn 8466c0f08d SCI: Restore xs after calling run_vm from debugger
This fixes possible gamestate corruption when using 'send' in the
debugger to call methods.
2015-05-14 16:45:53 +02:00
Martin Kiewitz ed7007162a SCI: Scripts: identify strings + debug command
debug command is called "script_strings" / "scrs"
2015-05-04 21:19:05 +02:00
Martin Kiewitz 9a9f569f3b SCI: debugger / fix diskdump + list commands
diskdump: support for audio36+sync36
list: always show tuple for audio36+sync36
2015-03-18 23:30:32 +01:00
Willem Jan Palenstijn 58ef44eb8d SCI: Register and save playBed option to PlaySound
The playBed option is not handled yet, only stored. This increases
the savegame format version.
2015-02-14 16:06:55 +01:00
Filippos Karapetis 9783f0bbd9 SCI: Remove trailing whitespace 2014-10-28 16:17:06 +02:00
Martin Kiewitz f317e8c877 SCI: implement 8-bit color matching SCI1.1 bug
effectively fixes bug #6455
thanks to wjp and [md5]
2014-10-28 01:40:40 +01:00
Martin Kiewitz 2d45bbd1ea SCI: debugger diskdump is now able to dump '*'
dumps all resources of given type
2014-06-01 01:23:44 +02:00
Johannes Schickel 8b7672b64c ALL: Introduce typesafe Debugger::registerVar functions.
This also adds a FIXME to SCI which registered an enum type as int...
2014-05-27 02:04:08 +02:00
Johannes Schickel 30d64edac4 ALL: Make Debugger command function names conform to our guidelines. 2014-05-27 02:04:08 +02:00
Johannes Schickel ae4ffe01f0 ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. 2014-05-27 02:04:08 +02:00
Johannes Schickel 0adca2c579 ALL: Rename Debugger::DVar_Register to Debugger::registerVar. 2014-05-27 02:04:07 +02:00