Difference between revisions of "SCI/TODO"

From ScummVM :: Wiki
< SCI
Jump to navigation Jump to search
(Remove outdated SCI32 TODOs/bugs)
 
(506 intermediate revisions by 10 users not shown)
Line 1: Line 1:
* check for places that use char or unsigned char for boolean values, and change those to bool. Even nicer would be to change it to use enum types whose value names express the intention (SearchOptions.RECURSIVE, GraphicsScaleOptions.2X, etc), but just going for bool will already be a big improvement.
{{Infobox_TODO|
* more formatting fixes: The SCI code puts return values on separate lines all over the place, e.g.
taskname=SCI Engine TODO|
<syntax type="C++">
techcontact=[[SCI]] Engine Team|
  int
subsystem=Engine|
  _vocab_cmp_words(const void *word1, const void *word2) {
}}
</syntax>
Take care of that and other formatting issues.


* Change #define lists into enums
= Missing features =
* Rearrange the files under engines/sci: I.e. get rid of include/ subdir (just move its contents to engines/sci, at some point at least). Some source files should also be renamed for clarity.
 
* Convert stuff from "C pseudo classes" to real classes.
== SCI0-SCI1.1 missing features ==
* Replace various generic FreeSCI code by their ScummVM counterparts, where it make sense.
 
* Not specific to SCI, but: Replace "struct tm" in common/system.h (and places that implement/use it) by a custom struct, which would be a (partial) clone of struct tm, something like Common::OSystem::Time. That way, we wouldn't have to use <time.h> anymore anywhere.
=== Sound ===
* const correctness in engines/sci/engine/savegame.c (this is a generated file, so change the source or generator, whatever is necessary)
* Voice mapping. This is used by all SCI games to assign hardware voices to midi channels in the AdLib and FB-01 drivers. So, for example, if a song tries to play more than 9 notes at the same time, we need to stop an earlier note. We currently do this round-robin, while we should be respecting voice assignments. If a game sets 3 voices for piano, we should not take one away unless 4 piano notes are played, then it's OK to stop one piano note. Currently if a song were to use 5 notes at once we would just play them all, even if that midi channel was set to use 2 voices, and those 3 extra notes might stop more important notes, e.g. in the melody. This has been implemented for SCI0, but it's not hooked up to AdLib at the moment. Also we're not sure if the initial voice assignments are in the MIDI stream in SCI1 (they're not in SCI0). Of course, channel remapping has an effect on this too
* change the many nice existing function documentation comments to use doxygen syntax
* Improve Amiga (SCI01/1) and Mac sound support ([[SCI/Specifications/Sound/SCI0 Resource Format#Amiga Sound (SCI1)/Macintosh Sound (SCI1/1.1)|same format]])
* Turn code into templates in following files (now they generate code via #defines):
* kDoAudio subops 12 and 13 (used in Freddy Pharkas: subop 12 is called while people are talking and subop 13 is called while the narrator's voice is heard)
** gfx/gfx_pixmap_scale.cpp
* Adapt the CMS driver to support earlier SCI versions too.
** gfx/resource/sci_picfill.cpp
* MT-32 is only using 10 channels (1-10), but our music code always assumes 16 channels leading to lost notes
** gfx/resource/sci_picfill_aux.cpp
* Rewrite the MIDI parser (which is using ticks) so that it uses byte offsets instead
* Check old FreeSCI-scummvm branch / repos by Jordi for change that could be salvaged, e.g. the files <code>sfx/device/scumm-midi.cpp</code> and <code>sfx/softseq/scumm-adlib.cpp</code>, or the modifications to the SCI debugger to use the ScummVM console, and stuff.
 
* Replace the SCI sound mixer by Audio::Mixer
=== Mac-specific ===
* I just made a big commit where I started to overhaul the file handling in SCI. It's incomplete, and may cause regressions, but it is a start. The biggest chunk left to take care of is engine/kfile.cpp, and in there mostly reading/writing from/to other files than regular savegames. This needs to be switched to the savefile API.
* Support for the SCI1 Mac version of kGetEvent
* make the SCI tools compilable (to avoid bitrot, while we change code that they depend on), and finally usable again.
* Support for the SCI1 Mac version of kNewWindow
* Get rid of the CFSML system for savegames. It is arcane (people don't understand it, changes to the savegame format are difficult, it requires perl to update the source code, etc.). Instead, use for example a system like we use in SCUMM, but in an improved version, see [https://sourceforge.net/mailarchive/forum.php?thread_name=b434588f0807300420w76c781c5maefabbc04e5533ff%40mail.gmail.com&forum_name=scummvm-devel the discussion on scummvm-devel].
* Support for SCI1.1 partially hardcoded icon bar
** Images stored in PICT resources (tags: 'IBIN' (not-selected), 'IBIS' (selected), 'PICT' (inventory image))
** kPlatform subop 4 is called various times for the icon bar. One call sets up the scripts for the icons, etc.
 
== SCI2-SCI3 missing features ==
 
* Support for Macintosh versions of games
 
= Known bugs =
 
== SCI0-SCI1.1 known bugs ==
 
=== Graphics ===
 
=== Sound ===
* The Tandy/PCjr driver needs more work
* Castle Dr. Brain: In the programming puzzle room 280 the music is using one bad instrument
* Castle Dr. Brain: in the first room, some notes aren't played during the memory puzzle
* KQ5: End credits song is broken (resource 699). we are now filtering out invalid channels, but at the end of the song it plays back garbled somewhat. This video proves that it worked fully in original sci http://www.youtube.com/watch?v=GerEZ68YSzc - the resource is uncompressed inside resource.000 right at the end, this is definitely no decompression or resource size error
* LSL6: when saving when music is fading out (and restoring) the music will stay on that level and keep playing - we should check for fading and modify selectors to the endpoint
 
=== VM ===
* LSL6: =NOT OUR BUG= sometimes the tram does not stop. This is a game script issue and not an engine one, but we should still figure out what goes wrong and fix it. To make it work -> see SCI bugs
* PQ2: Room 26 isn't exitable - happens if you warp from inside the car at the start into room 26 - happened to me during the game although I'm not unable to reproduce it anymore. I guess I did something differently last time.
* QFG1 EGA: when buying something from the shop and the merchant is reading at that time, it will get bought twice
* QFG1 VGA: ending music isn't played at all. no sound calls are done, so I guess it's VM.
 
=== Known Warnings ===
* KQ5: Warning - kStrAt with offset 0xFFFF is called when graham gets the staff, also happens when getting the heart in the forest
* KQ5: Warning - try to peek at 0:0, 0:2 and 0:4 most of the time when dialogue windows appear
* LSL5: Warning - Invalid character in kReadNumber input (happens right at the start of the game)
* LSL6: WARNING: Attempt to read character from non-raw data! during end credits
* PQ2: WARNING: ADLIB: Invalid patch 124 requested!
* PQ3: During End Sequence, WARNING: kDoSound(setHold): Slot not found (0026:0fc4)! and WARNING: Unhandled SCI MIDI command 0x51 (parameter 1)!
* QFG1EGA: Invalid adlib patch 1xx used, occurs several times in the game
* SQ4: During intro - "WARNING: Unhandled SCI MIDI command 0x0 (parameter 0)!"
 
== SCI2-SCI3 known bugs ==
 
* Please check the [https://bugs.scummvm.org/report/12 bug tracker]

Latest revision as of 01:49, 24 April 2017

TODO List
Name SCI Engine TODO
Technical Contact(s) SCI Engine Team
Subsystem Engine

Missing features

SCI0-SCI1.1 missing features

Sound

  • Voice mapping. This is used by all SCI games to assign hardware voices to midi channels in the AdLib and FB-01 drivers. So, for example, if a song tries to play more than 9 notes at the same time, we need to stop an earlier note. We currently do this round-robin, while we should be respecting voice assignments. If a game sets 3 voices for piano, we should not take one away unless 4 piano notes are played, then it's OK to stop one piano note. Currently if a song were to use 5 notes at once we would just play them all, even if that midi channel was set to use 2 voices, and those 3 extra notes might stop more important notes, e.g. in the melody. This has been implemented for SCI0, but it's not hooked up to AdLib at the moment. Also we're not sure if the initial voice assignments are in the MIDI stream in SCI1 (they're not in SCI0). Of course, channel remapping has an effect on this too
  • Improve Amiga (SCI01/1) and Mac sound support (same format)
  • kDoAudio subops 12 and 13 (used in Freddy Pharkas: subop 12 is called while people are talking and subop 13 is called while the narrator's voice is heard)
  • Adapt the CMS driver to support earlier SCI versions too.
  • MT-32 is only using 10 channels (1-10), but our music code always assumes 16 channels leading to lost notes
  • Rewrite the MIDI parser (which is using ticks) so that it uses byte offsets instead

Mac-specific

  • Support for the SCI1 Mac version of kGetEvent
  • Support for the SCI1 Mac version of kNewWindow
  • Support for SCI1.1 partially hardcoded icon bar
    • Images stored in PICT resources (tags: 'IBIN' (not-selected), 'IBIS' (selected), 'PICT' (inventory image))
    • kPlatform subop 4 is called various times for the icon bar. One call sets up the scripts for the icons, etc.

SCI2-SCI3 missing features

  • Support for Macintosh versions of games

Known bugs

SCI0-SCI1.1 known bugs

Graphics

Sound

  • The Tandy/PCjr driver needs more work
  • Castle Dr. Brain: In the programming puzzle room 280 the music is using one bad instrument
  • Castle Dr. Brain: in the first room, some notes aren't played during the memory puzzle
  • KQ5: End credits song is broken (resource 699). we are now filtering out invalid channels, but at the end of the song it plays back garbled somewhat. This video proves that it worked fully in original sci http://www.youtube.com/watch?v=GerEZ68YSzc - the resource is uncompressed inside resource.000 right at the end, this is definitely no decompression or resource size error
  • LSL6: when saving when music is fading out (and restoring) the music will stay on that level and keep playing - we should check for fading and modify selectors to the endpoint

VM

  • LSL6: =NOT OUR BUG= sometimes the tram does not stop. This is a game script issue and not an engine one, but we should still figure out what goes wrong and fix it. To make it work -> see SCI bugs
  • PQ2: Room 26 isn't exitable - happens if you warp from inside the car at the start into room 26 - happened to me during the game although I'm not unable to reproduce it anymore. I guess I did something differently last time.
  • QFG1 EGA: when buying something from the shop and the merchant is reading at that time, it will get bought twice
  • QFG1 VGA: ending music isn't played at all. no sound calls are done, so I guess it's VM.

Known Warnings

  • KQ5: Warning - kStrAt with offset 0xFFFF is called when graham gets the staff, also happens when getting the heart in the forest
  • KQ5: Warning - try to peek at 0:0, 0:2 and 0:4 most of the time when dialogue windows appear
  • LSL5: Warning - Invalid character in kReadNumber input (happens right at the start of the game)
  • LSL6: WARNING: Attempt to read character from non-raw data! during end credits
  • PQ2: WARNING: ADLIB: Invalid patch 124 requested!
  • PQ3: During End Sequence, WARNING: kDoSound(setHold): Slot not found (0026:0fc4)! and WARNING: Unhandled SCI MIDI command 0x51 (parameter 1)!
  • QFG1EGA: Invalid adlib patch 1xx used, occurs several times in the game
  • SQ4: During intro - "WARNING: Unhandled SCI MIDI command 0x0 (parameter 0)!"

SCI2-SCI3 known bugs