This page contains notes for the game Prigodi Pìonerki Ksenì.
I titled the page "Prigodi Pìonerki Ksenì" using GOST 7.79-2000 / ISO 9:1995 Romanization according to this guideline. I don't know Ukrainian, but it seems a more contemporary Romanization may be "Pryhody Pionerky Kseni". Wikipedia has a big article. Go ahead and move the article if appropriate. The English translation, "The Adventures of Pioneer Ksenia", would work too.
https://archive.org/details/msdos_Priklyuchenia_Pionerki_Ksenii_shareware has the game files. !README.1ST and KSENI.DOC are encoded using code page 866 (:e ++enc=cp866 in Vim). The same two files are available at https://sites.google.com/site/pionerkaksenia/materialy/dokumentacia. The files mention the presence of a map editor and other modding information, but I did not find such in the Internet Archive copy of the game.
The documentation files also mention a series of articles by Yury Lesiuk in the Programmer's Newsletter (Программистские Ведомости). I haven't been able to find a copy of those.
The format of the executable file KSENI.COM is unlike that of the original COMIC.EXE. It is in COM format (headerless executable), not DOS MZ format, and it is not EXEPACK-compressed. The executable shows the hallmarks of having let COMIC.EXE uncompress itself and then copied out of memory; certain tables that hold original interrupt vectors, that are all zero in COMIC.EXE, are partially nonzero in KSENI.COM. Update: This is confirmed by the modder's own notes:
Один из основных, - упаковка программ DOS-овской утилитой EXEPACK. Что это значит для программиста: что он имеет возможность уменьшить количество места, требуемого для хранения своей программы, кроме того, уменьшается время загрузки программы с диска и все это за счет сжатия областей, заполненных последовательностями одинаковых байтов в специальный формат.
Поскольку в нашем дизассемблерном листинге и так будет много темных мест, не стоит усугублять себе задачу лишней работой (то есть, пытаться дизассемблировать текст загрузочного модуля).
Лучше подумать над тем, как быстро сделать слайд программы.
Дальше все просто: уничтожив файл, содержащий экран заставки, запускаю (по Go) в отладчике Комика. Я действительно оказываюсь на нужном адресе. Остальное - дело техники и команды записи файла (W) отладчика, и готов файл - слайд памяти.
KSENI.COM has a 128-byte stub at the beginning that performs the relocations that would otherwise be done by the DOS loader, then jumps to the main program. Because the MZ header of COMIC.EXE is 256 bytes, that means that data structure offsets in KSENI.COM are a fixed 128 bytes away from the corresponding offsets in the uncompressed COMIC.EXE.
- Ukrainian Wikipedia article
- https://sites.google.com/site/pionerkaksenia/
- https://www.mobygames.com/game/dos/prigodi-pionerki-kseni
- https://exvideogiocatore.blogspot.com/2018/06/the-adventures-of-captain-comic-episode.html (Italian)
Modder's Documentation#
There's a 64-page document, Приключения Понерки Ксении или 25 лет Спустя (Adventures of Pioneer Ksenia or 25 years after) by @yuriylesyuk, dated 2015. I don't know if this is the same as the Programmer's Newsletter articles, but it contains some information about how the reverse-engineering was done. -- Mouser (talk) 14:51, 16 December 2019 (EST)
Reverse Engineering Tools#
Various reverse engineering tools are available in my Comic-related Git/git-annex repo:
git clone https://www.bamsoftware.com/git/comic.git
cd comic/
git annex get