Author Topic: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?  (Read 3786 times)

0 Members and 1 Guest are viewing this topic.

Offline lwc

Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« on: April 27, 2024, 01:26:18 PM »
LSL6 VGA has an actual debug mode whereas the SVGA version has just "leftovers" (also in TCRF here and here).

But those "leftovers" are mostly just a very closed list version of the real debug mode's Get item, so I was wondering if you can migrate what the VGA version already has. Or are they too different apart?
« Last Edit: April 27, 2024, 02:59:53 PM by lwc »



Offline Kawa

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #1 on: April 27, 2024, 01:43:13 PM »
Considering they're based on two different system scripts, I'd wager they are indeed perhaps too far apart as you say it.

Offline lskovlun

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #2 on: April 27, 2024, 03:05:46 PM »
...I am reminded yet again that the stock dialog boxes in SCI32 are ugly.

Offline lwc

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #3 on: April 27, 2024, 03:17:42 PM »
Considering they're based on two different system scripts, I'd wager they are indeed perhaps too far apart as you say it.
Well, if it helps, this wiki section suggests 1.000.000 is the latest version in both VGA and SVGA and both source codes exist here in VGA and here in SVGA for comparison.

...I am reminded yet again that the stock dialog boxes in SCI32 are ugly.
According to the wiki above and also this one, this game was not done in SCI32 (only LSL7 was or at least SCI3).

Offline Kawa

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #4 on: April 27, 2024, 03:22:48 PM »
(this is something of a trollish post)

Which SCI32 exactly?

Offline lskovlun

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #5 on: April 27, 2024, 06:28:26 PM »
According to the wiki above and also this one, this game was not done in SCI32 (only LSL7 was or at least SCI3).
You're reading it wrong. LSL6 SVGA was very much SCI32. And it's ugly: The buttons are too big and their captions are poorly adjusted.

Offline doomlazer

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #6 on: April 27, 2024, 07:40:10 PM »
Here is the lsl6 hires debugger. I wasn't able to port all the commands because several kernel functions seem to be missing from SCI32.

Anyone know if SCI32 has equivalents for Show, Memory, IsObject, etc.. Seems strange you can't switch to the control and priority views, but the lsl7 debugger doesn't have them either.

Offline lskovlun

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #7 on: April 27, 2024, 10:42:30 PM »
The debug versions had some extra kernel calls. There is a Priority kernel call which would show the priorities, but it's been commented out in the available source code. One problem is that SCI32 uses priority values that are much larger than in SCI16, making it harder to map them meaningfully to colors. And there was no control screen, so not much point in that.

Offline lwc

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #8 on: April 28, 2024, 03:54:29 AM »
You're reading it wrong. LSL6 SVGA was very much SCI32. And it's ugly: The buttons are too big and their captions are poorly adjusted.
What precisely am I reading wrong? See screenshots. If something is wrong there, since they're non public editable wikis it's them, not me.

Here is the lsl6 hires debugger. I wasn't able to port all the commands because several kernel functions seem to be missing from SCI32.
Thanks! Just wondering, how many changes if any did you have to make?
About Help (SHIFT + /) can you fix/add the following:
  • Add ALT + E to the screen
  • Put ALT + X in the right alphabet order
  • Add ALT + Z to the screen
  • Write (non working) for the non working ones or just remove them altogether
?

Offline doomlazer

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #9 on: April 28, 2024, 02:15:24 PM »
Thanks! Just wondering, how many changes if any did you have to make?
About Help (SHIFT + /) can you fix/add the following:

I updated the help text and made some other minor improvements.

It didn't really take that much work to port, but I skipped most of the commands that had issues.

The debug versions had some extra kernel calls. There is a Priority kernel call which would show the priorities, but it's been commented out in the available source code. One problem is that SCI32 uses priority values that are much larger than in SCI16, making it harder to map them meaningfully to colors. And there was no control screen, so not much point in that.

Is this the best reference for info on SCI32 right now? https://github.com/OmerMor/SCI32

Offline lwc

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #10 on: April 28, 2024, 02:52:09 PM »
  • Add ALT + E to the screen
  • Put ALT + X in the right alphabet order
  • Add ALT + Z to the screen
  • Write (non working) for the non working ones or just remove them altogether
Thanks for doing these! But some notes:
  • Why is alt+z in a different font?
  • At the game launch, why does the teleport fail to restore? Instead of letting me pick a savegame, it just errors out. It does work when launched mid-game.
  • Why doesn't the teleport menu appear when restarting? I mean, it's there in game launch but not when restarting.

Offline doomlazer

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #11 on: April 28, 2024, 04:46:52 PM »
Thanks for doing these! But some notes:
  • Why is alt+z in a different font?
  • At the game launch, why does the teleport fail to restore? Instead of letting me pick a savegame, it just errors out. It does work when launched mid-game.
  • Why doesn't the teleport menu appear when restarting? I mean, it's there in game launch but not when restarting.

1. Is that in ScummVM? In my experience SVM doesn't render SCI text well; the text seems to change aspect ratios or something in different parts of the screen. Check if it's correct in DOSBox, because it's not easy to switch fonts mid Print string.

2. Save/Restore is intentionally restricted by the game under a few different conditions. The debugger just doesn't do anything to override that because it would require patching a major system script.

3. The "Where To?" procedure is export 1 in the debugHandler script #911. It's triggered in the LSL6 init method, but not the restart method. Altering that would require a 0.scr patch, which would need to overwrite the games existing 0.scr patch. Not worth it when you can call it with ALT-T at anytime. It doesn't really even have any useful destinations in my opinion.
« Last Edit: April 28, 2024, 04:55:19 PM by doomlazer »

Offline lwc

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #12 on: April 29, 2024, 05:14:48 AM »
1. Is that in ScummVM? In my experience SVM doesn't render SCI text well; the text seems to change aspect ratios or something in different parts of the screen. Check if it's correct in DOSBox, because it's not easy to switch fonts mid Print string.
True, there's indeed no such issue in DOSBox (attached).

Quote
2. Save/Restore is intentionally restricted by the game under a few different conditions. The debugger just doesn't do anything to override that because it would require patching a major system script.
Can the Restore option be removed the the game launch then?

Quote
It doesn't really even have any useful destinations in my opinion.
Not sure I understand, you can manually type in the number of any of the at least 60 rooms.
« Last Edit: April 29, 2024, 05:26:37 AM by lwc »

Offline doomlazer

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #13 on: April 29, 2024, 01:57:33 PM »
Quote
It doesn't really even have any useful destinations in my opinion.
Not sure I understand, you can manually type in the number of any of the at least 60 rooms.

I just meant that the buttons don't take you anywhere useful. Intro, Hotel exterior and lobby can all be reached within a few seconds without debugging. More location buttons would have been useful in my opinion.

I attached a zip below with "Restore" removed when the player is at room 0. I've left it as-is on my repo because I kind of like the "error" message; it's normally impossible to trigger, I think.

It turns out I couldn't have been more wrong about changing the font mid-string. If you're working in SCI1.1 or above it couldn't be easier. I just noticed the following in the SC documentation, which I completely forgot was available:

Quote from: SCICompanion documentation
Message text can contain information about which fonts and colors to use. Here are some examples:

Code: [Select]
Hello, |c5|this part is in color number five|c|, and this is not.
Hello, |f8|this part is in font eight|f|, and this is not.
|f5|This entire message is in font five.

The mapping for the font and color indices is provided by the calls to TextColors and TextFonts in your game?s init method in Main.sc.


Edit: |c| and |f| don't seem to work in EQ1CD which is SCI1.1, so maybe it's not supported in all versions, IDK.
« Last Edit: April 29, 2024, 03:19:21 PM by doomlazer »

Offline lskovlun

Re: Can you migrate LSL6 VGA's debug mode to LSL6 SVGA?
« Reply #14 on: April 29, 2024, 03:44:18 PM »
Is this the best reference for info on SCI32 right now? https://github.com/OmerMor/SCI32
I guess so. Nobody has written anything on the topic. Kawa had a blog entry on the SCI32 pic/priority thing, but I can't seem to find it.


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

Page created in 0.022 seconds with 22 queries.