Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - lskovlun

Pages: [1] 2 3 ... 34
Speaking of 'holy moly' and graphics, I just noticed this over at vogons. It's a year and a half old:

Yes, these were used for the games that supported monochrome high-res CGA. The commands were added in interp version 0.000.631 I think:

MONO0: Set mono palette
MONO1: Set visual (using the mono palette)
MONO2: Clear visual
MONO3: Set direct visual (without going through the mono palette)
MONO4: Clear direct visual

(In fact MONO2 and MONO4 share code, but it is clear that they were meant to complement each other like this)

SCI Development Tools / Re: Strings: {} vs "", and underscores
« on: July 21, 2020, 06:39:09 AM »
It must be, because a reference to a text resource is a pair of values, whereas an S-expression (that what such an expression is called in LISP) resolves to a single value, a pointer in this case (yes, there are complications to that rule...).

(ninja'd by Kawa)

SCI Development Tools / Re: VGA Parser Template - Save / Restore
« on: July 20, 2020, 10:32:45 PM »
It could easily be the case that if you feed an interpreter resource data in a different format than it expects, the whole thing blows up in unexpected ways.

gamefile_sh is a class name, but it's an odd one because to use it, you must set the name property, which changes the class name. And filenames contain periods, which SCI Companion converts into underscores in most cases. And here we have a bug (from
Code: [Select]
with a period. My version of Companion simply says "Unknown class gamefile_sh. Did you forget to use 'gamefile'?'
Anyway, the whole exercise is pointless in this case because logFile turns out to be unused so it can simply be removed. I'm documenting it because the same problem could turn up elsewhere.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 19, 2020, 11:51:51 AM »
I have to thank Phil for coming up with a different way to test this. It was really the discrepancy between the two approaches that led me on the right track.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 18, 2020, 03:35:06 PM »
It's a clean fix and holy shit that's a sneaky one haha
It's sneaky and goes right back to SCI Studio. That means this is handwritten, not decompiled code. It was rewritten from an ASM block.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 18, 2020, 02:37:50 PM »
I found the bug! It is a buffer overflow in the script code.
We have this line:
Code: [Select]
(method (doit strDescription &tmp temp0 temp1 temp2 temp3 [temp4 360] [temp365 20] [temp386 20])
Look closely at the temp4 variable (which contains the description strings and comes just before the index numbers). It is sized as 360 (20*18 words), but this is not quite enough. Eric's authentic file has this define:
Code: [Select]
(define BUFFERSIZE 361) ;(define BUFFERSIZE (+ (* MAXGAMES COMMENTBUFF) 1))If you change the size of that temp4 array to be just a bit larger (361 words), you'll get the intended result.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 14, 2020, 06:52:25 AM »
I've made a test harness for SaveGame/GetSaveFiles. The 'prepare' menu option will make 20 saved games, and the two other options print the information returned by GetSaveFiles. After setting the stage in this manner, you can use the ordinary Save/Restore functionality to stress-test the related code. You just dump the attached file in a newly created game, it should be self-contained.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 09, 2020, 02:18:31 PM »
@Kawa and I were referring to a fix for escape sequences and the use of '\\' for a path separator in particular. sciAudio wants to create a file in a subdirectory of the main game dir, and therefore failed. It manifested differently in SCI0 somehow.

The thread is here.

The second issue, which may be more relevant, took some digging to find, but it's here. It seems it was never resolved properly, only worked around.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 09, 2020, 06:27:55 AM »
@EricOakford had some problems with the saving code when he was doing the SCI01 port a while back. I don't know what came of it, but I think it was some sort of corruption bug. Another corruption bug (or perhaps the same one) came up with his port of sciAudio recently. At least some of that was due to a parsing bug in Companion (didn't like backslashes), which @Kawa fixed.

SCI Syntax Help / Re: Old SCI0 Template Save Bug
« on: July 06, 2020, 06:13:20 AM »
I don't think the problem in in this procedure. It just calls save:doit to do the heavy UI lifting, and then SaveGame (a kernel call) to do the actual saving.

SCI Syntax Help / Re: Converting sciAudio to Sierra Script
« on: June 24, 2020, 02:26:07 PM »
@Eric: My main concern with that would be not finding the root cause (in the compiler) and therefore still risking problems with local variables elsewhere. The manifestation of such problems would be highly variable (hah) and difficult to diagnose. Also, if everything is in temporary vars (on the stack), there's the risk of stack overflows.

@Kawa: Thanks for looking into this and fixing it!

SCI Syntax Help / Re: Converting sciAudio to Sierra Script
« on: June 22, 2020, 08:29:09 PM »
Well, the globals are being overwritten because the compiler is somehow mistaking a local variable (array - msgBuf) for a global one. It happens to be caught early, because userFont gets blown away too and Print needs this.


That was SCI0. Now in SCI01, this problem doesn't occur. Instead, the conductor filename is somehow bugged. The default name contains a backslash, and I've never had to use one before in SCI code. The backslash causes SCI to create a file named MMAND.CON instead of COMMAND.CON. You could sidestep this problem entirely by running SciAudio and SCI from the same directory, or you could try to figure out how backslashes work in Companion's string handling code. Or do it on the ScIAudio daemon side of things (command line?).

SCI Syntax Help / Re: Adding a room to Quest for Glory 1 (VGA)
« on: June 21, 2020, 11:06:35 AM »
I have to admit I didn't look at the SCI Companion screen. So there's two issues here: The channel numbers are off by one in comparing ScummVM with Companion, this is purely aesthetic as long as you account for it. The second issue is that the MIDI streams corresponding to each channel are not necessarily the same for every hardware device. You can see this if you pay close attention to where the check marks are in Companion; the two tracks labeled 11 are never active at the same time on the same device. Similarly, channel number 10 is listed at most once in ScummVM per hardware device, but there's one version of it for Adlib/SoundBlaster and one for Tandy/CMS, as can be seen from the offsets. The curious thing is that there is only a control channel (15/16) present for MT-32 (the same one as for all the others).

I don't think this is the bug you're looking for ... unless your setup is an MT-32 or an MT-32 emulator.
In that case, could you try Adlib/SB instead and see if that works?

Pages: [1] 2 3 ... 34

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.128 seconds with 21 queries.