Wednesday, 28 October 2009

Imagina'Malaga 2009 - Salón Del Comic de Málaga

This week-end on Saturday the 24th, I went to a nice comic convention called ImaginaMalaga organized by an association called Qi'Tomer. It took place in a buiding aimed at hosting student initiatives in Teatinos, the biggest student area of Málaga.


It was really nice : besides the usual "nerd crowd" playing Magic on the grass and fighting with foam swords, there were quite a few presentations from Spanish authors/illustrators, as well as bookstands for signing.

I attended the following presentations :

  • - a Madrid author presenting his latest noir comic, "The Empty Inside" - good drawing style, noir atmosphere with original ideas
  • - a famous Spanish illustrator called Luis Royo, about the genre of fantasy illustration as art


Luis Royo talking about his career as illustrator both in Spain and worldwide (US, Europe)


Luis Royo again, defending illustration as a genre of art on its own




Luis Royo's signature (which took me about 30 minutes to get... not so long to wait in the end)



I met the Wee team, an edition line publishing both online and printed forms of webcomics. Webcomics in Spain tend to be pretty geeky, with a lot of allusions to the subculture of what geeks usually like : science-fiction, SciFi, video games, other comics, etc...
It was nice because they all signed their comics together.



A nice example of Wee signature :)


An author from Andalucia, hanging out in the Wee stand

Of course I stood in the (huge) line for Luis Royo's signatures, with the rest of the crowd :) He seemed to be the main star of the afternoon, along with Cris Ortega, a female illustrator. I had a good surprise at the end of the line : I was acquainted to another illustrator called Javier Trujillo, who was not as popular as the other two apparently. Which was even better since we had time to chat about his latest book covering the Gilles-De-Rais theme. And I got a complete drawing from him as a bonus :)

It was the end of the afternoon, so Javier (left) and I were both exhausted...^^ In the background you can see some of Javier's work. Exposed on the wall, second to the right, there is the illustration which he quickly redrew for me


Javier's signature drawing - a reproduction of his exposed work in the previous picture.


Overall this convention was a good surprise, living in a town like Málaga which does not have the sophistication of an European capital makes moments like this really appreciable. I have only been there one afternoon, and the amazing part is that the convention took place for 4 more days... Such an amount of effort and richness of content, especially for the scale of Malaga. In the end, it also shows that the student circle can be a major driving force in culture, especially culture targetting audiences of teenagers or young adults.

Attending this kind of event in a smaller town also implies that you are closer to the artists, and do not suffer so much hassle (no long line in particular).

Thursday, 22 October 2009

Chinese input methods in SCIM - quick overview

I have LinuxMint Elyssa (based more or less on Ubuntu Hardy Heron). I have installed the SCIM framework as well as the SCIM-chinese IME for Chinese.


I would like here to cover the various input methods proposed by this IME for Simplified Chinese. There are quite a few, and I have not seen so many articles covering SCIM under this angle. For traditional Chinese, I am not quite there yet.


With my version there are five choices :


  • - Erbi - ???
  • - Erbi-QS - ???
  • - Wubi - Wubizixing, an input method based on character structure
  • - Ziranma - Ziranmashuangpin, an input method based on character pronunciation, of type shuangpin


    http://eyegene.ophthy.med.umich.edu/unicode/KeyboardLayouts/ZiRanMaPinYinKeyboard.html

  • - Smart Pinyin - zhinengpinyin (written 智能拼音 in simplified characters on the interface), a set of input methods all based on pinyin (Romanization of characters based on pronunciation)


The Smart Pinyin operates in four modes :
  • - zhong 中 or jianti display Simplified Chinese characters
  • - ying 英 : freely type in English (thus bypass the whole Chinese input method thing)
  • - fanti  繁: display Traditional Chinese characters, mostly used for Hong-Kong and Taiwan


Here the difference is only in the font - each simplified character is the equivalent of one traditional character.


Then besides choosing the character set, the user can also choose between different pinyin methods :


  • - quanpin 全拼 : quanpin (complete pinyin) uses the standard pinyin writing of a character to propose character candidates, unlike the shuangpin methods. It also has tones, available by adding a trailing digit for the phonem's tone. This is then probably the best choice for beginners in simplified Chinese. It also has an interesting feature : it supports phrases, and if you type only the respective onset consonnants in a series of phonems, it proposes phrases candidates, i.e. several characters forming a phrase.
  • - shuangping 双拼 : whereas the full pinyin rendition of a character can take up to 6 Roman characters to write a phonem, shuangpin (abbreviated pinyin) enables you to enter an abbreviated version of pinyin which only takes 2 Roman characters to represent a phonem. There are many shuangpin methods available under the Smart Pinyin umbrella, each of them  having different keystroke layouts (associating consonnants/vowels to different Roman letters)
Shuangpin in SCIM-Pinyin :
There are various shuangpin methods in SCIM simplified Chinese, available either as Ziranma or as one of the shuangpin methods proposed by Smart Pinyin.
  •  - Ziranma uses its own keystroke keyboard layout, which is well documented. See :
    http://eyegene.ophthy.med.umich.edu/unicode/KeyboardLayouts/ZiRanMaPinYinKeyboard.html
  •  -  The other methods, available through Smart Pinyin, are :
         * ShuangPin Stone
         * ShuangPin ZRM
         * ShuangPin MS
         * ShuangPin Ziguang
         * ShuangPin ABC
         * ShuangPin LiuShi
I find that the most straightforward way to look up the keystrokes for each method is to directly check inside the scim-pinyin package's source code, more specifically in source file src/scim-pinyin.cpp. In sourcecode version 0.5.91, the relevant section begins at line 193 :

static const PinyinInitial scim_shuang_pin_stone_initial_map [] =

{
SCIM_PINYIN_ZeroInitial, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_ZeroInitial, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_Shi, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_Chi, // U
SCIM_PINYIN_Zhi, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_stone_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // B
{ SCIM_PINYIN_Uan, SCIM_PINYIN_ZeroFinal }, // C
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // G
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // J
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_In, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // M
{ SCIM_PINYIN_Iu, SCIM_PINYIN_ZeroFinal }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Ou, SCIM_PINYIN_ZeroFinal }, // P
{ SCIM_PINYIN_Ing, SCIM_PINYIN_Er }, // Q
{ SCIM_PINYIN_En, SCIM_PINYIN_ZeroFinal }, // R
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // S
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_Ui }, // V
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // W
{ SCIM_PINYIN_Uai, SCIM_PINYIN_Ue }, // X
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // Y
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_ZeroFinal, SCIM_PINYIN_ZeroFinal }, // ;
};




static const PinyinInitial scim_shuang_pin_zrm_initial_map [] =
{
SCIM_PINYIN_ZeroInitial, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_ZeroInitial, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_Chi, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_Shi, // U
SCIM_PINYIN_Zhi, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_zrm_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Ou, SCIM_PINYIN_ZeroFinal }, // B
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // C
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_En, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // G
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // J
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // M
{ SCIM_PINYIN_In, SCIM_PINYIN_ZeroFinal }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // P
{ SCIM_PINYIN_Iu, SCIM_PINYIN_ZeroFinal }, // Q
{ SCIM_PINYIN_Uan, SCIM_PINYIN_Er }, // R
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // S
{ SCIM_PINYIN_Ue, SCIM_PINYIN_ZeroFinal }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_Ui }, // V
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // W
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // X
{ SCIM_PINYIN_Ing, SCIM_PINYIN_Uai }, // Y
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_ZeroFinal, SCIM_PINYIN_ZeroFinal }, // ;
};




static const PinyinInitial scim_shuang_pin_ms_initial_map [] =
{
SCIM_PINYIN_ZeroInitial, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_ZeroInitial, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_Chi, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_Shi, // U
SCIM_PINYIN_Zhi, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_ms_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Ou, SCIM_PINYIN_ZeroFinal }, // B
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // C
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_En, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // G
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // J
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // M
{ SCIM_PINYIN_In, SCIM_PINYIN_ZeroFinal }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // P
{ SCIM_PINYIN_Iu, SCIM_PINYIN_ZeroFinal }, // Q
{ SCIM_PINYIN_Uan, SCIM_PINYIN_Er }, // R
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // S
{ SCIM_PINYIN_Ue, SCIM_PINYIN_ZeroFinal }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_Ui }, // V
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // W
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // X
{ SCIM_PINYIN_Uai, SCIM_PINYIN_V }, // Y
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_Ing, SCIM_PINYIN_ZeroFinal }, // ;
};




static const PinyinInitial scim_shuang_pin_ziguang_initial_map [] =
{
SCIM_PINYIN_Chi, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_ZeroInitial, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_Shi, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_Zhi, // U
SCIM_PINYIN_ZeroInitial, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_ziguang_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // B
{ SCIM_PINYIN_Ing, SCIM_PINYIN_ZeroFinal }, // C
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // G
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_Iu, SCIM_PINYIN_Er }, // J
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_Uan, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // M
{ SCIM_PINYIN_Ui, SCIM_PINYIN_Ue }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // P
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // Q
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // R
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // S
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_ZeroFinal }, // V
{ SCIM_PINYIN_En, SCIM_PINYIN_ZeroFinal }, // W
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // X
{ SCIM_PINYIN_In, SCIM_PINYIN_Uai }, // Y
{ SCIM_PINYIN_Ou, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_ZeroFinal, SCIM_PINYIN_ZeroFinal }, // ;
};




static const PinyinInitial scim_shuang_pin_abc_initial_map [] =
{
SCIM_PINYIN_Zhi, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_Chi, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_ZeroInitial, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_ZeroInitial, // U
SCIM_PINYIN_Shi, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_abc_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Ou, SCIM_PINYIN_ZeroFinal }, // B
{ SCIM_PINYIN_In, SCIM_PINYIN_Uai }, // C
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_En, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // G
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // J
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_Ui, SCIM_PINYIN_Ue }, // M
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Uan, SCIM_PINYIN_ZeroFinal }, // P
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // Q
{ SCIM_PINYIN_Iu, SCIM_PINYIN_Er }, // R
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // S
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_ZeroFinal }, // V
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // W
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // X
{ SCIM_PINYIN_Ing, SCIM_PINYIN_ZeroFinal }, // Y
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_ZeroFinal, SCIM_PINYIN_ZeroFinal }, // ;
};




static const PinyinInitial scim_shuang_pin_liushi_initial_map [] =
{
SCIM_PINYIN_ZeroInitial, // A
SCIM_PINYIN_Bo, // B
SCIM_PINYIN_Ci, // C
SCIM_PINYIN_De, // D
SCIM_PINYIN_ZeroInitial, // E
SCIM_PINYIN_Fo, // F
SCIM_PINYIN_Ge, // G
SCIM_PINYIN_He, // H
SCIM_PINYIN_Chi, // I
SCIM_PINYIN_Ji, // J
SCIM_PINYIN_Ke, // K
SCIM_PINYIN_Le, // L
SCIM_PINYIN_Mo, // M
SCIM_PINYIN_Ne, // N
SCIM_PINYIN_ZeroInitial, // O
SCIM_PINYIN_Po, // P
SCIM_PINYIN_Qi, // Q
SCIM_PINYIN_Ri, // R
SCIM_PINYIN_Si, // S
SCIM_PINYIN_Te, // T
SCIM_PINYIN_Shi, // U
SCIM_PINYIN_Zhi, // V
SCIM_PINYIN_Wo, // W
SCIM_PINYIN_Xi, // X
SCIM_PINYIN_Yi, // Y
SCIM_PINYIN_Zi, // Z
SCIM_PINYIN_ZeroInitial, // ;
};


static const PinyinFinal scim_shuang_pin_liushi_final_map [][2] =
{
{ SCIM_PINYIN_A, SCIM_PINYIN_ZeroFinal }, // A
{ SCIM_PINYIN_Ao, SCIM_PINYIN_ZeroFinal }, // B
{ SCIM_PINYIN_Ang, SCIM_PINYIN_ZeroFinal }, // C
{ SCIM_PINYIN_Uan, SCIM_PINYIN_ZeroFinal }, // D
{ SCIM_PINYIN_E, SCIM_PINYIN_ZeroFinal }, // E
{ SCIM_PINYIN_An, SCIM_PINYIN_ZeroFinal }, // F
{ SCIM_PINYIN_Ong, SCIM_PINYIN_Iong }, // G
{ SCIM_PINYIN_Ui, SCIM_PINYIN_Ue }, // H
{ SCIM_PINYIN_I, SCIM_PINYIN_ZeroFinal }, // I
{ SCIM_PINYIN_Ia, SCIM_PINYIN_Ua }, // J
{ SCIM_PINYIN_Un, SCIM_PINYIN_ZeroFinal }, // K
{ SCIM_PINYIN_Iu, SCIM_PINYIN_ZeroFinal }, // L
{ SCIM_PINYIN_In, SCIM_PINYIN_ZeroFinal }, // M
{ SCIM_PINYIN_Uang,SCIM_PINYIN_Iang }, // N
{ SCIM_PINYIN_Uo, SCIM_PINYIN_O }, // O
{ SCIM_PINYIN_Ng, SCIM_PINYIN_Eng }, // P
{ SCIM_PINYIN_Ing, SCIM_PINYIN_ZeroFinal }, // Q
{ SCIM_PINYIN_Ou, SCIM_PINYIN_Er }, // R
{ SCIM_PINYIN_Ai, SCIM_PINYIN_ZeroFinal }, // S
{ SCIM_PINYIN_Ian, SCIM_PINYIN_ZeroFinal }, // T
{ SCIM_PINYIN_U, SCIM_PINYIN_ZeroFinal }, // U
{ SCIM_PINYIN_V, SCIM_PINYIN_En }, // V
{ SCIM_PINYIN_Ei, SCIM_PINYIN_ZeroFinal }, // W
{ SCIM_PINYIN_Ie, SCIM_PINYIN_ZeroFinal }, // X
{ SCIM_PINYIN_Uai, SCIM_PINYIN_ZeroFinal }, // Y
{ SCIM_PINYIN_Iao, SCIM_PINYIN_ZeroFinal }, // Z
{ SCIM_PINYIN_ZeroFinal, SCIM_PINYIN_ZeroFinal }, // ;
};


Explanation :

Each shuangpin layout uses two structures, one for onset consonnants - ...initial_map - and one for vocal part - ...final_map.

It seems that the position of a pinyin phonetic constant inside the structure determines which kerboard letter it is associated to.
For example :

With the first method, shuang pin stone, I would enter hao, 好by typing "hd" to get the "h" onset consonant and then the "d" would actually represent the vocal part "ao".
See where is placed field SCIM_PINYIN_He in scim_shuang_pin_stone_initial_map, and where is placed field SCIM_PINYIN_Ao in scim_shuang_pin_stone_final_map.

Saturday, 17 October 2009

Playing Dark Castle on a Mac Plus emulator

Hello, this is my first post and I am going to explain how you can play again, on a modern PC, a great game which might have been forgotten since it didn't run on PC but on the Mackintosh.

That game is called Dark Castle : http://en.wikipedia.org/wiki/Dark_Castle

It is basically a platform game, but with a special feature : you have to shoot projectiles aiming with a computer mouse.
This was undoubtedly one of the first, if not the first, computer games using the mouse. No wonder it came on the Mackintosh, since that brand has paved the way for other systems in terms of human-computer interactions.

Another funny detail is, the main directional controls are not done with the arrow keys but with the ASDW keys. So this game probably also influenced the creators of Quake when they designed its controls.

Overall I really like the graphics. They are grayscale, and the style is cartoonish and it looks pretty good. The quality of the animation is amazing for its time, and brings back memories of another game, on the PC : Prince Of Persia, which was released later, in 1989.

What also strikes me is the humor displayed in the game. It has minimalist sounds but even with this little sound, the sound effects are really funny.
So watching the game demos at the title screen feels like watching a hand-drawn cartoon.

The game is very maniable too once you learn the gameplay, which is clearly explained in the game itself, using not a tutorial but inline storyboards. Another good design point.
Handling of the controls was thus pretty well achieved by the programmers.

Overall the game difficulty is well-balanced : it is a challenging game. I would compare it to the Contra/Probotector series : you die pretty often, you repeat the same levels often, but it always feels like you are actually learning a skill and not just repeating. So both games are hard for the right reasons.

In essence this is the opposite of another very famous platform game, Castlevania 1 on the NES, which was hard but for the wrong reasons. :)

The catch is, in order to play it you will have to emulate a whole Macintosh computer, OS included, because even though some ports were made on posterior systems they do not do justice to the original.
Quoting the wikipedia entry here :




A version for the Mega Drive/Genesis was released by Electronic Arts in 1991. Many believed this version did not do the game justice, citing sloppy controls, altered graphics, and cut sounds, it was panned by critics and gamers alike.[1]
A DOS version of the original Dark Castle was also released, which was closer to the original game. Because of the lower resolution, color was used to make up for it, also, because the PC didn't have a mouse at the time, aiming was done through the keyboard. There is some controversy over the colors, due to the nature of the coloring.

That game ran on Mackintosh computers, and it was released on the same year as the Macintosh Plus, Macintosh' 3rd model of home computers. To give you an idea of how you could have a modern GUI on a very early computer, those are the specs of the Mackintosh Plus, released in 1986 :



an MC68000 processor, 4M of RAM maximum, and a 512 by 342 black and white screen

This computer runs MacOS "classic". We will emulate this computer using the MiniVMAC emulator. http://minivmac.sourceforge.net/doc/about.html

First you need to get




  1. MiniVMAC : http://minivmac.sourceforge.net/

  2. HFV Explorer : Hdexp131.zip, see http://en.wikipedia.org/wiki/HFVExplorer

  3. Macintosh disc images for MacOS, a very good place to get started : http://minivmac.sourceforge.net/doc/start.html
    - SSW_6.0.8-1.4MB_Disk1of2.sea.bin
    - SSW_6.0.8-1.4MB_Disk2of2.sea.bin

  4. Macintosh archives for running on MacOS Classic the following software :
    - Stuffit expander : stuffitexpander4.01.sea.hqx which you can get at http://sunsite2.icm.edu.pl/pub/mac/umich/util/compression/
    - Dark Castle : Dark Castle.sea.hqx


  5. A ROM BIOS image for the MAC : for example vMAC.ROM


I got most of those from google, or here : http://www.euronet.nl/users/mvdk/System6_Downloads/



HFV Explorer is a file manager for windows, that enables you to access disks using the HFS filesystem, but also to create virtual disks using image files, and to access them just like you would access a disk. This will be useful because we will need to "insert" disks in our MAC emulator, first for the OS, then for the stuffit expander and finally for Dark Castle.



So you run your minivmac but nothing happens. That's because first you have to select a rom image. Then you have to insert the MacOS system disks. I got the version 6 of MacOS classic as a bin file, filenames :

SSW_6.0.8-1.4MB_Disk1of2.sea.bin
SSW_6.0.8-1.4MB_Disk2of2.sea.bin

Those bin files contain disk images (so no need to create the system disks with HFV Explorer) and need to be extracted with a modern version of StuffIt Expander. In general .bin and .hqx files (in this context) are archive files that require to be extracted with Stuffit. So you will need to get the current shareware version of StuffIt Expander and use it to extract your .bin archives.

The Stuff It for MacOS classic, and Dark Castle, archives respectively contain an executable installer and a .sea archive. So you have to put both the "old stuffit" installer file and the Dark Castle.sea archive on disk images (.dsk files).

In HFV Explorer, inside the file menu you can choose either to "format a new volume" (which will create a dsk image and mount it) or "Open existing volume" Ctrl-O (open an existing image file and mount it as a volume). Once a volume is mounted in HFV Explorer, it wil be displayed in the arborescence, in the left vertical panel. So you can create disks for your emulated MAC, and then you need to drag and drop a file (executable or .sea) in its corresponding disk volume.

This will pop up a copy dialog where you can choose the copy mode. You have several copy modes. I choose either Automatic or, if it does not work, "Raw data, data fork" (as opposed to "Raw data, resource fork"). You have to know that at its inception the Mac file system, HFS, was designed so that each file would be represented by two separate streams of data, the "data fork" and the "resource fork". For example, the binary data of an executable file would be stored in the data fork, while the associated info (executable version, author, etc) would be placed in the resource fork.

Trying to dump Dark_Castle.sea into the test_bin disk (stored in the test_bin.dsk image file).


So you should create disks for the OS, dark castle, the stuffit expander, and a big blank disk (10 or 20 MB would be neat) that you will use as hard drive. The Macintosh Plus apparently had no hard drive and you had to use a disk as hard drive.

One annoying thing is that if you mount a .dsk image in HFV Explorer, you cannot use or "insert" that disk in the miniVMAC at the same time. You have to close the HFV Explorer and if you want to use it again for disk editing you have to close miniVMAC.


Then you run your miniVMAC, "insert" the hard drive disk, and then insert the system disk 1. The OS installation is pretty straightforward.

After that you can install Stuffit using the installer on the stuffit disk. This is an old version of stuffit for MacOS classic, and you cannot get it from the stuffit website anymore, you ll have to search the internet. Finally get the dark castle .sea file from the dark castle disk you have made, extract it with the stuffit you have just installed in your virtual Mac, and at last you can play.


Okay this is the first version of an article I wanted to write a long time ago. feel free to eave comments, and of course to correct any mistake you can see !

I think the game is actually worth all the trouble, besides it is fun to play around with MAC emulation :)