Skip to content
turican0 edited this page Nov 22, 2019 · 202 revisions

Reverse engineering of game Magic Carpet 2 from assembler to c/c++ language

Short text about reverse engineering dos code

Beta version 0.91 Published!
-added missing DLL
-added setting for game and video speed
-added script for GOG version game data extract
(bug - in first run game crash somebody)

Beta version 0.9 Published!
-game is full playable without big bugs(maybe :)
-added WIN32 Binary for testing

Playable beta will be ready soon :)

Table of tests:

Level Index Begin In game 1 In game 2 In game 3
Level 1 OK-190928 ? ? ?
Level 2 ? ? ? ?
Level 3 ? ? ? ?
Level 4 ? ? ? ?
Level 5 ? ? ? ?
Secret 1 ? ? ? ?
Cutscene 1 ?
Level 6 ? ? ? ?
Level 7 ? ? ? ?
Level 8 ? ? ? ?
Secret 2 ? ? ? ?
Level 9 ? ? ? ?
Cutscene 2 ?
Level 10 ? ? ? ?
Level 11 ? ? ? ?
Level 12 ? ? ? ?
Secret 3 ? ? ? ?
Level 13 ? ? ? ?
Cutscene 3 ?
Level 14 OK-191001 OK-191002 OK-191002 OK-191002
Level 15 OK-191004 OK-191004 OK-191005 OK-191005
Level 16 OK-191005 OK-191005 OK-191005 OK-191005
Level 17 OK-191006-with random diffences OK-191006 OK-191006 OK-191009
Cutscene 4 OK-191012
Level 18 OK-191012 OK-191013 OK-191013 OK-191013
Secret 4 OK-191013 OK-191013 OK-191013 OK-191013
Level 19 OK-191018 OK-191018 OK-191019 OK-191020
Level 20 OK-191020 OK-191021 OK-191021 OK-191026
Secret 5 OK-191026 OK-191026 OK-191026 OK-191026
Level 21 OK-191026 OK-191026 OK-191026 OK-191026
Level 22 OK-191030-with random diffences OK-191103-with random diffences OK-191103-with random diffences OK-191103-with random diffences
Level 23 OK-191104 OK-191106 OK-191106 OK-191106
Level 24 OK-191107 OK-191115 OK-191116 OK-191116
Cutscene 5 OK-191116
Level 25 OK-191117 OK-191118 OK-191118 OK-191118
Level 9 and 10 fixed


Level 8 fixed

Upscaling graphics finished, this is comparison of old and enhanced graphics:


4 x upscaled sprites fixed. For day levels only now.

Test of 4 x upscaled sprites. Animation and correct alpha channel not works.

Fixed lighting feature:(this feature works only in some game versions of original)

Editor version 190819
-added better selection of entites
-added checkpoint tables
-added images selection for entites types, any entites subtypes and checkpoints

## 0.50(included binary version):
-fixed levels 6 and 7
-fixed select spell type
-fixed any problems with loading level
-many next fixes


## 0.49:
-fixed levels 4 and 5
-fixed any problems with castle destroying
-many other fixes


Test next editor update...

First test of cave level 4 - with interesting diamont roof bug

Next update of editor. I rewrite it to kiss_sdl framework, run in separate window now.

I update editor. Now you browse standart levels and change all terrain atributes.

I started creating a small level editor integrated in REMC2 code. Now only for testing load level procedures. In the future it may be used to spread the content of the game.

## 0.48:
-fixed level 3
-fixed any problems with mouse positions(when spell select)
-rewrite any terrain generate functions
regression fixed - this bug is in original game, too
when run game with "skipscreens" comand line variable, in first run, game menu is black
## 0.47(included binary version):
-first two levels fixed, and playable as in original game
-128x128 textures, 640x480 and best graphics in default
-fixed many errors
-many fix of 64bit version - now can run game, game menu work, level select map work, but game not playable
regression: you must restart game after set language
## 0.46:
-second level mosty playable(can not finish, and next minor bugs)
-added 128x128 textures(any water tiles not cleaned now)


Experimental 128x128px textures works!! :)


Next test...


I test texture engine for use bigger textures(game have cyberpunk look :)...


Black name of enemy wizard fixed...


I test ESRGAN neural network for upscale texture from 32x32 to 128x128 pixels in future(original textures on bottom and resized on top - used manga109 model)


## 0.45:
-fix many differents in dword_0xA4_164 structure
-fix many loading problem
-level two particly playable(with black enemy sorceler name and drop game after meet with him)


## BUG - autocomplete game after load :)


## 0.44:
-first level can play same as original(again)
-now find how fix of this bug:


## 0.43:
-again can play level 1 now(without ending)

## Fan video of BUG - mana on run :) ---


## 0.42:
-state similar as revision 0.30

## 0.41:
-again fixed first 7 frames
-similar bugs to revision 0.27

## 0.40:
-tons code after arrays to structs rewriting fixed
-count bugs is similar as Release 0.25

regressions - game can not run at now - I must analyse whole start game and rewrite next structures

-tons code after arrays to structs rewriting fixed
-count bugs is similar as Release 0.25
## --- rewriting dword_0xA0_160 structure complete---
Rewriting dword_0xA0_160 structure:
At now(15.05.2019)
150000 of 150000 lines
## --- rewriting dword_0xA4_164 structure complete---
Rewriting dword_0xA4_164 structure:
At now(13.05.2019)
150000 of 150000 lines
## --- rewriting second structure complete---
Rewriting second structures:
At now(09.05.2019)
150000 of 150000 lines
## --- rewriting main structure complete---
I rewriting bytearray to struct entity type_str_0x6E8E.
This step is very important for better code readability and 64x build version.
The transcript will last 1 weeks, and then I expect many regressions.
At now(21.4.2019)
114000 of 114000 lines substructs with 3d axis
and 114000 of 114000 lines of main structure rewriten.
## 0.39:
-HI-res fixed
-fixed carpet position in level menu

## 0.38:
-First test HI-res
-finded problems with texts, menus and terrain

## 0.37:
-Can play level 1 as original
-in game music
-can load and save game

Older news - versions 0 - 0.36