Nintendo DS port (Alpha 6)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Nintendo DS port

Post by DaleStan »

dominik81 wrote:And I think with newgrfs it is possible to overwrite existing sprites. So I was thinking you could specify in the grf file difectly to overwrite the bigger, original sprites.
In fact, that's one of the easiest things to do with newgrf.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Falafel
Engineer
Engineer
Posts: 2
Joined: 05 Jan 2008 00:07

Re: Nintendo DS port

Post by Falafel »

Dominik is it possible that you edit the first post off the thread to show the link to the (current) openttd touched? this would be really practical :)

Ow, and I tried using your alpha3.diff to compile it myself.. but it gave me an error on "sys/dir.h" which I guess is part of the fatlib for nds but I cannot find the file anywhere in my devkitpro installation? Could you perhaps help me with that?
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Re: Nintendo DS port

Post by dominik81 »

AlexFili wrote:Also, when most people buy an engine for a train, they want to add vehicles right after, but for some reason the buy window closes as soon as you buy a train.
I know, it was a bug and is already fixed for the next version.
AlexFili wrote:Did you read my suggestion about having a random seed?
Yes, and I'm familiar with the method that many old console games used. But you're forgetting that the DS has a RTC build in. I'm retrieving the random seed from the system time in the next built.
Slye_Fox wrote:I've no idea how to make grf files.
Too bad. Can anyone else do it? Otherwise I'll try myself.
Falafel wrote:Dominik is it possible that you edit the first post off the thread to show the link to the (current) openttd touched? this would be really practical :)
Yes, I'll do that. And hopefully I'll get a website or blog to post random updates at some point.

Falafel wrote:Ow, and I tried using your alpha3.diff to compile it myself.. but it gave me an error on "sys/dir.h" which I guess is part of the fatlib for nds but I cannot find the file anywhere in my devkitpro installation?
You'll need to download libfat seperately. You can find it here. Tell me if anything else is missing.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
Falafel
Engineer
Engineer
Posts: 2
Joined: 05 Jan 2008 00:07

Re: Nintendo DS port

Post by Falafel »

dominik81 wrote:
Falafel wrote:Ow, and I tried using your alpha3.diff to compile it myself.. but it gave me an error on "sys/dir.h" which I guess is part of the fatlib for nds but I cannot find the file anywhere in my devkitpro installation?
You'll need to download libfat seperately. You can find it here. Tell me if anything else is missing.
Hmm, I checked the files but libfat only contains fat.h
Is it possible that sys/dir.h is from somewhere else? Btw. what preprocessor defines did you use? maybe I made a mistake there..
phh
Engineer
Engineer
Posts: 2
Joined: 18 Jan 2008 20:29

Re: Nintendo DS port

Post by phh »

Hi here,

I don't know what's the state of memory consumption, but to have bigger map, you can use some extra memory, for example with the nintendo ds browser "game" (I bought it new for 15€), there is 8MB extra memory on the slot2. The "little" problem is that you need to make your own memory allocator (or you can use this extra memory with static addresses for instance map at the beginning, chat history to base + size of map, or such things)
lockhp@yahoo.it
Engineer
Engineer
Posts: 1
Joined: 18 Jan 2008 21:19

Re: Nintendo DS port

Post by lockhp@yahoo.it »

sorry for my little useless post (I can't help you with programming and still don't have R4 for testing, maybe I can with graphics but I saw that Slye already done an outstanding job) but I only subscribed to tell you thanks, thanks, thanks, thanks and thanks. TT is one of the best timeless games and it's maybe the one I played more.
you (you and these active forum users) are doing a great job, keep on, you've my deepest gratitude. :]
(a stupid post but I had to do).
User avatar
Stylpe
Engineer
Engineer
Posts: 96
Joined: 12 Sep 2004 16:03
Location: Bergen, Norway
Contact:

Re: Nintendo DS port

Post by Stylpe »

phh wrote:Hi here,

I don't know what's the state of memory consumption, but to have bigger map, you can use some extra memory, for example with the nintendo ds browser "game" (I bought it new for 15€), there is 8MB extra memory on the slot2. The "little" problem is that you need to make your own memory allocator (or you can use this extra memory with static addresses for instance map at the beginning, chat history to base + size of map, or such things)
Also, the EZV 3-in-1 expansion pack has 16 MB extra ram, although both of these run slower than the DS internal ram, but dominik81 already knows this, he mentioned it on page 2 :wink:

And lockhp, I can't speak for dominik81, but I know that your post is what makes me want to do this kind of thing. To see the appreciation and happiness of the users is the best kind of reward there is, so it's not a stupid post at all :mrgreen:

Looking forward to the next test version, dominik81, it seems you've been quite busy fixing the glaring bugs and crashes since the last release :D
Creator of the longest Locomotion station ever.
Sh*t does NOT just happen, sh*t takes time and effort.
Yay, that's me in my avatar! I win!
Keep violence virtual!
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Re: Nintendo DS port

Post by Digitalfox »

dominik81 wrote:Even though TTD was very tight and efficently programmed, OpenTTD is something completely different. In comparison it is very bloated now that I almost which I would base my port on an early revision.
Why do you say that?

Because it has more code turning it more complex or you don't agree the way the code evolved?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Nintendo DS port

Post by DaleStan »

More code. Lots and lots and lots more code.

The original TTD executable was 485 KB and it contained the entire game and all necessary strings for one language.

That same data, for OpenTTD, weighs in at approximately 3 MB. There is also the additional sprite data that Open requires, beyond the data TTD required: ~500 KB.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
AlexFili
Engineer
Engineer
Posts: 56
Joined: 21 Jan 2007 14:48

Re: Nintendo DS port

Post by AlexFili »

But don't forget, OpenTTD is a lot more easier to be run on different operating systems. TTDPatch is rubbish in comparison.

By the way I saved my settings like you said (quitting), but when I went on "load" for a managers face... nothing happened. But my other settings have saved fine. Not sure if its a problem with the loading or the saving.

Again, good luck with the latest release. I BELIEVE IN YOU!
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: Nintendo DS port

Post by dante »

dominik81 wrote:Here it is, the very first sneak peak at my Nintendo DS port. While it looks pretty much the same as the last screenshots I posted, a lot has changed internally and it is running much smoother now. Through the elimination of the wasteful _chatmessage_backup (a 440KB global variabl :shock:) it is now possible to load bigger maps, up to 128x256.

Other notable changes are:
- based on r11844
- maps up to 256x128 running (but saving only works for 64x64 right now)
- saving and loading works
- in openttd.cfg you can define a path where your data resides
- loading time greatly reduced from 45 seconds to 15 seconds
- rewritten the blitter to free 96KB of main RAM

Some serious bugs still remain:
- pathfinder crashes
- open road station gui, then click on road depot icon -> crash
- station gui crashes / not displayed correctly

To get it running you probably need to DLDI patch it. I have a R4DS card which takes care of patching by itself. Please report any bugs / hardware issues here.
Using Ds lite with R4 card.

error message: No available language packs (invalid version?)
assertion "0"failed: file " blablabla/openttd.cpp", line 111

**edit**
wich program was used to make the readme? becouse my txt reading program (notepad i guess) makes the whole readme in 2 huge lines :S

**another edit**
i have put all the files on the root of the micro sd (that go's in the R4). now i get an error saying it misses "sample.cat" and again the: assertion "0"failed: file " blablabla/openttd.cpp", line 111
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Nintendo DS port

Post by Wolf01 »

dante wrote: Using Ds lite with R4 card.

error message: No available language packs (invalid version?)
assertion "0"failed: file " blablabla/openttd.cpp", line 111

**edit**
wich program was used to make the readme? becouse my txt reading program (notepad i guess) makes the whole readme in 2 huge lines :S

**another edit**
i have put all the files on the root of the micro sd (that go's in the R4). now i get an error saying it misses "sample.cat" and again the: assertion "0"failed: file " blablabla/openttd.cpp", line 111
try putting all the data files in a "data" folder in the same folder of the "executable"
about windows notepad, it sucks, try notepad++ instead
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: Nintendo DS port

Post by dante »

reaction on my last message:

i also got the error about missing the Trg1t.grf and the Trgit.grf. all the files (also sample.cat) i just copyed from my Ottd on my PC to the corresponding folder on the DS card. after that it loads just fine.

few bugs i ran into:
- 1 of the 2 schreens has rekst running trough.
- resolution is too big => buttons don't fit, trains can't buy becouse it's running off schreen

so i mannaged to build a track from a coal mine to a power station.

trains and stations connected correct, but trains stay turning around on the stations, but can't leave them..

- whan following one, train or bus, the schreen gets all blurred up.

so far all bugs i found.
User avatar
Stylpe
Engineer
Engineer
Posts: 96
Joined: 12 Sep 2004 16:03
Location: Bergen, Norway
Contact:

Re: Nintendo DS port

Post by Stylpe »

I guess not everyone reads the entire thread or even the readme before posting. Well, at least everyone seems enthusiastic about posting bugs :mrgreen:
dante wrote:reaction on my last message:

i also got the error about missing the Trg1t.grf and the Trgit.grf. all the files (also sample.cat) i just copyed from my Ottd on my PC to the corresponding folder on the DS card. after that it loads just fine.
Yep, this is the same as with all openttd releases, you need the original ttd data files to play, they're not included.
dante wrote:few bugs i ran into:
- 1 of the 2 schreens has rekst running trough.
This is the debug console, and can be disabled by pushing R (the right shoulder button on the DS) like it says in the readme.
dante wrote:- resolution is too big => buttons don't fit, trains can't buy becouse it's running off schreen
Or rather, the DS screen is too small, it's 256x192, while TTD was designed for 640x480 minimum (or was it more?). People are working on new buttons and layouts to make things fit. For now, both screens are useable by switching them around by hitting L, like it says in the readme.
dante wrote:so i mannaged to build a track from a coal mine to a power station.

trains and stations connected correct, but trains stay turning around on the stations, but can't leave them..
This is because the pathfinder is bugged. dominik81 has fixed this in the version he's working on now.
dante wrote:- whan following one, train or bus, the schreen gets all blurred up.
He had to rewrite some of the graphics engine to make it work, this was one of the side effects and I'm sure he's already working on it.


Hope this helps a bit, keep playing and reporting bugs :))
Creator of the longest Locomotion station ever.
Sh*t does NOT just happen, sh*t takes time and effort.
Yay, that's me in my avatar! I win!
Keep violence virtual!
dante
Engineer
Engineer
Posts: 75
Joined: 17 Dec 2007 16:56

Re: Nintendo DS port

Post by dante »

np :)

and hav't got a good txt reader installed atm. had some virus on my pc so i re-installed everything. the readme file in the normal notepad is all text on 2 lines.... not really readeble
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: Nintendo DS port

Post by T-Unit »

Dante: If you click on "format" then select "word wrap" it should become more readable.
User avatar
AntBUK
Transport Coordinator
Transport Coordinator
Posts: 319
Joined: 02 May 2007 12:29
Location: Sheffield, England
Contact:

Re: Nintendo DS port

Post by AntBUK »

Windows users who are having problems view the readme can either open in WordPad (I was quite surprised when I discovered that) or Notepad2/++ or download the attached file :)

(Hope you don't mind dominic, if you do let me know and I'll remove the file. :) )
Attachments
readme-ds.txt
OpenTTD Touched readme for Windows.
A whole 0.6kb bigger then the Linux version...
(1.99 KiB) Downloaded 105 times
Rasing Awareness: Aspergers Syndrome 1 (NAS UK)2 (BBC)3 (YaleDDC)


Something is driving you insane... It is me.
elf_sander
Engineer
Engineer
Posts: 26
Joined: 12 Sep 2005 15:35
Location: Nederland
Contact:

Re: Nintendo DS port

Post by elf_sander »

That's because WordPad is based on Microsoft Word 95 which supported Unix files. ;) In fact, only Notepad doesn't support it.
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Re: Nintendo DS port

Post by dominik81 »

Here it is, the next version of OpenTTD DS! It should have far less crashes now and thus be more enjoyable. I didn't do any improvements to the GUI yet. I'd like to add the smaller toolbar icons next if someone could make the grf file for them.

Changelog for Alpha 4:
  • based on r11899
  • added a start icon and description
  • the random seed works
  • loading original TTD saves disabled (256x256 too big for DS)
  • press A anytime (even after crashes) to toggle the console
  • Fix: trains can load and unload now
  • Fix: road depot window (and similar) doesn't crash any more
  • Fix: YAPF is completely disabled now. If the player enables it or it is enabled in a savegame, an error message is displayed and it is turned off
  • Fix: saving games with bigger maps is now possible. Due to this savegames have to be uncompressed. Still 256x128 maps is the biggest possible due to memory limitations.
  • Reduced viewport memory. crashes due to not enough memory available shouldn't happen so often any more.
  • The game bow the start menu at the beginning
  • Added a 128x64 version of the title screen savegame
  • Added a key combination for the cheat menu
  • Some bugs not mentioned should be fixed due to general improvements
The download and a list of bugs which I'll keep updated is in the initial post.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
User avatar
Stylpe
Engineer
Engineer
Posts: 96
Joined: 12 Sep 2004 16:03
Location: Bergen, Norway
Contact:

Re: Nintendo DS port

Post by Stylpe »

Three cheers for dominik81! Now I have something to do while on the bus to work today :mrgreen:
Creator of the longest Locomotion station ever.
Sh*t does NOT just happen, sh*t takes time and effort.
Yay, that's me in my avatar! I win!
Keep violence virtual!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests