PPCenter :: devblog

PPcenter. Arts and craft for my Sega Saturn. Since 1847 :D

Similar looking kanji definitions file update

Written by cafealpha no comments
It's been a while I didn't received an email not related to Saturn from my homepage, so I was quite happy when siikamiika asked me if he could safely license similar kanjis definition file in MIT licence in his similar-kanji project


What is "similar kanjis definition file" ? It is a text file used in "My JWPce" which defines ... kanjis looking similar
The original idea about this is not from me : I initially found this feature in kanji.free.fr (Japanese → Omelette du fromage online kanji dictionary), and thought it would be cool if this feature could be available directly from my favorite Japanese electronic dictionary.
So I build this "similar kanjis definition file", and added support for it in "My JWPce".

data/images/20170220_jpwce_similar_kanjis.tb.png
Example of in JWPce's kanji information
dialog : "似" looks like "以",
"代" and "伐"

If you're Japanese, or were learning Chinese characters from elementary school, this definition file is probably a complete nonsense for you, since you know how to enter the correct kanji from keyboard on first try.
But that's not the same done for foreigners who started to learn Japanese in their twenties, so that this feature helped me a lot when learning new kanjis :
 1. In JWPce, enter a kanji similar the new one you can't read
 2. Search for that new kanji in similar kanjis list
 3. ????
 4. Profit !

So of course, MIT licensing of this file is OK, and I was also glad to overwrite my old definition file with siikamiika's version, so that I could enjoy all new entries added in this version
Open source is love, open source is life, thank you siikamiika

Read more Similar looking kanji definitions file update

The quick lazy brown dog jumps over the foxes ?

Written by cafealpha no comments
The quick lazy brown dog jumps over the foxes ?
The brown fox quick lazy jump jumps over the ?
The ... well, I forgot what it was, but just to say that I spent a some time in messing with fonts in my Save Data Manager application
In fact, it would be more accurate to speak about code pages (*), because I finally added support for Japanese text display :]

(*) For those who forgot what code pages was :
Once upon a time, before Unicode unified every characters, (and also made strlen function not working correctly on UTF-8 text), there was a custom for all countries in the developed world to define up to 128 extra characters that would be used in second half of ASCII character table.
Of course, Japan wanted to do the same, so it added poor looking "1 byte kana" characters on this extra 128 character page, and also added the remaining characters (including kanjis) after that, which gave birth to Shift-JIS encoding.

Since Saturn was developed, during this prehistoric "codepage" era, it is normal to find can find some code page remnants in Saturn software

One of these "code page remnants" is the comment string stored in each Saturn saves : didn't you noticed that sometimes BIOS displays Japanese characters in its save management screen ?

So, Save Data Manager must display Japanese characters instead of garbage characters when showing comment in save data selection menu !

data/images/20150704_save_delete_menu.png
What save comment looked like before
adding Japanese characters display ...
(It's a 6 months old screenshot)

How to do this ?
First, I need to verify that BIOS was defining characters according to Shift-JIS charset, and the best way to do this was to modify some save states and see what BIOS is displaying on screen.

And if possible, displaying as much as possible characters at once would improve the job's efficiency, so I choose to modify Keio Flying Squadron saves since they take only 32 bytes each.

So here comes the reason I choose a such weird title for this article : I wanted to display all font characters at once on screen
In the facts, I didn't used such a complex "lazy brown dog jump blah blah blah" sentence. I just displayed all the character in ascending order, and here is what it looked like in BIOS screen :

data/images/20160203_chars_katakana_raw.png
Repeat after me : -アイウエオカキクケコサシスセソ...
Looks good  That's definitely 1 byte kana characters in typical order.

Saturn BIOS also has ability to display European (accented) character, and switching from a codepage to another is just the matter of changing a byte per save data, so let's try and see what it looks likes :
data/images/20160203_chars_francais_raw.png
Same text as above, I just changed the language value

Oh, it looks like the good old ISO 8859-1 (latin1) charset

The picture above was displayed by setting French (my native language) language code in save, and setting to another language code (I tried with Spanish) gave unsurprisingly the same results.

So in the Saturn world, one byte equals one character, and there are two codepages to handle in order to display save comment string.
I first feared I had to deal with multi-byte characters (that is a real pain to handle when coding software), but that's not the case, and in fact it's relatively easy to do.

(2 hours later)
data/images/20160203_font_katakana.png data/images/20160203_font_francais.png
Katakana and European fonts

Hmm, theses characters are looking cute :)
It's seems that it is time to feed my image conversion tool ^^

(5 minutes later)
Okay, latin.bin and katakana.bin files are ready, I should add some codepage stuff in my text display code now !

(1 hour later)
data/images/20160203_font_test3_katakana_text_and_menu.png
Finally some exotic language displayed !
I lost 30 minutes in wondering why application wasn't
initially showing Japanese characters ... and it appears that
I was "cleaning up" the comment string by replacing exotic
character into space character
"It wasn't a bug, it was a feature "

It made sense when Japanese character wasn't displayed
correctly, but it was time to remove this string cleanup code.


Job complete ? Well, there are still some details to fix, and this is what take the most of time when developing software, but at least the boring part of the job is done :]



As a reward for me, I can now set save comment to a cool one when importing save data and that comment isn't defined.
I initially used a dummy "ImportData" string, but the holy "セガサターン,シロ" string defined in hitomi2500's ss-save-parser project is definitely better.
data/images/20160203_save_default_comment.png
セガサターン,シロ !


Last but not least : finishing this main quest opens doors to firmware translation side quest !
Well, Japanese translation would be ugly, because kanji characters are not available (just old-looking katakana characters : this article title would look like ザレージフォックスジャンプオーバーザブラウンドッグ on firmware :D), and on software side, handling multi byte characters is a real mess, so I don't want to do make a Japanese version of Pseudo Saturn Kai and Save Game Manager.

However, translation for European languages is now technically possible
Well, "possible" doesn't means I will do this right now  This is a low priority job, so I will do it when I will have enough time and motivation for it.

BTW, in order to test if exotic character display was OK on Pseudo Saturn, I tried to print "beta" glyph (defined in European codepage) on the title bar :
data/images/20160211_pskai_main_menu.png
Pseudo Saturn Kai main menu
Without any surprises (text display routines are common between Pseudo Saturn Kai and Save Data Manager), it works !
I can finally indicate that this is a beta version ^^





Edit : oops, the feature to inform me when a comment is posted seems (once again) not to work, and consequently I didn't noticed new comments :/

Here are the comments I replied so far. Since I'm late, they deserve to be re-posted here :

I am really happy to hear that you don't have cancer anymore!! Congratulations! I wish you a really long and happy life! :)     Anon

@Anon : It doesn't guarantee I'm cancer free !
CT scans indicate that there is no evidence of cancer relapse, but CT scan has limits (it doesn't shows millimeter-order tumors), so I continue regular cancer screening and taking care in everyday life

--------------
Hey @Spawn, could you upload those Saturn saves you have on your PC?
I have been looking for an archive of Saturn game saves for months now and I haven't found any.
Maybe with the save states I have, and your saves I can upload them somewhere and start an archive? I'll give you credit for it of course.     ReyVGM
@ReyVGM : Thank you for sharing your saves on segaxtreme !
They will be available for everybody on Save Data Manager, so that it will be easy to import on Saturn or emulator.

--------------
best wishes for 2016 !!!     vbt
@vbt : Thank you ! Best wishes for 2016 too !!!
Well, we are already in February, sorry ^^;


--------------
It's great to see your active development, cause my saturn projects are almost in hibernation today (i'm a bit in a time trouble). And i'm glad my code is of some use.
Good luck!     hitomi2500
@hitomi2500 : Hehe, I got some free time until end of March ... I don't know what it will be after that, but what's sure is that I will continue to have fun with my Saturn  Please keep continuing the good work too :]

--------------

stunned and confused

last night I went on a sega saturn nostalgia trip.

I had to catch up with 8+ years @ segaxtreme.
I found antime's usbcart, hitomi2500's fork, hitomi2500's new "wasca" and your stuff here.

sounds great ...
I need to dig up my saturn and finally start something.
I have a usb-cart from 2006 from pinchy (he seems inactive since 2007).     seal1
@seal1 : Hey, I remember seeing your nick in segaxtreme thread about yano/Freewing transfer device (I built a Freewing device at that time).
It was a long time before I made my first USB dev cart ... nostalgia.
Many members forgot about Saturn and left segaxtreme, but luckily vbt and antime are still active.
You're always welcome on segaxtreme, even if it just to say "hi"

Read more The quick lazy brown dog jumps over the foxes ?

Old project release : JWPds

Written by cafealpha no comments
Last day, I was digging in my HDD, and found an unreleased project !

Project name was JWPds, and about Japanese words/kanjis translation tool running on Nintendo DS.
data/images/20150609_jwpds_radic.tb.jpg
Looking for the meaning of 絵 kanji on my DS :
bottom screen allows kanji input and
kanji meaning is displayed on top screen.


data/images/20150610_jpwce_radic.tb.png
Looking for the meaning of 絵 kanji on my PC with JWPce.
(JWPce is not my project, it is just for comparison with JWPds)

Project is unfinished, because developing things on DS took more time than expected, and also because I learned enough Japanese, hence didn't needed to develop/use this application any more

Stable binaries and latest (not stable) sources are available, so please have fun with them

For more informations, download links, screenshots, etc, please have a look in the project page .

If you have any message, etc to send to me, don't hesitate to post a comment to this article

PS for DS fans lost here, and wanting leave a comment : comments require a Turing test asking for my favorite game console, and it's not DS
Please have a look in my blog in order to solve this test (If you are an human, it won't be difficult ).

PPS to Saturn fans here : don't worry, I don't plan to shift to DS homebrew development !
The console I like to debug on is and will always be Saturn

Read more Old project release : JWPds

マイノートパソコン やっとWin7へアップグレード - Finally could install Win7 on my note PC

Written by cafealpha no comments
先月の2週間の入院(=科学療法)のときに助かった小型ノートパソコン。
やっとWin7をインストールしました。
(一応、WinXPは念のため残しているがこれからは基本的にWin7からブートする予定です。)

7年も前の骨董品ですが、小型で軽いなので結構気に入ってる、このパソコン^^;

来月は1ヶ月の入院の予定なので、壊れないといいね。

Read more マイノートパソコン やっとWin7へアップグレード - Finally could install Win7 on my note PC

採血(6/13) - Blood collection (June 13) - Iron lack

Written by cafealpha no comments
今日も採血だった。
「貧血気味の数値が続いているよ。鉄分のある食事をしっかり食べてくださいね。」と先生に言われた。
ほうれん草、お肉、チョコレートの食生活…食事制限としてはいい方だな。

Read more 採血(6/13) - Blood collection (June 13) - Iron lack

Rss feed of the tag