Author Topic: OpenTTD - attn 'josh'  (Read 7497 times)

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
OpenTTD - attn 'josh'
« on: June 23, 2004, 11:24:37 am »
Since the OpenTTD topic disappeared yesterday (I assume due to the forum switch etc), I'm going to start it up again

josh: could you repost that japanese URL with all of the kernel patches and the framebuffer SDL please?  That was a great site!  Certainly the explanations are basically unintelligible from babelfish ("the screen shakes, it shakes!"), but the code is enough!

I was hoping to have my Zaurus today, but looks like those idiots at customs are holding it up for whatever reason (it should have been in Canada on Sunday, and purolator is still saying it's pending customs clearance).  As soon as it gets here I'll definately take a look at your version of OpenTTD - do you have a patch against the codebase that I could take a look at and apply?

Dave

_Psycho

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://zports.sf.net
OpenTTD - attn 'josh'
« Reply #1 on: June 23, 2004, 03:43:23 pm »
Quote
Since the OpenTTD topic disappeared yesterday (I assume due to the forum switch etc), I'm going to start it up again

josh: could you repost that japanese URL with all of the kernel patches and the framebuffer SDL please?  That was a great site!  Certainly the explanations are basically unintelligible from babelfish ("the screen shakes, it shakes!"), but the code is enough!

I was hoping to have my Zaurus today, but looks like those idiots at customs are holding it up for whatever reason (it should have been in Canada on Sunday, and purolator is still saying it's pending customs clearance).  As soon as it gets here I'll definately take a look at your version of OpenTTD - do you have a patch against the codebase that I could take a look at and apply?

Dave
If you have a patch thats would be great to get for zports

If its a strait compile, should be easy then !

I saw there was 2 version of TTD
one Tycoon Transport Deluxe, like 5 megs
and Tycoon Transport Deluxe XP, for windows around 10 megs
I hope both work.
Zaurus Porting Project :
http://zports.sf.net
Conics:
http://www.conics.net

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #2 on: June 23, 2004, 05:24:36 pm »
You need the data files from the windows version of TTD in order for OpenTTD to work...

It's not exactly a 'straight compile' as josh discovered.  Since OpenTTD is a direct port of the disassembly of the original TTD (which was originally written in pure asm by Chris Sawyer back in the day), it uses all sorts of packed data and some structs that mix bytes/shorts/longs and then are accessed by pointers.  Since on ARM processors memory access is optimized for dwords, gcc will pad these structs and data gets messed up.  There are a couple other related issues as well.

josh says that his version is running fairly stable now, but that he has probably missed some potential trouble spots.

His original post on the openttd forums is here: http://ttforums.owenrudge.net/viewtopic.php?t=8222
My original post is:
http://ttforums.owenrudge.net/viewtopic.php?t=8207

Dave

ngok

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #3 on: June 23, 2004, 08:54:13 pm »
I've tried it,it works great!good speed with sound effect,only no music.
I use sharp original rom+special kernal patch
tweaked SDL 1.2.5
It needs pnglib too.
at first I can't move the map because I can't do a right click,use the direction key is somehow too slow.
I try other keys,when I push the menu key,I got the "Company League Table" window pop up,then the mouse seem like locked on right click mode,I can move the map with mouse.
when I push the address key,mouse is back to left click mode.
I had a lot fun with it.

ngok

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #4 on: June 23, 2004, 08:59:42 pm »
the kernal patch url
special kernal
and the tweaked SDL
tweaked libSDL

they are all japanese site.
« Last Edit: June 23, 2004, 09:00:19 pm by ngok »

josh

  • Newbie
  • *
  • Posts: 5
    • View Profile
OpenTTD - attn 'josh'
« Reply #5 on: June 24, 2004, 02:08:45 pm »
Hi, everybody!

Somehow my - extended - first post has vanished. I am too tired to repeat every
detail that I described there.

So I'm just doing a short list:

The ipk link: here

The kernel link (for C760): here

(These are the versions that I can confirm to run well on my Z, don't know if
the ones that ngok points to are identical. Somebody check it out?)

After kernel update: "echo 100 >/proc/drivers/w100/fastsysclk".

One more feature of this SDL version: if KeyHelper is present the lib will load on
startup an existing ~/Settings/keyhelper_SDL.xml that you can use to map keys
in a special arrangement for SDL programs. Very handy!


to blakeyez:
I'm crosscompiling on my PC with the Qtopia SDK (2.3.2) and an Arm toolchain from here.
It's probably faster than working onboard the Z.

to _Psycho:
I'll try and make a patch file for the last release of OpenTTD (0.3.2.1) because
that's what I worked with. It involves creating a special Makefile which I didn't
do properly yet. At the same time I'm heavily covered with work on my job so
don't expect miracles immediately  

to ngok:
The TTD music is only available as good old General MIDI. If you want that as well
you need timidity on your Z to simulate a synth chip. I would estimate that the
game won't be running faster with it  
If you want to move on the map with the arrow keys try holding SHIFT; the step
size increases.

yzord

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #6 on: June 25, 2004, 12:42:03 pm »
Thanks josh, and everyone involved for making this port to the Z.
Just wanted to report that running it with standard Cacko rom 1.21b kernel and the zports SDL version (libSDL_1.2.6-zports-5_arm.ipk) seems to work fine. I played a short (~1hour) game last night and it was very stable (never crashed, hiccuped, etc).

Miss the music, but I figured as well that since they were GM files, that they'd need a midi emulator. Thanks for confirming.

Yz
« Last Edit: June 25, 2004, 12:54:04 pm by yzord »

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #7 on: July 17, 2004, 09:00:25 am »
Quote
Miss the music, but I figured as well that since they were GM files, that they'd need a midi emulator. Thanks for confirming.
But certainly you can digitize the GM music and compress it with mp3. It would work nice then, after tweaking openttd to make it actually playing it.

2josh: is the diff for the Zaurus OpenTTD available? I would like to compile it for the pdaXrom.

josh

  • Newbie
  • *
  • Posts: 5
    • View Profile
OpenTTD - attn 'josh'
« Reply #8 on: July 19, 2004, 10:23:36 am »
Quote
2josh: is the diff for the Zaurus OpenTTD available? I would like to compile it for the pdaXrom.
I'm right now working with version 3.3 and hope to get a diff ready.

Unfortunately I have to deal with too many real life issues as well ...
So I can just beg for patience  

_Psycho

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://zports.sf.net
OpenTTD - attn 'josh'
« Reply #9 on: July 19, 2004, 11:27:58 am »
No rush, Myself never had time to do stuff anymore. Anyway, Thats would be great if we could put your package on zports ! Once you think its ready

For the SDL tweak i know mteira did some test a couples of day ago.
Does the "echo 100 >/proc/drivers/w100/fastsysclk", improve the speed a lots ? (with the kernel tweak) ? Does the same thing work with the cacko kernel ?
Zaurus Porting Project :
http://zports.sf.net
Conics:
http://www.conics.net

josh

  • Newbie
  • *
  • Posts: 5
    • View Profile
OpenTTD - attn 'josh'
« Reply #10 on: July 23, 2004, 05:44:37 pm »
Quote
Does the "echo 100 >/proc/drivers/w100/fastsysclk", improve the speed a lots ? (with the kernel tweak) ? Does the same thing work with the cacko kernel ?
It adds to the more important feature of the special kernel:
the rotation in hardware. The trouble is always the native portrait
orientation of the screen. Everything which wants to use landscape
mode must rotate every frame ...

The SDL packs that I checked out do the rotation pixel by pixel; even
Qtopia does that.

Piro claims to do the rotation via hardware; obviously that is not possible
without special access to the graphics driver; thus the special kernel.

My tests with "testsprite" gave me 28 fps with a plain vanilla SDL,
around 35 fps with Piro's SDL and kernel and 38 fps with the additional
"fastsysclk" increase. The difference is obvious if you scroll OpenTTD
in pause mode (without the load of gameplay).

I replaced the kernel  (JUST the kernel) of my cacko 1.21  with it and
did not run in any problems whatsoever.

Piro warns about incompatibility of the high "fastsysclk" setting, but I
did not find any so far. It might affect the power consumption though.

---

By the way, OpenTTD 3.3 is running fine. And this time I tried to get the
fixes right and keep i386 compatibility of the makefile and all.

Now I'm going to check out diff  

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
OpenTTD - attn 'josh'
« Reply #11 on: July 24, 2004, 06:55:30 pm »
Quote
Unfortunately I have to deal with too many real life issues as well ...
So I can just beg for patience 
Sure! You're not alone with that sort of problems, you know

tovarish

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
OpenTTD - attn 'josh'
« Reply #12 on: December 21, 2004, 08:24:56 pm »
Quote from: josh,Jul 23 2004, 10:44 PM
Quote from: _Psycho,Jul 19 2004, 07:27 AM

I replaced the kernel  (JUST the kernel) of my cacko 1.21  with it and
did not run in any problems whatsoever.

 
hi i did the same thing for my c860 but i can't access the overclock applet. Everytime I do that qte restarts (just qte and not a reboot).

any ideas what could be done to fix this

tovarish

tovarish

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
OpenTTD - attn 'josh'
« Reply #13 on: December 30, 2004, 09:40:56 am »
hi josh

can you give me ur patches for openttd, I am trying to compile the latest version

thanks,
tovarish