Author Topic: How does EcoQuest 1 allow to enter any code and not just the copy protected one?  (Read 8600 times)

0 Members and 1 Guest are viewing this topic.

Offline lwc

Eco1 has a copy protected code. It's entered into the initial room's door's keypad.
The room is 400.sc and the keypad is 65.sc (aka keyStuff.sc).
Half the websites that mention eco1's copy protected code state it's 9721 while the other half state it's 9731.

The CD version removed the keypad scene completely (clicking the keypad is equal to clicking the door, which just opens it directly).
But the floppy version does something very weird:
  • If you enter a random code, there's a red light but the door gets opened anyway
  • If you enter the correct code, there's a green light and the door gets opened
Both provide exactly the same points too.

So my question was the Floppy's SCI code hacked into to make any code work? If so, why not just color every random code as green too? I've deleted all SCR files and still it was hacked.
Both floppy versions do so via rm400.sc's:
Code: [Select]
(self setScript: (ScriptID 65 0) self) ; keyStuffIf their code mention 9731 (see screenshot) how come every code works too? And what controls the red/green light?



Offline Kawa

If local11 is 9731, flag 14 is cleared. So script 65 local11 is theCode and flag 14 is dolphinRoomLocked. If you get the combination wrong, keyStuff says that's not the right code, exits, does not clear the flag, and script 400's toDolphinRoom exits early. At least, that's the intent.

(The light turns green or red because of (led cel: (if (== local11 9731) 2 else 1) init:) in enterScript.)

Places where flag 14 is set (door is locked):
  • keyStuff state 0
  • keyStuff state 5 (failed)
  • rm400 fromDolphinRoom
Places where it's cleared (door is unlocked):
  • keyStuff state 4 (success)
Places where it's checked:
  • toDolphinRoom state 2

Not a lotta places where it could go wrong. And by all means, it works as intended in the 1.10 version I have but not 1.00. Yet for all intents and purposes their scripts are the same.
« Last Edit: October 01, 2023, 05:22:23 PM by Kawa »

Offline lwc

If their scripts are the same and not a lotta places where it could go wrong, how come it's hacked in v1.000?
Was this game released on Floppy with a failed copy protection which was only fixed in 1.1 (while at the same time was removed altogether for CD v1.1)?
« Last Edit: October 01, 2023, 06:47:37 PM by lwc »

Offline Kawa

That's the thing, isn't it? You call it hacked, but the scripts seem perfectly fine and at least none of the patches in my copies affect these two rooms. It's a gosh darn mystery. I've done a global search and those are the only places where that flag is used. Only the CD version didn't give me the same search results, but you know why.

Offline lwc

It's just as mysterious to me why so many reviews or even walkthroughs falsely state the wrong code, not to mention some of those guides state "you must enter the right code or it won't work" as if they didn't even try it.

Offline doomlazer

I used to know the answer to this. When I did the EQ1 restoration I enabled the keypad for the CD version. As you mentioned the script is still there, but if you wire it back in through script 400 it's buggy. I recall it allowed any code like the floppy versions (not sure) and clicking outside the keypad area would crash the game. I can't remember how I fixed it, but I always figured the reason the keypad was removed from the CD version was because they didn't have time to solve the crash - they added it back in the Discovery series edition.

FYI, the game included a newsletter that has the code written in the margins. Maybe those sites had trouble reading the sideways text and, since any code works, they assumed 9721 was the correct code.

edit: I've attached the 65.scr and 400.scr that restores the keypad in the CD version. If only 400.scr is used the game crashes when clicking outside the keypad, but rejects bad codes. They must have fixed the wrong code bug before removing the keypad.
« Last Edit: October 01, 2023, 11:22:24 PM by doomlazer »

Offline lskovlun

It's been cracked alright (that branch instruction at 0CCF has been rendered ineffectual):
Code: [Select]
[...]
0CC9: lsl        local_11
0CCB: ldi        2603
0CCE: eq?       
0CCF: bnt        lbl_0CD2
      lbl_0CD2:
0CD2: push1     
0CD3: pushi      0e             ; selector <lsLeft>
0CD5: calle      0333 0004 02
0CDB: pushi      008d           ; selector <cue>
[...]
(that's the version that came from Jimmy Maher's site here.

Offline lwc

That screenshot above is even more of a mystery. It states the code with 3 no less than 3 times (some of which in a very large font), and still thousands of sites got confused and thought it's 2?

The version from Maher's site is the the Internet standard one (v1.000).

In your attached CD files, if both are used does it reject bad codes?
And would you like to add to that ZIP the same files for Floppy v1.000 which accepts bad codes?
And will ScummVM still bypass those codes unless the --copy-protection command line parameter is used?

P.S.
Can you add source code to that ZIP and/or explain what you changed?

Offline doomlazer

That screenshot above is even more of a mystery. It states the code with 3 no less than 3 times (some of which in a very large font), and still thousands of sites got confused and thought it's 2?

The version from Maher's site is the the Internet standard one (v1.000).

In your attached CD files, if both are used does it reject bad codes?
And would you like to add to that ZIP the same files for Floppy v1.000 which accepts bad codes?
And will ScummVM still bypass those codes unless the --copy-protection command line parameter is used?

P.S.
Can you add source code to that ZIP and/or explain what you changed?

I had some data loss around the time I made the CD patches and lost the source. I don't remember the exact changes. Yes, using patch 65 and 400 makes the keypad fully functional in both DOSBox and ScummVM. You don't need  to use --copy-protection.

Offline lwc

That's kind of a bug in ScummVM then since all numbers should work unless --copy-protection is used.
The problem is I can't submit this since officially (unless someone finds Floppy v1.1) the game was shipped without a working copy protection.

Offline Collector

SVM has had a policy to skip copy protection fro games that also had an official release without, i.e. CD releases vs diskette releases.

BTW, if you are looking for version 1.1 it is the Sierra Discovery Series release.
KQII Remake Pic

Offline lwc

But it's not supposed to skip them if the aforementioned command line parameter is used. Anyone with access to that Floppy v1.1 version please check with and without that command line. This is based on the post above that stated v1.1 actually uniquely blocks wrong codes (but it didn't mention how was it played)
« Last Edit: October 02, 2023, 11:52:16 AM by lwc »

Offline Kawa

If you mean my post, that was the Discovery edition, SCIDHUV on DOSBox.

Offline lwc

Thanks! If it natively blocks wrong codes could you try it in ScummVM with and without that command line?

BTW, is that manual online? Most archives have just the general technical manual.

Offline Kawa

scummvm ecoquest-1-disco: red light, message, door remains closed.
scummvm --copy-protection ecoquest-1-disco: exactly the same.

No saves, no skipping the gull cleaning intro, and most of all neither run accepted 1337.


I tested my copy of EQ1 1.0 in German just now for a laugh and it too won't let me in. That was SCIDHUV on DOSBox btw.
« Last Edit: October 02, 2023, 12:45:58 PM by Kawa »


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

Page created in 0.059 seconds with 24 queries.