Karateka versions

Prince of Persia related subjects that do not have their own boards.
Thenasty
Sheikh
Sheikh
Posts: 34
Joined: February 27th, 2020, 10:19 pm

Re: Karateka versions

Post by Thenasty »

I guess that's what I missed, going into the Full Editor.


attaching DOS ZIP File Test here (original time stamps) :D
Attachments
KARATEKA.ZIP
(75.31 KiB) Downloaded 59 times
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Karateka versions

Post by David »

Thenasty wrote: August 26th, 2020, 3:06 pm I have not pass the first gate inside the castle, it keeps killing me. I am doing something wrong.

I need to look at some youtube clips to see how I pass that impaling gate (do I need to run or walk slowly?).
In case you haven't found it out yet:
Spoiler: show
You need to kick at the gate. The gate will close and open. You can run through it while it's opening.
(For the last part, pressing "&" might be handy, see below.)

A few more tips for playing:
* You can press space while running to instantly switch into fighting mode.
* You can press "&" (ampersand) in fighting mode to instantly start running. This key is not documented in the manual.
* Another undocumented key: "0" (zero) will stop running, like the left arrow; but unlike the left arrow you cannot retreat with it.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Karateka versions

Post by David »

I figured out how to make the 1994 version playable.

Problem #1: The hack triggers the tamper protection which disables controls after you enter the castle.

The fix is similar to this: viewtopic.php?p=30220#p30220

Search: 83 7E 08 02 75 03 E8 B8 25
Change: E8 B8 25 to 90 90 90

Details:

Code: Select all

code:1B55 83 7E 08 02                          cmp     [bp+bal_index], 2
code:1B59 75 03                                jnz     loc_1B5E
code:1B5B E8 B8 25                             call    tamper_check ; <-- change to NOPs
code:1B5E
code:1B5E                      loc_1B5E:

Problem #2: The folder must be mounted to A:, otherwise the game locks up at startup.

To allow the game to work on any drive:

Search: B2 00 B4 0E CD 21 C3
Change: B2 to C3

Details:

Code: Select all

code:42F4                      set_drive_A     proc near
code:42F4 B2 00                                mov     dl, 0 ; <-- change to RETN
code:42F6 B4 0E                                mov     ah, 0Eh
code:42F8 CD 21                                int     21h             ; DOS - SELECT DISK
code:42F8                                                              ; DL = new default drive number (0 = A, 1 = B, etc.)
code:42F8                                                              ; Return: AL = number of logical drives
code:42FA C3                                   retn
code:42FA                      set_drive_A     endp
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Karateka versions

Post by David »

I've recently figured out how to run an original copy-protected version of Karateka.
Note that this will probably be interesting only to collectors and preservationists.
Everyone else can just use the one of the hacked versions.

You will need the following:
  • A floppy disk image of the game which contains the non-standard sector used for copy protection.
    • It's the third download here: https://www.old-games.ru/game/download/1647.html -- Click the third "Скачать файл" link, then on the next page click "[http ссылка]".
    • This is version 1.1 of the game. I could not find any disk image of the original 1.0.
    • The disk image on archive.org is mostly the same, but it lacks the special sector. It's in a format which cannot even contain it.
  • An emulator which can use this kind of disk image.
    • PCE can use it. You can get it here: http://www.hampa.ch/pce/download.html
    • Use the version with PC-DOS 3.30: pce-0.2.2-xt-pcdos-3.30.zip, or the corresponding ZIP from the latest snapshot.
    • The compiled versions are for Windows. If you are not on Windows then you need to compile from source; but you still need the config file, the BIOS ROMs, and the hard disk image with DOS from the ZIP in the previous point.
Preparing the game and the emulator:
  • Extract pce-0.2.2-xt-pcdos-3.30.zip into a new directory (I called it pce-0.2.2-xt-pcdos-3.30).
  • If you are not on Windows then extract the source and compile it. Then copy the compiled binaries into the pce-0.2.2-xt-pcdos-3.30/bin directory.
  • Extract the disk image into the pce-0.2.2-xt-pcdos-3.30 directory.
  • Open pce-5160.cfg in a text editor and find the part where the first floppy drive is defined: search for fd0.
  • In that section, delete or comment out the lines starting with "file=", and insert the following: file = "Karateka [1986] [5.25] [1 of 1].td0"
Running the game:
  • Start run-cga.bat and wait until the emulated DOS starts.
  • If you are not on Windows then make a copy of run-cga.bat named run-cga.sh, change "\" to "/", make it executable, and start it instead.
  • Enter A: to switch to the floppy drive, then enter karateka to start the game.
  • You can set the speed of the emulation by pressing ESC followed by a digit between 1 and 8.
Post Reply