WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tiny Core and games  (Read 19205 times)

Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: Tiny Core and games
« Reply #15 on: September 06, 2013, 02:32:39 AM »
byteshaman, you do have the jp locales installed. But is one of these active? To check this, run this command: "locale" (without -a): this will give you the details about the active locale. As explained here:
http://yeti.selfip.net/cms/index.php/post/2013/06/21/UTF-8-everywhere-in-TinyCore-Linux
, the active locale is set (for TinyCore) by changing the bootloader options, so that your usual TinyCore entry contains a line like this (depending on which bootloader you use):
linux /path/to/vmlinuz […] lang=ja_JP.utf8
or this:
append […] lang=ja_JP.utf8

And as tinypoodle said, create the .fonts directory inside your HOME, and be sure to save it between reboots using TinyCore's persistence mechanism, and put your fonts inside.

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #16 on: September 10, 2013, 11:39:02 AM »
i need to do more experimenting and application - seeing as to how it did work....then it didnt work...
at some point in there...a few times, i think i accidently corrupted my install and had to start from the beginning.

well, my wrist got broken so i will have to be back after that heals.

thanks for your help. i will re-re-review all the links and keep looking into the wiki more in the meantime.

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #17 on: September 10, 2013, 02:34:36 PM »
no urgency - as it will probably be weeks before i get back on this, but :
when i change the locale to japanese, does that mean it will only show japanese characters in all of my programs? or does it do like windows change locale,
where it still shows and processes english, until i startup a japanese game or view a japanese webpage.

does it run the english and japanese simultaneously or do i have to reboot with different boot options each time i want to do english and japanese. i suppose its really great in this case because tiny core is small and boot happens quickly

Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: Tiny Core and games
« Reply #18 on: September 11, 2013, 02:41:29 AM »
A user's "locale" is just a group of hints given to applications about your country, language, currency, decimal notation… preferences. The application may or may not follow the hints, depending on its support for your choice. A system-wide locale is defined and given to applications instead if you have not defined a personal choice.

In short, locales are just hints and do not change by themselves what the system is able to do.
If an application was created with only the English language in mind, then whatever the locale, it will display English.
If an application was created with only the Japanese language in mind, then whatever the locale, it will display Japanese.

All of this is 100% unrelated to character input and screen rendering.

- Input is given to applications using "events". An English-aware application can perfectly receive an event for a Japanese character (which may get displayed as garbage), and vice-versa. Rich input (not just what is shown on your keyboard) is achieved using a program such as iBus or SCIM, or to a lesser level, using the xkb "levels" and the Compose key.

- Output is done following the current locale, which must be able to interpret the characters. For example, my current locale is French, but Japanese characters are displayed correctly because my locale is fr_FR.uft8, where "utf8" is the magic part for handling any character ;) Had I used fr_FR.iso88591 instead, any Japanese character would be misunderstood and would show up as several unrelated characters. Finally, understanding characters leads to nowhere if the system finds no way to translate the character code to a "picture" on screen; that's where fonts are important: you have to install fonts for all character sets, that you may want to display, whatever your locale is.

I hope this helps. I also hope I did not write any mistake: I was never taught this; I just understood from experience… :)

Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: Tiny Core and games
« Reply #19 on: September 11, 2013, 02:46:28 AM »
I forgot:

By setting a couple of environment variables before launching an application, it is perfectly possible to have different applications using different locales ;)

And also: good luck with your broken wrist! I hope it will heal fast!

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Tiny Core and games
« Reply #20 on: September 11, 2013, 03:22:57 AM »

I typed in
:~$ getlocale()

and the prompt turned into
>

I don't know what that means or what to do. i typed in
>q

to get back to regular command prompt....

thanks for reading. thanks for any help.

I believe the the > at the terminal is waiting for you to complete the command


Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: Tiny Core and games
« Reply #21 on: September 11, 2013, 04:54:41 AM »
When you type "getlocale()" at the prompt, it must be seen by the shell as the start of the definition of a function, the name of which is "getlocale". Typing "q" on the next line tells the shell that command "q" should be run whenever the "getlocale" function is invoked. It is also possible to chain several commands by grouping them inside curly braces:
Code: [Select]
function_name() {
command1
command2
}

Well… Anyway, this was obviously not the intent of byteshaman :D In Linux, a command is launched by typing its name only, without braces.

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #22 on: September 11, 2013, 11:07:27 AM »
yesterday i downloaded most all the wiki pages. YY deserves a nobility award for helping me understand all this. i am going to read the wiki and hopefully reach a better comprehension upon return. a also saved the utf-8 everywhere page to my references to. with the explaination given here by YY i am better able to apply understanding to the concepts contained in that page

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #23 on: September 19, 2013, 11:52:33 AM »
well, my wrist is good enough to type again, so i might as well keep on keeping on.
I read through most of the wiki, didnt understand alot, but helped me understand more.
what i have done :
installed TC to virtualbox on windows 7
installed getlocale.tcz
used ~# getlocale.sh
to configure
ja_JP.utf8 & en_US.utf8
----------------------------------------------
i downloaded mikachanfont from this page :
http://mikachan.sourceforge.jp/linux.html
i am not sure which one to use so i downloaded 3 of them, one from each category
i have mikachan.ttf, mikachan-P.ttf, mikachan-PB.ttf, mikachan-PS.ttf
i decided to use mikachan.ttf
i moved this to /usr/share/fonts/mikachan.ttf
and i also mkdir /home/tc/.fonts - and add mikachan.ttf to that folder as well
----------------------------------------------------
then i went to what i believe is the bootloader and changed the options.
~# editor /mnt/sda1/tce/boot/extlinux/extlinux.conf
and added to this file : lang=ja_JP.utf8
on the APPEND line
----------------------------------------------------
when i rebooted with this configuration nothing changed when i did a ~# locale
so then i rebooted again, this time i hit f2 key on boot and added : lang=ja_JP.utf8

this seems to have had some effect, but i still cant see japanese fonts.


so now i am revisiting http://yeti.selfip.net/cms/index.php/post/2013/06/21/UTF-8-everywhere-in-TinyCore-Linux

hopefully with more understanding, but i dont think i have enough yet. i am going to attempt the routine. i will probably fail. but i will post the results.
any input is very much appreciated.

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #24 on: September 19, 2013, 12:49:19 PM »
i am stuck in understanding what/where my boot manager is.
i thought it would either be /mnt/sda1/tce/onboot.lst
but that looks like just the list of extensions to load
so then i thought it would probably be
/mnt/sda1/tce/boot/extlinux.conf

but after modifying this(adding lang=ja_JP.utf8 , and rebooting, i still get "Setting language to C" on boot TC loadup. i have this reference : http://wiki.tinycorelinux.net/wiki:the_boot_process
there is alot on that page that depends on prior understanding that i do not have yet. time and application will remedy this, but i find myself using time to loop around misunderstandings without base knowledge to apply.

skipping the boot manager modification until i can find a more comprehensive reference

i believe i have japanese fonts installed. that was the next step, i do not believe for CJK i would need to install the xfonts-unifont extension?

i installed urxvt.tcz

i believe i created the symbolic link using this command :
~# ln -s /usr/local/bin/urxvt ~/.local/bin/aterm

but then at this point :
Quote
Of course, I also ensure that my ~/.local directory is saved by TinyCore across reboots, and that ~/.local/bin is in the PATH. In fact, I also create a similar symbolic link with the name xterm; it helps sometimes…

i believe you are referring back to the boot manager, and persistence
so i ~# editor /opt/.filetool.lst
...and i'm not sure how to specify subdirectories in this, so i just added the *usr* directory to this

i went to install bash via apps panel, and it just says bash.tcz failed....so i'm going to reboot to see if i broke something.

rebooted. no terminal. i think it was supposed to use urvxt - but something got fubar'd.
well. i guess that ends my efforts on this for today. tomorrow i will begin again with a fresh install.
thanks for reading. thanks for any help.
 :)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Tiny Core and games
« Reply #25 on: September 19, 2013, 01:16:45 PM »
Just noting that the builtin editor does not support advanced encodings, so you shouldn't use it to test if your fonts are working. Use a more advanced editor, or open README.ja in Firefox for example.
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Tiny Core and games
« Reply #26 on: September 19, 2013, 01:31:16 PM »
The boot loader itself can not be edited with a simple text editor.

The bootloader is usually installed in the boot sector of a hard disk (Master Boot Record = MBR) and sometimes in the first sector of a partition (Partition Boot Record = PBR). The latter also makes it possible to have several boot loaders installed on the same hard drive. There is only one MBR, but if you have more than one partition, you also have more than one PBRs where a boot loader could possibly be installed.

This actually is a configuration file of a boot loader
Code: [Select]
/mnt/sda1/tce/boot/extlinux/extlinux.confBut it doesn't seem to be used because it is located inside the tce directory (I have never seen that).

More likely the bootloaders configuration file is located in some place like
Code: [Select]
/mnt/sda1/boot/extlinux/extlinux.confor maybe
Code: [Select]
/mnt/sda1/boot/extlinux.conf
Other config files you might to look out for, in case you have anothe bootloader installed like GRUB, GRUB4DOS or GRUB2, are menu.lst or grub.cfg.

My boot loader (GRUB2) is installed into the MBR, while its config files are located in my fourth partition: sda4/boot/grub/grub.cfg

--

I don't think its such a good idea to add the hole /usr folder do the backup. It might become big depending on the amount of extensions you load (You'll find most loaded software in /usr) so that shutting down and rebooting takes very long and you get lots of dublicated data (extensions + /usr).

--

Geany is a good editor.
Download a copy and keep it handy: Core book ;)

Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: Tiny Core and games
« Reply #27 on: September 19, 2013, 01:48:25 PM »
Wow, byteshaman! You're the one who should be praised, for such dedication! Most beginners would have abandonned by now. But I'm glad to be able to help you; you learn the most by trying, and I'm sorry to not have enough time to make this all a bit easier.

Well, back to business :P
Fonts (.TTF files) being in /home/tc/.fonts, edit your /opt/.filetool.lst file, and add this line inside:
Code: [Select]
home/tc/.fonts (without the starting slash)
Loading xfonts-unifont is a good idea. However in this case (Japanese), I'm not sure it will be of much help. Just be sure to put the right fonts (with glyphs for Unicode codes corresponding to characters you want to display) inside /home/tc/.fonts/.

Looking at your screenshot, you did achieve your goal, although you did so by changing the APPEND line at boot. To make it permanent, you indeed have to locate and configure your boot loader.
Assuming your bootloader is Extlinux, it should live inside a "boot" directory at the root of your boot partition. Thus, the right path to the config file should be "/mnt/sda1/boot/extlinux/extlinux.conf"

Now, as both curaga and I said, you have to use applications that understand languages other than English. For the editor I suggest Geany: lightweight and featureful though not overwhelming :)

Concerning "/mnt/sda1/tce/onboot.lst", you're right: it's the list of extensions to load at boot. "mylocale.tcz" should be part of this file.

As for persistence, Assuming "home/tc" is not already in your /opt/.filetool.lst file, you'll have to add this line:
Code: [Select]
home/tc/.localto get your symbolic links saved across reboots. This has nothing to do with the boot manager ;)
Oh, and don't, ever!, put "usr" into /opt/.filetool.lst! You'll just ensure terribly long shutdown and boot times, if not a crash :D

Keep us informed. We'll help!

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #28 on: September 19, 2013, 02:34:58 PM »
much appreciated. im working on other things now, but checked back for updates. i will apply these lessons tomorrow and just search for that bootloader sometime today.

i was able to put a smile on my face for the responses.
Quote
yin yeti said :
I'm sorry to not have enough time to make this all a bit easier.

i am very grateful for your responses. please dont be sorry for not having time. my comprehension level is very low. you and others have done perfect by just giving me a little bit of time and a little bit of solutions. i have learned to moderate the good things in life. what we currently have is good. dont give me too much of your time because you will only experience my foolishness in response. what we have now is perfect. i will work on turning my foolishness into wisdom with my own time and effort - everyone's help included.

much appreciation.

Offline byteshaman

  • Newbie
  • *
  • Posts: 25
Re: Tiny Core and games
« Reply #29 on: September 20, 2013, 10:56:06 AM »
well, i think i figured a little more out.
i did make my /usr/share/fonts folder persistent

following the advice that i needed to find my boot folder, the correct boot folder, it made me suspicious that my virtual machine configuration was the culprit of the problem.
i also realized that virtualbox (the virtualmachine in windows 7 that is running this TC OS) - virtualbox was booting to a virtual cd-rom drive : sr0 prior to booting to virtual hard drive : sda1

so i fixed both of those. i now have ja_JP loading as lang at boot, after modifying the extlinux.conf file.
i will now proceed the attempts to show some japanese. is it possible (or even necessary) to specify more than one "lang=" locale?set the locale to both english and japanese? thats just an afterthought