STR9104/CNS1104 FreeBSD Port Progress

Returning from Indonesia, I continued my Freebsd porting attempt to the Emprex NSD-100. So far it’s going quite well. I took the FA526 CPU support from NetBSD, I use the 8250 driver for the UART, and default EHCI driver. I got stuck for a while on the EHCI part until Hans Petter Selasky pointed me that there might a problem in the busdma/cache handling. With the EHCI part fixed, I can get to the userland, booting from USB stick.

The remaining drivers that needs to be written are the OHCI and network. The OHCI shouldn’t take too much time, but I think the network will take quite a long time.

I was planning to clean up, and release the code today, but I was busy with something else, so may be I will release the code in the next few days. For those of you who are curious about the boot log, here it is:
Continue reading “STR9104/CNS1104 FreeBSD Port Progress”

Too many things to do

There are so many things to do lately, but so little time. Plus i have so many dental problems lately, three of my molar teeth has been pulled out in the last 2 months, and going to have the fourth taken next month. Going to dentist and waiting for the recovery always takes away my free time.

My wife just bought Nokia 5800, a Nokia series 60 5th edition phone. It means that i need to finish my SymbianBible port for 5th edition (mostly done, beta version is on symbianbible google groups). My wife also asked me to port MultiCounter to her new phone (done, not yet uploaded).

I have cleaned up the 2.6.29 port of STR9104 Soc, but i will need to clean up again, because of the new documentation from www.cnusers.org. I have also started the freebsd port, but the progress is not much yet.
Continue reading “Too many things to do”

STAR9104: Linux Kernel 2.6.29 and Starting FreeBSD port

I’ve finally updated my patch to 2.6.29, the patch can be downloaded from:
http://tinyhack.com/agestar/patch-2.6.29-star.gz

and the config file:

http://tinyhack.com/agestar/config-2.6.29-star

or if you want the image that i already compiled and test (image is compiled with 32 MB memory). This is NOT a FIRMWARE

http://tinyhack.com/agestar/zImage-2.6.29

when i have the time, i will work on creating a new firmware image.

Some changes:

  • The machine ID is now registered in http://www.arm.linux.org.uk/developer/machines/
  • The network problem instability has now been fixed
  • Added new configuration option to select memory size based on your board memory (16, 32, or 64 mb). Note: selecting values larger than the supported size will cause crash.

The other news is that Bruce M Simpson has donated me an Emprex NSD 100 for porting FreeBSD to it. I have started my work, but the progress will be slower from the Linux at the beginning, because:

  1. I am more familiar with Linux kernel compared to FreeBSD kernel
  2. Currently FreeBSD kernel itself doesn’t support many ARM devices yet, so to find an exmple of something I need to look at NetBSD, (and it helps, for example the Faraday 526 processor support is already in NetBSD).
  3. I am rather busy this and coming month (planning to go to Indonesia for about 10 days)

Optimizing Asus EEE 900A

I just got back from my vacation around Thailand, so I will start to update things (Wii homebrew, Symbian apps, blogs, etc) again. Well, may be starting next week, I have a dental surgery this weekend and may need to rest. Anyway, this time I want to post about optimizing EEE 900A.

My wife was happy with her Asus EEE 701, but she would like something better with the same size. We sold the old Asus 701 to my brother, and she bought Asus EEE 900A. Compared to EE PC 701, the EEE PC 900A has a faster processor (Intel Atom 1.6 ghz vs the 900 Mhz EEE), more memory (1 gb vs 512 mb), bigger disk space (16 gb vs 4 gb), higher resolution (1024 x 600 vs 840×400), and better graphic processors (Intel GMA 950 vs Intel GMA 900). The only problem is the 16 GB SSD is much slower than the EEE 701 4 GB SSD. You can really feel it when running almost any applications, especially the firefox browser.

My wife uses Windows XP on the new Asus. After reading several blog posts and many forums, the conclusion is: to make everything faster, try to reduce the number of disk access. Here is how to reduce the disk access in Windows XP:

Continue reading “Optimizing Asus EEE 900A”

Atari ST Emulator for WII updated

I have made a stupid mistake by including wrong default configuration files (which is slow). I have updated the Atari ST emulator. Here is what is new:

– Wiimote only operation is possible. Not all things will work though. You can play point and click games that relies only on mouse. Press HOME to access the menu (change disk, change ROM, etc). To avoid wasting your time, you can test the game on Hatari for Windows/Linux to see if you can control everything using only mouse.

– I have included a simple flicker filtering to reduce the filtering. This is not the final solution to the problem. I will need to rewrite the SDL port to use GX.

Note:

– Mono mode still doesn’t work yet.

You can download it here:

http://tinyhack.com/wii/hatari/hatari-18-01-2009.zip

Sorry, forgot to update the mouse handling

http://tinyhack.com/wii/hatari/hatari-19-01-2009.zip

Atari ST Emulator for Wii (based on Hatari)

After wiiapple, here is an atari st emulator for Wii based on hatari. This port works fine on my Wii. Two other people have tested it, one (Da_Gper) said it is very slow on his Wii, but Nowhereman said it is fine in his Wii. So please tell me you test result. If it works fine for most people, I will post it to wiibrew.

Some notes

  1. You will need USB keyboard to use this emulator
  2. Mouse is emulated using Wiimote (A for click), you can also use USB Mouse
  3. Press F12 to access the menu (probably i should assign one of the Wiimote key for this),
  4. Options can be saved to disk
  5. Press home, or alt-q to quit
  6. Floppy images can be placed in \hatari\fd
  7. EmuTOS image have been included. With EmuTOS ROM, the green screen flickers a lot. It doesn’t happen with some real Atari ROMs that I tested.
  8. Sound works (usually), jus enable it through the options

You can download the emulator from

http://tinyhack.com/wii/hatari/hatari-0.0.1.zip

Source code is in

http://tinyhack.com/wii/hatari/

The source code for the SDL port have been put into wiiapple SVN at

http://wiiapple.googlecode.com/

 

 

 

WiiApple: Apple IIe Emulator for Wii

I just learned about developing applications on Wii 3 days ago. I was wondering what application should I make, and I noticed that there was no Apple II emulator for Wii yet. Apple IIe was my first computer, so I thought it will be fun to be able to emulate it on my Wii. AppleWin is a good Apple emulator, but it is very windows specific, fortunately someone already ported it to Linux using SDL, and the name is LinApple.

Someone already made an early SDL port to Wii, but it is missing threading support (which is needed by the emulator). After reading things at wiibrew.org and devkitpro.org, I decided to complete the threading part. The next problem is the input. I want to be able to write BASIC applications, so I decided that the SDL port must support keyboard input, someone already made LibWiikeyboard, so I can just plug it in SDL (actually this is a hack, to correctly handle SDL requirements, there are some things that needs to be changed, in LibWiikeyboard and in the SDL gamecube implementation).

Next part is the porting process itself. The difficult part is making sure all the endiannes conversion of 6502 (Apple II CPU) to Wii’s PowerPC is done correctly, because I don’t have a USB gecko to debug it. Currently the port works, but don’t expect too much from this first release. I can already play some games, but I haven’t tested many other things. Sound is not yet now supported.

Here are some screenshots (made using tvtime, captured through my USB TV Box)

This is the application that you can extract to your SD Card

http://tinyhack.com/wii/wiiapple/wiiapple.zip

Note: Latest version is available at: http://code.google.com/p/wiiapple

The plan is: Everytime I update the application, I will still use the same file name, you can look at http://tinyhack.com/wii/wiiapple/ to look for older releases.
You will need to install Homebrew Channel to use it.

And the source codes are available at:

http://tinyhack.com/wii/wiiapple/

Note: Latest source code is available at: http://code.google.com/p/wiiapple

Update:

version 0.0.2:

– Fixed text overlay
– Disable saving options (dangerous for now, because you might overwrite your files)

version 0.0.3:

– Sound support
– Fix joypad problem
– Invalid disk image will not freeze the emulator (in case of invalid disk, Master.dsk will be reloaded)

January 6, 2009 (0.0.4)
– new keyboard driver, now work with most USB keyboards
Note: I am still working on the keyboard issue (some USB keyboard still  doesn’t work). I think this is because the limitation of Libwiikeyboard that can only do control transfer instead of interrupt transfer. Now I have rewritten the SDL keyboard part with my own code (part was based on the code from Guitar Fun).

January 6, 2009 (0.0.5)
– Support Gamecube controller (Wiimote support is planned for next version)
– updated some bug in keyboard handling

January 7, 2009 (0.0.6)
– Increased gamecube joystick sensitivity
– Fixed (most) crashing issue

January 8, 2009 (0.0.7)
– Support Wiimote as Joystick (Press A button in Gamecube controller to switch to gamecube joypad)

note: Mac USB keyboard works.

Configure Gadmei USB TV Box TVR200 in Linux

I have an old GADMEI USB TV BOX, in the back it says MODEL: TVR200. I haven’t use this since few years ago in Windows. I am planning to learn a little bit about Wii homebrew, so I thought if I can use my computer as display, I don’t have to go back and forth to my TV. When I plugged the USB TV BOX, the kernel display some messages about em28xx:

[ 3662.345631] em28xx #0: Your board has no unique USB ID and thus need a hint to be detected.
[ 3662.345634] em28xx #0: You may try to use card= insmod option to workaround that.
[ 3662.345636] em28xx #0: Please send an email with this log to:
[ 3662.345638] em28xx #0: 	V4L Mailing List 
[ 3662.345640] em28xx #0: Board eeprom hash is 0x00000000
[ 3662.345643] em28xx #0: Board i2c devicelist hash is 0xc51200e3
[ 3662.345645] em28xx #0: Here is a list of valid choices for the card= insmod option:
[ 3662.345647] em28xx #0:     card=0 -> Unknown EM2800 video grabber
[ 3662.345650] em28xx #0:     card=1 -> Unknown EM2750/28xx video grabber
[ 3662.345652] em28xx #0:     card=2 -> Terratec Cinergy 250 USB
[ 3662.345654] em28xx #0:     card=3 -> Pinnacle PCTV USB 2
[ 3662.345656] em28xx #0:     card=4 -> Hauppauge WinTV USB 2
[ 3662.345659] em28xx #0:     card=5 -> MSI VOX USB 2.0
[ 3662.345661] em28xx #0:     card=6 -> Terratec Cinergy 200 USB
[ 3662.345663] em28xx #0:     card=7 -> Leadtek Winfast USB II
[ 3662.345665] em28xx #0:     card=8 -> Kworld USB2800
[ 3662.345667] em28xx #0:     card=9 -> Pinnacle Dazzle DVC 90/DVC 100
[ 3662.345670] em28xx #0:     card=10 -> Hauppauge WinTV HVR 900
[ 3662.345672] em28xx #0:     card=11 -> Terratec Hybrid XS
[ 3662.345674] em28xx #0:     card=12 -> Kworld PVR TV 2800 RF
[ 3662.345676] em28xx #0:     card=13 -> Terratec Prodigy XS
[ 3662.345679] em28xx #0:     card=14 -> Pixelview Prolink PlayTV USB 2.0
[ 3662.345681] em28xx #0:     card=15 -> V-Gear PocketTV
[ 3662.345683] em28xx #0:     card=16 -> Hauppauge WinTV HVR 950
[ 3662.685938] em28xx #0: V4L2 device registered as /dev/video0 and /dev/vbi0

So I tried modprobe em28xx card=0 and then card=1, and then card=2, thankfully it worked with card=2. I used tvtime program to see the output of the usb tv. To make it permanent, add this line:

options em28xx card=2

to your /etc/modprobe.conf, or create a new file (any name is fine) at /etc/modprobe.d and fill it with that line. Note: audio is not working yet, but I don’t really need it right now.

Hotlink Protection in Hostmonster's CPanel

So far I have been quite happy with hostmonster’s performance and quality. It is not really that good, but for the price, I get what I pay for. There is this one problem in the Hotlink Protection that I never bother to fix.  Sometimes ago, I enabled hotlink protection, and when I tried to disable it, suddenly all of my WordPress blogs permalinks stops working. I didn’t know what was wrong, and I just re-enabled the hotlink protection. Today I found out that the problem is in CPanel, it removes the "RewriteEngine  on" line from the .htaccess files when you turn off the hotlink protection (after turning it on).

Re-adding the "RewriteEngine on" to the first line of the .htaccess files fixed that. I have several blogs, so editing one by one will take a long time, so I did the editing from command line. Inserting a text to the first line of a file can be done using sed:

sed -i '1i\RewriteEngine on' $i filename

And to change a lot of files at once you can do this (bash shell):

for i in dir1/.htaccess dir2/.htaccess  ; do sed -i '1i\RewriteEngine on' $i; done

Unicode: from text and font to display

I’ve always wanted to be able to support all kind of text on my Symbian bible. The problem is this: the Unicode support for Symbian is very limited, and even non existent for some languages. Few weeks ago someone asked me if I can make Symbian bible to support Malayalam bible (using Malayalam script of course). Malayalam writing system was only supported recently by major operating systems (such as Windows XP and OS X Leopard), and Symbian haven’t support it yet (and even if it supports it, the support will only be activated to phones on certain sales area).

I know that there are several Unicode layout library, such as Pango, Qt or ICU. All of them are too big for me to understand and port to Symbian. So my solution was to use the freetype library and harfbuzz font shaping. After using those two libraries on Symbian, I think now I can understand Unicode. Here is my quick guide to understand Unicode, from having a data and a font, to displaying the data with that font.

First thing that you need to understand is: Unicode defines list of characters for many languages of the world.

Some languages doesn’t have the concept of lower or upper case. Some languages have their own numbering system. Every language has their own system of ordering things. If possible: always use the function provided by the library you are using. 

Continue reading “Unicode: from text and font to display”