aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
AgeCommit message (Collapse)Author
2019-01-17SCI: Fix debugger bp_action help messageVhati
Fixes the help for bp_action: 'none' arg should be 'ignore'
2018-12-28SCI32: Display plane id base in version console commandLars Skovlund
2018-10-18SCI: Fix Segfault When Using Console "show_map" Command on SCI32 games.D G Turner
The _gfxScreen instance is nullptr for SCI32 games, thus this console command previously caused a segfault.
2018-08-25SCI32: Remove reg32_t and use reg_t in all casesFilippos Karapetis
reg32_t was a transitive solution, before reg_t's were adapted to use 32-bit addresses internally, and before support for SCI3 was added. It was introduced as another way to handle large script offsets in SCI3, and was only used for the program counter (PC). It's no longer needed, as we now support SCI3 script offsets using reg_t's, so we can use make_reg32 in all cases where we need to access offsets over 64KB
2018-02-01SCI: Avoid (false positive) uninitialized use warningWillem Jan Palenstijn
2017-12-01SCI: Partially clean up SCI16 video playback codeColin Snover
2017-10-07ENGINES: Remove default1x scaler flagColin Snover
This flag is removed for a few reasons: * Engines universally set this flag to true for widths > 320, which made it redundant everywhere; * This flag functioned primarily as a "force 1x scaler" flag, since its behaviour was almost completely undocumented and users would need to figure out that they'd need an explicit non-default scaler set to get a scaler to operate at widths > 320; * (Most importantly) engines should not be in the business of deciding how the backend may choose to render its virtual screen. The choice of rendering behaviour belongs to the user, and the backend, in that order. A nearby future commit restores the default1x scaler behaviour in the SDL backend code for the moment, but in the future it is my hope that there will be a better configuration UI to allow users to specify how they want scaling to work for high resolutions.
2017-10-04SCI: Fix disassembly of 32-bit addressesColin Snover
2017-10-03SCI32: Fix audio dumper decompressed size calculation for 16-bit audioColin Snover
2017-09-19SCI: Allow multi-step tracing with step-over in debuggerColin Snover
2017-09-19SCI32: Add audio dump debugger commandColin Snover
2017-09-08SCI: Add resource integrity dump command to debuggerColin Snover
2017-09-04SCI: Remove already-finished TODOColin Snover
2017-09-04SCI: Allow deep inspection of objects in debuggerColin Snover
2017-07-23SCI: Resolve offset names when disassembling object methodsColin Snover
2017-07-07SCI: Fix audio_list debug command engine version infoColin Snover
2017-06-10SCI: Expand kernel breakpoint pattern matching for negative matchesWillem Jan Palenstijn
See matchKernelBreakpointPattern() for samples. The main envisioned use is DoSound*,!DoSoundUpdateCues to match all DoSound sub-functions except DoSoundUpdateCues.
2017-06-10SCI: Change 'none' breakpoint action to 'ignore' for consistencyWillem Jan Palenstijn
2017-06-10SCI: Move bpk/logkernel to main breakpoint infrastructureWillem Jan Palenstijn
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-10SCI: Print breakpoint info on creationWillem Jan Palenstijn
2017-06-10SCI: Allow setting bp action directly on creationWillem Jan Palenstijn
2017-06-10SCI: Add inspect, none breakpoint actionsWillem Jan Palenstijn
2017-06-10SCI: Move printObject from console to scriptdebugWillem Jan Palenstijn
2017-06-10SCI: Add break/log/backtrace actions for triggered breakpointsWillem Jan Palenstijn
The action can be set using the new console command bp_action/bpact.
2017-06-10SCI: Add underscores to Breakpoint member variablesWillem Jan Palenstijn
2017-06-10SCI: Move backtrace output to scriptdebug.cppWillem Jan Palenstijn
2017-05-20SCI: Add resource hash to resource_info debugger commandColin Snover
Bad resources that need to be blacklisted sometimes seem to have the same size as good resources. In such cases, the bad resources can be identified by hash instead. Adding a hash output to resource_info will make it easy for users to provide the hash of questionable resources inside of resource bundles that we do not have access to. Refs Trac#9797.
2017-05-20SCI: Always use SegManager::getObjectName to get object namesColin Snover
This ensures that all object name reading code works the same and is in one place in the codebase.
2017-05-20SCI: Stop making copies of ObjMap and remove related dead codeColin Snover
ObjMap owns Objects, so every time this map gets copied instead of referenced, it creates a copy of every single object in the associated script. This is expensive, and it breaks things like the `Object::syncBaseObject` call in savegame.cpp, which hasn't actually been doing anything since 58190c36b4cc84b3200239211d91b0291301db56 because it has been operating on copies.
2017-05-20SCI: Add more support for >16-bit SCI3 offsetsColin Snover
Basically just grepped for getOffset calls being assigned to uint16s and expanded those to uint32 when they looked trivial. While some of these changes seem superfluous, at least for the US/English SCI3 games where potentially impacted game scripts are not large enough to have a problem with 16-bit offsets (e.g. when feature detecting the sound type), at least some of these changes are necessary for correct operation of the find_callk debugger command in SCI3 games. There should not be a reason why any of these variables need to be kept as uint16, in any case.
2017-04-23SCI32: Add debugger command to list digital audio samplesColin Snover
2017-04-23SCI32: Improve debugging output of object metadata in SCI3Colin Snover
2017-04-22SCI: Add alloc_list command to debuggerColin Snover
This command lists all resources that are currently loaded into memory, plus the number of locks that exist on each loaded resource.
2017-04-16SCI: Improve MidiParser_SCI robustness against bad sound resourcesColin Snover
1. KQ4 sound 104 has an extra 0xFC (MIDI Stop command/kEndOfTrack) at the end of the resource, which causes an out-of-bounds read because the filtering loop continues after the first 0xFC and unconditionally attempts to read 2 bytes (expecting there to always be a delta value + a command, whereas in this file there is only another kEndOfTrack command). This is corrected by exiting the filtering loop when a kEndOfTrack is encountered and there is not enough data remaining in the resource to continue reading. 2. KQ5 sound 699 is truncated, which causes the parser to attempt to read past the end of the resource. This is addressed by adding bounds checks that exit the mix loop early if there is no more data available to read. This allows truncated sounds to be played as far as possible (previously, trying to read truncated resources would result in a fatal error). 3. midiMixChannels allocates an arbitrary amount of raw memory for the mixed MIDI sequence, without performing any bounds checking when writing to this memory, potentially leading to a crash or silent corruption of adjacent memory. This is mitigated by using SciSpan instead of a raw pointer for the mixed data. Fixes Trac#9727.
2017-03-30SCI: Fix typo in commentColin Snover
2017-03-30SCI: Handle >64KiB offsets in parse_reg_tColin Snover
2017-03-30SCI: Update formatting strings to match updated Span APIColin Snover
2017-03-27SCI: Implement bounds-checked reads of game resourcesColin Snover
2017-02-05SCI: Fix more unsafe C-string usageColin Snover
2016-12-19SCI32: Fix nitpicky output errors in SCI32 bitmap debuggingColin Snover
2016-12-19SCI32: Add segment table debugging info for SCI32 arraysColin Snover
2016-12-17SCI32: Improve SciBitmap segment table debugging outputColin Snover
2016-11-20SCI: Improve disassembly outputColin Snover
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-20SCI: Add code-address breakpoints to debuggerColin Snover
2016-11-10SCI: Add missing newline in debugger outputColin Snover
2016-11-02SCI: Add reference dump to disk in debuggerColin Snover
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-10-09SCI: Fix crash when attempting to view invalid list, array, bitmap referencesColin Snover
2016-10-09SCI32: Change storage type of int16 arrays to hold reg_ts insteadColin Snover
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-09JANITORIAL: Remove trailing spacesEugene Sandulenko
2016-09-29SCI32: Fix compilation warningsColin Snover