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 - Charles

Pages: 1 2 [3] 4 5 ... 8
31
SCI Syntax Help / Re: editing PICs
« on: October 10, 2020, 02:08:23 PM »
Okay, so that sort of worked... but it's not exactly as I expected... I can select some of the commands I want in the list, and then cut/paste them, but when I paste them it looks like they're not "committed". As in, they don't show up in the list.   --- oh, i figured it out... I have to double-click the mouse once I've positioned it where I want them... not sure what I was doing wrong before, but I was causing SCICompanion to hard crash.

This may take some time, since all the commands for the boxes aren't all in a row.

Is there a marquee select type of command, where I can select the areas on screen I want, and it will auto-highlight the commands that are inside that box?

I just saw too an earlier thread that touched on this stuff: http://sciprogramming.com/community/index.php?topic=1807.0

32
SCI Syntax Help / editing PICs
« on: October 10, 2020, 12:05:22 PM »
When editing a pic in SCICompanion, is there an easy way to nudge lines, either indivdiually or in a group?

In my specific case, I have a view with three boxes drawn on it, and I want to change where I've put those boxes.  I don't want to redraw the boxes from scratch, because they're fairly intricate, but I no longer like where I've placed them.

33
The Games and other Sierra Adventure stuff / Re: The Legend of ZCI
« on: October 09, 2020, 09:08:32 AM »
: ) Those are really cool.

What did you use to make that? Like, did you draw it entirely in SCICompanion, or did you start in Photoshop or something then import after?

34
The Games and other Sierra Adventure stuff / Re: King's Quest IV VGA-ish
« on: September 09, 2020, 11:31:25 PM »
Ironically, SQ4 might also be a good candidate.

As I understand it they wrote it for a text parser originally, then were forced to convert to point and click. Id read somewhere that the only reason they were able to do that way because they wrote some kind of conversion function that would convert verb clicks into the text said strings theyd originally programmed for. So the underlying code is still just parsing saids. I havent looked into it myself though.

Regardless, this looks like a fantastic project. I cant wait to follow your progress.

35
AGI Development Tools / Re: NAGI is not working properly on Windows 10
« on: August 23, 2020, 01:49:26 PM »
Are there other possibilities to play AGI games on Windows 10?

You could give ScummVM a go.

36
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 08, 2020, 04:05:13 PM »
EDIT: I posted the two full dissessemblies, but they were too big.

I see a bunch of lofsa commands in each.  I'm assuming the line "01d6:72 0b3b          lofsa $0d14 // cast" means QFG2 uses relative addresses for lofsa commands -- starting at address $1d6, add 3 bytes for the lofsa command (plus arguments), then jump $b3b bytes, ending up at address $d14.

Other than the order of the classes and instances being different between the two versions, I can't see anything odd.

EDIT 2: Added a recompiled SCRIPT.994 from QFG1EGA.  ScummVM does not flag any detectLofsType() warnings in that recompiled game, and again I can't see any significant differences between it and QFG2's.

37
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 08, 2020, 02:18:55 PM »
I'm not necessarily suggesting the SSCI problems I'm having with QFG2 are because of lofsa, but I am thinking more generally that SciCompanion is having a problem compiling SCI01-compatible scripts [see edit 1].

A problem that is just subtle enough it's not outright crashing in SSCI, but is causing ScummVM to detect the SCI version as > SCI_VERSION_01 and < SCI_VERSION_1_1.  So one of: SCI_VERSION_1_EGA_ONLY, SCI_VERSION_1_EARLY, SCI_VERSION_1_MIDDLE, or SCI_VERSION_1_LATE.

I don't know what the differences are in compiling for any of those, but that's the only conclusion I'm able to draw.

I don't think the problem is with script.002-- that's just the first indication I had there was a problem.  If I run my compiled QFG2 in ScummVM with a stock SCRIPT.002, it still trips up on auto-detecting.

I'd try stepping through ScummVM to see what exactly is causing that detectLofsType warning, but I haven't gotten scummvm to compile on my machine yet.

EDIT 1: Or whatever version of SCI is used by QFG2... I always thought it was called SCI01, but I'm seeing different naming conventions in the ScummVM code.

38
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 08, 2020, 10:22:54 AM »
Hmm... So that's a ScummVM function... I see here that it depends highly on the getSciVersion function.

So ScummVM doesn't detect it as SCI_VERSION_01 (which is what it should be), but has to guess... looks likeit picks either SCI_VERSION_0_EARLY or SCI_VERSION_1_MIDDLE.  I'm guessing SciCompanion's compiling it as SCI_VERSION_0_EARLY... but \_(ツ)_/ -- still, this kinda circles back to it being a bytecode discrepancy.

Can I force SciCompanion to compile scripts under a different version?

39
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 07, 2020, 11:45:59 PM »
Oh, that's brilliant.  The code/heap seperation would also explain why ScummVm appears to be unaffected, while SSCI is having trouble.

The only warning that ScummVM gives me on my compiled code vs stock QFG2 is:
WARNING: detectLofsType(): failed, taking an educated guess!

Which happens before Trial:init, based on where I placed my SetDebug breaks. Also before Trial:play... which I thought was supposed to be the first thing called?

40
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 07, 2020, 09:14:39 PM »
It's a line in another procedure in the same file.
Code: [Select]
(procedure (SetGraphicsSoundInit)
;;;NOTE: If this is left in, possibleScore will be changed in the second procedure.
;If it is commented out, then possibleScore will NOT be set properly
(= suckBlueFrog FALSE)
;;;
;;;
(= musicChannels (DoSound NumVoices))
(if (< (= colorCount (Graph GDetect)) 8)
(= hpStatusView 811)
(= hpFontColor vWHITE)
(= statColor vBLACK)
(= statColorNew vRED)
else
(= hpStatusView 810)
(= hpFontColor vLCYAN)
(= statColor vLBLUE)
(= statColorNew vLRED)
)
(DoSound MasterVol 15)
(Joystick JoyRepeat 0)
)

(procedure (SetGameInit &tmp nextRoom skill)
(= deathMusic 10)
(= showStyle HWIPE)
(= possibleScore 500)
(= userFont 300)
(= smallFont 999)
(= bigFont 300)
(= timerStamina 20)
(= timerHealth 15)
(= timerMana 5)
(Bset SAVE_ENABLED)
(= currentDay 1)
(SetGameTime 8)
(= sillyClowns clownsOff)
(= arcadeDifficultyLevel arcadeNormal)
(= gameTimeScale timeNormal)
(= nextRoom 0)
(if (and suckBlueFrog TRUE)
(= skill 0)
(while (< skill NUM_ATTRIBS)
(= [egoStats skill] 80)
(++ skill)
)
(= [egoStats EXPER] 1900)
(= [egoStats HEALTH] (GetMaxHealth))
(= [egoStats STAMINA] (GetMaxStamina))
(= [egoStats MANA] (GetMaxMana))
(= [invNum iGold] 100)
(= [invNum iRations] 10)
(= [invNum iWaterskin] 1)
(= currentWater 10)
(StrCpy @userName {Hero})
(Bset fInMainGame)
(= nextRoom (BlueFrogTP))
else
(Bclr fInMainGame)
)
(if (not nextRoom)
(if (GameIsRestarting)
(= nextRoom rOpeningScroll)
else
(= nextRoom rPiracyNotice)
)
)
(return nextRoom)
)

It's the first line in the first procedure, actually. If I leave it in then sag $10 instruction runs as expected (although there are other oddities in other areas of the game). If I take it out, then sag $10 gets changed to sati $65 (and again, probably other errors elsewhere.

41
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 07, 2020, 08:43:30 PM »
I think sati is actually $B8 (wide) or $B9 (byte). And given the command it overwrote was the a single-byte parameter and it didn't overshoot the next command, I assume this sati was $B9.

I'm using this as a guide.

I confirmed the actual bytes in the file, and (as expected) they matched what the disassembly report showed. The game is changing them after loading them in memory.  This helps explain to me why this error would go away if I commented out a line earlier on... maybe it's overwriting whatever's at address 00a7.

I'm a fair bit out of my depth here, but I'm thinking maybe I try commenting out that one line, and keep an eye on that address, see if it still changes values.

42
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 07, 2020, 06:37:54 PM »
Aha!

So with this compiled code:
Code: [Select]
// EXPORTED procedure #1 (SetGameInit)
(procedure proc_0099
  0099:3f 02             link 2 // (var $2)
  009b:35 0a              ldi a
  009d:a0 009b            sag deathMusic
  00a0:35 00              ldi 0
  00a2:a1 11              sag showStyle
  00a4:34 01f4            ldi 1f4
  00a7:a1 10              sag possibleScore
  00a9:34 012c            ldi 12c
  00ac:a1 16              sag userFont
  ...

QFG2 is reading it fine until except until the instruction at  00a7
Instead of reading it as sag $10 it reads it as sati $65.

Then it carries on at instruction 00a9 as if nothing was wrong.

I haven't checked the actual binary file to see what the code really is, but clicking Script-Dissemble gives me the snippet I pasted above.

43
I suspect they started making SQ4 in VGA with a parser. We know Sierra had a VGA Interpreter with a parser at one point, because the 1990 VGA Xmas demo has it ( http://sciprogramming.com/community/index.php?topic=27.0).

And SQ4 was first released in March 1991. Seems reasonable they started development on the same parser the Xmas demo used 3 months earlier.

44
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 05, 2020, 11:26:34 PM »
The interpreter that shipped with QFG2 does not include the debugger, however Eric found a compatible interpreter in one of the Xmas cards or demos or something, which he bundled with his decompilation archive QFG2 source.

Its not an exact drop-in replacement, but it crashes in the same spots as the stock interpreter. The only difference Id noticed was concerning the cursor. The stock interpreter will let the game use its custom sword and lion head(?) cursors all the time, whereas the other interpreter will often show the built-in arrow cursor and disk drive cursor instead.  It drove me batty trying to figure out what I was doing wrong until I realized the interpreter itself was the problem.

Anyway, Ill try stepping through the code in the debug interpreter tomorrow. Might even be able to compare that, step-by-step with ScummVMs interpreter too.

45
SCI Syntax Help / Re: Problem recreating QFG2 source
« on: May 05, 2020, 11:24:17 AM »
Okay, I got it up and running in ScummVM.

And it works perfectly.  The score gets set properly, and the game doesn't crash when entering the alleyway. It does crash entering the alleyway when run in the original interpreter.

So, I think you're on to something about byte-code differences.  I'm assuming the scummvm interpreter is more flexible about accepting different SCI versions, or something.

EDIT:
I found a difference when comparing the disassembly from the original script.002 and my newly compiled script.002. Is this significant?  (This is just a small snippet, from the 1st procedure... The variable names are missing, which I assume is because I didn't generate any sco files for anything.)
Original SCRIPT.002
Code: [Select]
// EXPORTED procedure #0 ()
(procedure proc_0048
  0048:35 00              ldi 0
  004a:a1 65              sag 
  004c:78               push1
  004d:39 03            pushi 3 // $3 y
  004f:43 2d 02         callk DoSound 2

  0052:a1 80              sag 
  0054:78               push1
  0055:7a               push2
  0056:43 6c 02         callk Graph 2

  0059:a1 7f              sag 
  005b:36                push
  005c:35 08              ldi 8
  005e:22                 lt?
  005f:30 0014            bnt code_0076
  0062:34 032b            ldi 32b
  0065:a1 99              sag 
  0067:35 0f              ldi f
  0069:a1 9a              sag 
  006b:35 00              ldi 0
  006d:a1 95              sag 
  006f:35 04              ldi 4
  0071:a1 96              sag 
  0073:32 0011            jmp code_0087

new compiled SCRIPT.002
Code: [Select]
// EXPORTED procedure #0 (SetGraphicsSoundInit)
(procedure proc_0048
  0048:35 00              ldi 0
  004a:a1 65              sag suckBlueFrog
  004c:78               push1
  004d:39 03            pushi 3 // $3 y
  004f:43 2d 02         callk DoSound 2

  0052:a0 0080            sag musicChannels
  0055:78               push1
  0056:7a               push2
  0057:43 6c 02         callk Graph 2

  005a:a1 7f              sag colorCount
  005c:36                push
  005d:35 08              ldi 8
  005f:22                 lt?
  0060:31 17              bnt code_0079
  0062:34 032b            ldi 32b
  0065:a0 0099            sag hpStatusView
  0068:35 0f              ldi f
  006a:a0 009a            sag hpFontColor
  006d:35 00              ldi 0
  006f:a0 0095            sag statColor
  0072:35 04              ldi 4
  0074:a0 0096            sag statColorNew
  0077:33 15              jmp code_008e

So, they look nearly the same... but I think the sag commands on the original one are all 1 byte, whereas the sag commands on the new one are mostly 2 bytes.  So, now what can I do with this information?

Pages: 1 2 [3] 4 5 ... 8

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.111 seconds with 21 queries.