TTDpatch 2.5 (between releases) - r1934

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1804
Joined: 26 May 2004 16:37
Location: Britain
Contact:

TTDpatch 2.5 (between releases) - r1934

Post by Lakie » 03 Jul 2008 01:33

Hi All,

After being nearly 2 years (which can be found here) since the last beta release I thought it would be very useful to get feedback on the latest version of that branch as well as finally nail down the last few bugs in it so that we can finally get to a proper release build and focus on the trunk builds more!
I have taken the following from the wiki's bug tracker (using the milestone filter) where relevant to this build of the 2.5 branch.
Please note that feature requests will not be done unless there is a very good reason for it, the 2.5 branch has a 'feature freeze'.

Known Issues
[Major] AI destroys player tracks (Unknown) - Fixed as of r1941.
[Major] Issue in map editor (Dave Worley & SAC) - Fixed as of r1950.
[Cosmetic] overforestation (Pikka) - Closed

Versions
Currently I've built and compiled with full version data (all 5 windows versions of TTD) the windows version of TTDpatch based off the 2.5 branch at revision 1934.
Do not ask for a DOS version, as I do not have the environment set-up or executables available to build it at all let alone properly.
The built version has he latest version of "ttdpbasew.grf" included with it for ease, it should also work without the registry (like the betas).

Thread Rules
Please do post bug reports (with crash logs (if available or possible), configurations and instructions on how to reproduce) in the Problems section (with a [2.5] in the title) instead of this thread,
In order to keep this somewhat usable I will remove spam posts or posts I believe have no purpose,
Any posts about OpenTTD will be removed regardless of context (unless its to emphasize its a bug in TTDpatch),
I will try to keep the list as up to date as possible based off the replies to this thread and the Problems section.

Hopefully other developers will find some time to help me find and fix the bugs found, otherwise do not expect rapid progress, especially if I cannot reproduce the bug.

~ Lakie
Attachments
ttdpatchw.zip
(567.06 KiB) Downloaded 1644 times
Last edited by WWTBAM on 02 Sep 2013 13:35, edited 2 times in total.
Reason: Removed stickieness
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."

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

Re: TTDpatch 2.5 (between releases) - r1934

Post by DaleStan » 03 Jul 2008 02:08

Personally, I don't see how 1934 can possibly work. (I'd mention this on IRC, but I can't get it to work from here.)

In 1933, at newtrains.asm:182, edi is moved forward 44 bytes from the beginning of the string found by the patchcode at :181. In 1934, these lines are :186 and :190, but they should do the same task. However, in between them, edi is moved backward 36 bytes, so the add at 190 ends up with only a +8 byte net motion, instead of +44.

On July 7, I'll be able to build (blind) a DOS version. I can collect one set of version information, but unless you have all five DOS binaries, please don't blob any at me until I determine exactly which version I have.
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

User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1804
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by Lakie » 03 Jul 2008 13:52

Basically, the first one was patched to 8 places, which lead to a lot of smaller bugs, so I removed it there.
I then wrote the patch proc to go 36 bytes back from the function affected (which is the next 3 bytes of the proc above, which patches that one instance).
If you cannot follow it, I suggest you look at '00573c9a' (3rd line down) in the debugger to see the differences between 1931, 1933, 1935.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."

User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1804
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by Lakie » 03 Jul 2008 14:39

Right, I'll explain it (as you cannot get on IRC for a discussion over it).

Code: Select all

	; sets edi to the end of the fragment.
	patchcode olddisplaytraininfosprite,newdisplaytraininfosprite,1,1

	; we want to go back 36 bytes from this fragment to just under 'xchg edi, esi' from the "displaytraininfosprite" fragment.
	sub edi, 36

	; we store the 'mov esi, [esp]' fragment in those 3 free bytes (left from that fragment).
	storefragment restorewindowpointer

	; not uesd and has been commented out for quite some time (since r456).
//	add edi,lastediadj+44 
//	storefragment newshowactivetrainveh

	; finds a new location and changes edi anyway.
	stringaddress oldshowtraindetailssprite
	copyrelative fnshowtrainsprites,3
So am I missing an obvious mistake in my logic here?

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."

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

Re: TTDpatch 2.5 (between releases) - r1934

Post by DaleStan » 03 Jul 2008 17:06

Nope. I just missed that the lines were commented. Sorry about that.
/me wonders how to make such mistakes less likely in the future.

Anyway, I'll build for DOS some time on Monday.
Lakie wrote:[Major] AI destroys player tracks (Unknown) - We need a saved game before this sort of thing happens before we can reproduce and fix it.
Do you have a link for this report? I know there was a bug to this effect in newairports, but that's only in 2.6, and I "fixed" it some time ago.
Lakie wrote:[Major] Issue in map editor (Dave Worley & SAC) - I am unable to reproduce this.
If this is the (in)famous map-window bug, I can probably fix it blind. Fortunately, it doesn't seem to affect DOS, for whatever reason.
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

User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1804
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by Lakie » 03 Jul 2008 17:22

DaleStan wrote:Anyway, I'll build for DOS some time on Monday.
Good atleast then we can see if DOS has any issues (assuming people still use the DOS version)...
DaleStan wrote:
Lakie wrote:[Major] AI destroys player tracks (Unknown) - We need a saved game before this sort of thing happens before we can reproduce and fix it.
Do you have a link for this report? I know there was a bug to this effect in newairports, but that's only in 2.6, and I "fixed" it some time ago.
The report links to this thread.
[Edit] It appears to be a bug in "checkIfTramsAndKeepTracksUnder" function Steven uses there for trams.
DaleStan wrote:
Lakie wrote:[Major] Issue in map editor (Dave Worley & SAC) - I am unable to reproduce this.
If this is the (in)famous map-window bug, I can probably fix it blind. Fortunately, it doesn't seem to affect DOS, for whatever reason.
From what I remember reading it had something to do with Directx's buffers (Josef's post here), doesn't seem to be a common crash though.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."

michael blunck
Tycoon
Tycoon
Posts: 5273
Joined: 27 Apr 2005 07:09
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by michael blunck » 03 Jul 2008 17:29

[quote=""Lakie"]at least then we can see if DOS has any issues (assuming people still use the DOS version)...[/quote]
I could have a try. Although there´s still the infamous DOS memory overwrite bug (?), reported ages ago to Josef and Oskar ... :?

regards
Michael
Image

User avatar
Dropzone
Traffic Manager
Traffic Manager
Posts: 178
Joined: 04 Apr 2005 21:38
Location: North Lincs., UK

Re: TTDpatch 2.5 (between releases) - r1934

Post by Dropzone » 04 Jul 2008 00:53

This should probably go in before the release - I noticed recently that I made a slight error with this fix, namely that it overwrites 2 bytes too many in the DOS version. This causes steam trains to sometimes stop producing steam when they shouldn't. The, erm, fix for the fix is attached.
Attachments
tunnelsteamfix.diff
(676 Bytes) Downloaded 267 times

michael blunck
Tycoon
Tycoon
Posts: 5273
Joined: 27 Apr 2005 07:09
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by michael blunck » 04 Jul 2008 07:21

Ah yes. Possibly this is related to this bug reported a year ago:

http://wiki.ttdpatch.net/tiki-view_trac ... Modif_desc

Although only "cosmetic", it´s indeed quite annoying. :?

regards
Michael
Image

User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1804
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by Lakie » 04 Jul 2008 16:44

DropZone wrote:This should probably go in before the release - I noticed recently that I made a slight error with this fix, namely that it overwrites 2 bytes too many in the DOS version. This causes steam trains to sometimes stop producing steam when they shouldn't. The, erm, fix for the fix is attached.
Whilst it is a very nice fix, and works quite nicely in 2.6 (I didn't know about that fragment type but then again I hate dealing with proc files),
That particular fragment doesn't appear to exist in the 2.5 branch (though it does not enhanced tunnels so I suppose that makes sense)...

[Edit] It has been committed into the trunk as of r1936.
Got to love the difference in access to Landscape 4 ad 5 between DOS and Windows versions of TTD. ;)

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."

User avatar
Dropzone
Traffic Manager
Traffic Manager
Posts: 178
Joined: 04 Apr 2005 21:38
Location: North Lincs., UK

Re: TTDpatch 2.5 (between releases) - r1934

Post by Dropzone » 04 Jul 2008 17:36

Heh, I completely forgot that enhancetunnels wasn't in 2.5...

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

Re: TTDpatch 2.5 (between releases) - r1934

Post by DaleStan » 07 Jul 2008 16:12

As promised. If the version information is missing for your version of TTD DOS, feel free to send it to me.
ttdpatch.r1934.zip
(465.24 KiB) Downloaded 275 times
michael blunck wrote:Although there´s still the infamous DOS memory overwrite bug (?), reported ages ago to Josef and Oskar
We are neither Josef nor Oskar.
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

User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3602
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by eis_os » 16 Jul 2008 06:36

Well I do try to find and fix overwriting bugs: (a 2.6 only problem)
http://svn.ttdpatch.net/trac/changeset/1917

But the DOS problem is still not easy to find specially as I only run the windows version you know... :roll:

User avatar
WWTBAM
Moderator
Moderator
Posts: 3682
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by WWTBAM » 07 Aug 2013 03:32

I know most people have lost interest in 2.5, but do you mind if I change any of the bugs that are marked fixed in the comments to being closed on the bug tracker?
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/

User avatar
WWTBAM
Moderator
Moderator
Posts: 3682
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: TTDpatch 2.5 (between releases) - r1934

Post by WWTBAM » 15 Aug 2013 13:05

Based on Lakie's OP, it seems that overforestation in temperate is the only bug left in the 2.5 branch. Would it be acceptable to disable the trees in desert patch if the climate is not Tropical? If that gets fixed and is the last bug to need fixing, then I see no reason to move 2.5 to stable.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/

Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 4 guests