Author Topic: Debugging protection LSL5 with Winuae  (Read 58 times)

0 Members and 1 Guest are viewing this topic.

Offline slipperypete

Debugging protection LSL5 with Winuae
« on: Yesterday at 06:53:50 AM »
Evening Gents

Well ive managed to get my head around the code for lsl5 Atm machine.
Even found the codes in SCummvm and SCI Companion BUT im having trouble tracking it down in winuae debugger.
Even tried looking for the code in decimal and hexidecimal and just cant find it which is frustrating.

If anyone  has had any expereience of what the value woud become with looking it up in Amiga code Id be very very greatful.



Many thanks.

You can always count on Slippery Pete



Offline Kawa

Re: Debugging protection LSL5 with Winuae
« Reply #1 on: Yesterday at 07:40:33 AM »
The ATM machine closeup, room 258, uses the TTDialer script (#20), which can tell if it's supposed to be readable numbers or weird symbols. View 10 has the dialer interface including readable buttons, and view 11 has the weird buttons. Pressing a button, weird or otherwise, concatenates its value into a string, so you spell out "555 123456" or whathaveyou. This string is then parsed in two separate steps, one for the area code and one for the rest of the number. Why is it a string? Because SCI variables are inherently 16-bit so "555123456" wouldn't fit.

Each button has a key to look for so you can dial by using the keyboard, and a key it'll append to the fully-composed number. Keyboard inputs change for the ATM, but their numerical values remain, so if you dial "130 63639" on a regular keypad, that'll be the actual string value in memory. And if it's the weird ATM buttons, they'll have the same digit values in the same places so if you blindly press the same buttons you'll get the same actual string value in memory.

The best part is, not one thing I just described is particular to the DOS or Amiga versions. The dialer and copy protection work the same way in both! So you don't really need WinUAE's debugger to figure any of this out. Both of them use the same ASCII character set, so those string values with the digits you've dialed so far would be identical.

(Sluicebox's decompilation may throw you off a bit if you look at rm258.sc, where the copy-protection numbers include negative values. This is because the decompiler assumes a signed value (-32k to 32k) while you can also write them as unsigned (0 to 65k) and it'll Just Work. This includes converting the string value "34023" to -31513 and still comparing equal to 34023! This is because 34023, which is a little higher than 32767, is 1000'0100'1110'0111 in binary, and as you can see the leftmost bit is 1 so it can also be read as -31513.)

Hope this helps!


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

Page created in 0.111 seconds with 21 queries.