Opened 22 years ago

Closed 21 years ago

Last modified 21 years ago

#210 closed defect (fixed)

MI2: Copy protection in french ver

Reported by: (none) Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 2

Description

When using the french version of Monkey Island 2 I cannot enter any number at the copy protection screen, which kinda hurts the playability of this fine game :) (The numbers on the french keyboard are usally obtained using shift+1,shift+2... I also tried the keypad)

Anyway, keep up the great work !!

Ticket imported from: #551447. Ticket imported from: bugs/210.

Change History (24)

comment:1 by SF/bbrox, 22 years ago

Owner: set to SF/bbrox

comment:2 by SF/bbrox, 22 years ago

Well, for now you can try to bypass the copy protection screen... Look at some commented code in scummvm.cpp (or grep for MONKEY2 in the code if not there).

But well, I will try to see with my own French keyboard how to fix this.

comment:3 by SF/drebon, 22 years ago

that's strange; i also use the frenchversion of MI2 with scummvm and it works well... Just try to enter the number without the shift key (& instead of shift+1)

comment:4 by SF/bbrox, 22 years ago

drebon: what is your configuration ? SDL on Linux or Windows ?

Because on my box (SDL on Linux), I have the same bug whatever the Monkey Island version I choose (be it the French or the English version).

What is also your SDL configuration ?

comment:5 by (none), 22 years ago

Logged In: NO

Hi there.

(I'm the bug submitter)

I just tried the english version of MI2 and I have the same problem so I guess this has something to do with my french keyboard. In fact I loaded the save screen in scummvm and there is no way I can send numbers using the traditional bindings (under linux, didnt try win32 yet).

Thanx for the tip for bypassing the protection though.

comment:6 by SF/andrej4000, 22 years ago

Strange! The german version worked and worksperfectly the whole time... I always use the Win32 Daily version of ScummVM

comment:7 by SF/ender, 22 years ago

Any progress on this, anyone?

comment:8 by fingolfin, 22 years ago

Summary: Copy protection in french ver of MI2MI2: Copy protection in french ver

comment:9 by fingolfin, 22 years ago

It seems to me that this is not a global issue, since nobody else has similar problems, and nobody can reproduce it. I think we can close this for now.... that is, maybe "nobody" (bug originator) can borrow a non- french keyboard from somebody and test with that?

comment:10 by fingolfin, 22 years ago

BBrox just corrected me, he can of course reproduce the bug, sorry folks.

Anyway, I think the problem is caused in sdl.cpp, by the way event->kbd.ascii is generated. A function mapKey() is used for that. Now in various backends of SDL, there is a bug that causes it to not generate correct keysyms - e.g. in the past the MacOS backend behaved this way.

One thing we could try is to enable the unicode support in SDL (i.e. SDL_EnableUNICODE), and then use the unicode field to set event->kbd.ascii - that *might* help..

To the bug poster: you said you got the problem under linux. It would be great if you also could test under Windows, if the same problem occurs there.

comment:11 by fingolfin, 22 years ago

Anything new on this? BBrox, did you find out anything?

I would try the unicode idea, but lacking a french keyboard I couldn't test it.

comment:12 by SF/gerbs, 22 years ago

I just tried scummvm with MI2 and I have exactly the same problem: after hitting enter to get to the copy protection, I cannot type in any number (though the keyboard still works, as when hitting the space key the "paused game" message is displayed).

I am using a French version of MI2 which I got from a magazine and has an exe file on the CD that bypasses the protection when running the game.

I am running a Debian GNU/Linux system, with a French keyboard and the locale fr_FR@euro.

The problem is not present under Windows 98.

comment:13 by SF/ignalina, 22 years ago

Just a friendly reminder to anybody using OS X: you can simulate a french keyboard by choosing it under Keyboard under International under System Preferences. Study your new keyboard layout with Key Caps. I'm sure something similar can be done on Windows as well.

comment:14 by SF/zorbid, 22 years ago

I've got a belgian keyboard (almost the same layout than the french keyboard. With the original engine, I have to shift the number above the letters). In scummvm, it works with no problems, without the shift.

comment:15 by SF/lethalwp, 22 years ago

you also can try to xmodmap your keys before running the game, then xmodmap it back when finished

example of little script (to complete):

#!/bin/bash

xmodmap -e "keycode 10 = 1 1 bar exclamdown"

export SCUMMVM_MIDI=/dev/sequencer export SCUMMVM_MIDIPORT=1 ./scummvm -eseq monkey2

xmodmap -e "keycode 10 = ampersand 1 bar exclamdown"

etc :)

comment:16 by SF/th3d4rk, 22 years ago

what about add the "virtual keyboard" PocketScumm use??? maybe map this to F8 for example. so nobody got problems.

comment:17 by SF/xtrochu, 22 years ago

Just for the record.

I have a french keyboard here with a french win2K. latest cvs version requires me to switch to english keyboard to type numbers in the MI2 protection screen (this is also a french MI2, but As said in one other post, this is not related to the language of the game but to the keyboard layout).

comment:18 by fingolfin, 21 years ago

See also https://sourceforge.net/tracker/index.php?func=detail&aid= 600258&group_id=37116&atid=418820

comment:19 by SF/hervenicol, 21 years ago

Same problem for me... it does not work with shift+num, nor without shift, nor with the numpad (num lock activated or not)... I tried different key combinations (CTRL+num, ALT+num CTRL+SHIFT+num, etc...), I didn't manage to enter any number.

I entered the game by asking for a room (-b2 or -b7 or...) when launching the game. But it is not really satisfying as I can't see the introduction... :(

I will try with an english keyboard tonight. And if I can, I will try on Windows XP

My current config is Monkey2 5.2.2 (if I well remember what scummvm said to me), on Redhat 8. With a french keyboard. ;)

comment:20 by SF/hervenicol, 21 years ago

I tried with US international keyboard on Linux, and it works.

In fact we just cannot enter any number in any game. I have the same problem for savegames as I use to name it "RV01", "RV02" and so on... and I saw it doesn't work with Day Of The Tentacle too.

But upper case letters work.

comment:21 by SF/hervenicol, 21 years ago

I investigated a bit more...

It seems that the key capture function returns an ASCII code, which depends on the X11 keyboard configuration. And for uppercase letters, it is simply: "if key is from 'a' to 'z' and shift is pressed, make it uppercase" so it doesn't work for digits when you have to press shift (ie on french keyboards).

Most of the games simply use the scancode, then convert to ASCII with their own keytable. It makes all keyboards behave just like an US keyboard, but at least it works. Perharps it is possible with SDL?

Second solution would be to combine... but I hardly believe it is possible: use ASCII for a-z keys and known keys (shift/ctrl/enter...) and use scancodes for all other. It implies SDL returns the ascii AND the scancode of the key...

Another drawback of the actual method is I can't use '.' for skipping sentences since without 'SHIFT', the key gives ';'. And I think there are many other.

As I never coded anything with SDL, I don't know the feasability... I promise I'll learn. :)

comment:22 by fingolfin, 21 years ago

This should be fixed, at least for the SDL backend. Please verify with latest CVS (latest = from this exact moment onward :-)

comment:23 by fingolfin, 21 years ago

Owner: changed from SF/bbrox to fingolfin
Resolution: fixed
Status: newclosed

comment:24 by SF/hervenicol, 21 years ago

I tried with CVS-20021125, it behaves well for me. (only tried with SDL on Linux). Even the dot key (shift+';' on french kb) when I don't want to read what the characters are saying! Great! ;)

Note: See TracTickets for help on using tickets.