Page 305 of 309

Re: US Set Development Thread

Posted: 26 Jan 2011 00:27
by Nite Owl
krtaylor wrote:Sure, go ahead and post them, we may as well have a look.
The following attachment contains my updated Locomotive and Wagon charts for this set. They are listed by introduction year. They were produced for my own use so they do not include all of the information that was contained in the similar charts from the original Read_Me file. They may also contain information that was not found in the original Read_Me file that I added for my own clarification. It had been awhile since I originally created these charts so my memory of what is and is not included when compared to the originals is a bit hazy. They are compatible with the latest release (v0.87d) of the set. I have included both the OpenOffice and MS Word versions in the zip file. Enjoy.

Re: US Set Development Thread

Posted: 26 Jan 2011 03:16
by DJ Nekkid
wallyweb wrote:
DJ Nekkid wrote:that was not much of a source, that looked merely like a pure decompiled version.
The grf is compiled from the source, therefore decompilation produces the source.
A 'source' would never have that form; behold
'The source' wrote:

Code: Select all

 3029 * 22	 02 00 27 82 46 08 03 03 00 00 00 00 01 00 01 01 02 00 02 02 03 00
 3030 * 14	 02 00 2A 81 10 00 FF 01 2C FF 01 01 FF FF
 3031 * 18	 02 00 2B 81 0C 00 FF 02 2A 00 16 16 09 "ÿ##'" 00
 3032 * 14	 02 00 30 81 0C 00 FF 01 00 FF 11 11 0A 00
//OLD Class F 'Berkshire', tender
 3033 * 7	 03 00 01 06 00 2B 00
 3034 * 7	 03 00 81 2C 00 30 00
 3035 * 4	 01 00 02 08
That is not even remotely humanly readable unless its split up somehow, and tbh, i concider myself a rather good coder, as well as a human whom can read. Not to mention the action0's from sprite39 and onward. That is at the brink of beeing not possible to even 'decrypt' as i've done with the code above. Well, it is possible, but it would take quite A LOT of time, and is veryvery easy to make mistakes.


The 'real' source would probably have looked something similar to this:

Code: Select all


// Animate
 3029 * 22	 02 00 27 82 46 08 03 03 
                         00 00 00 00 // 1st frame
                         01 00 01 01 // 2nd frame 
                         02 00 02 02 // 3rd frame 
                         03 00       // 4th frame
// Extra callback info - Articulation
 3030 * 14	 02 00 2A 81 10 00 FF 01 // 1 case
                         2C FF 01 01 // add vehicle id 2C at position 1 
                         FF FF       // terminate articulation
 
 // Callbacks Engine
 3031 * 18	 02 00 2B 81 0C 00 FF 02 // 2 callbacks
                         2A 00 16 16  // articulation 
                         09 "ÿ##'"    // dunno, probably p-list text
                         27 00        // attach gfx

 // Callbacks Tender
 3032 * 14	 02 00 30 81 0C 00 FF 01 // 1 callback
                         00 FF 11 11  // wagon length
                         0A 00        // attack gfx

// Action 3
 3033 * 7	 03 00 01 06 00 2B 00 // Engine
 3034 * 7	 03 00 81 2C 00 30 00 // Livery Override Tender

Re: US Set Development Thread

Posted: 26 Jan 2011 04:05
by krtaylor
Well, I am sorry, but it's what I've got. You have perhaps discovered why there are very very few people able to code an entire set.

Re: US Set Development Thread

Posted: 26 Jan 2011 07:50
by DJ Nekkid
yes, indeed :D

If you need any help, just shout :D

Re: US Set Development Thread

Posted: 26 Jan 2011 10:44
by andythenorth
wallyweb wrote:The grf is compiled from the source, therefore decompilation produces the source.
Not really :D

If you decompile FIRS / HEQS / FISH / 2CC / ISR etc, you don't get the source, you get decompiled nfo which is almost entirely un-commented bytecode. That violates at least the spirit of the GPL ;)

Many of the bigger sets are built with makefiles + templating systems. The source would include those tools and templates.

However if decompiled nfo is all there is...not much more to be said :o

Re: US Set Development Thread

Posted: 26 Jan 2011 10:55
by DJ Nekkid
And andy, even "worse".

The way we code theese days (atleast i do :)) Even 'the source' often differs quite A LOT from the the final NFO before compiling :)

Re: US Set Development Thread

Posted: 26 Jan 2011 13:30
by wallyweb
andythenorth & DJ Nekkid wrote:...
The code (nfo) is the source. That (and the pcx) is all that is required to encode a grf and, license permitting, alter the code. Any comments are superfluous and are there merely as a courtesy from the original author. Perhaps this violates the spirit of the GPL but hexadecimals and the resulting drive to drink notwithstanding, spirits do not a source code make. :mrgreen:

Re: US Set Development Thread

Posted: 26 Jan 2011 14:04
by planetmaker
wallyweb wrote:
andythenorth & DJ Nekkid wrote:...
The code (nfo) is the source. That (and the pcx) is all that is required to encode a grf and, license permitting, alter the code. Any comments are superfluous and are there merely as a courtesy from the original author. Perhaps this violates the spirit of the GPL but hexadecimals and the resulting drive to drink notwithstanding, spirits do not a source code make. :mrgreen:
http://www.linfo.org/source_code.html wrote: Source code (also referred to as source or code) is the version of software as it is originally written (i.e., typed into a computer) by a human in plain text (i.e., human readable alphanumeric characters).
(emphasis mine)
A de-compiled binary thus does not count as source even though it would bring the result when compiling again. Thus handing out a mere de-compilation of the binary when the source is asked for or required is not 'good enough'.

Re: US Set Development Thread

Posted: 26 Jan 2011 14:22
by Purno
Aside from this discussion about what a source code is and what not; They've given us everything they have.
That there is no better source code available is unfortunate, but s*** happens, and discussing about it doesn't bring you that source code.

Re: US Set Development Thread

Posted: 26 Jan 2011 14:44
by planetmaker
Purno wrote:Aside from this discussion about what a source code is and what not; They've given us everything they have.
That is no source code. In absence of those one can and has to - as last resort - use the de-compiled code which was presented, but which is also something everyone can obtain by means of grfcodec. Unfortunately this is too often the case with old(er) NewGRFs (and was one of the reasons we setup the DevZone - and this project is of course invited to make use of it ;-). A public repository there does make sure that the requirement to be able to produce a source code upon request can actually be fulfilled.)

All this said: I'm happy to see activity for this set. It's a very nice set and updating it to make use of newer features and capabilities and will certainly be a nice thing :-)

Re: US Set Development Thread

Posted: 26 Jan 2011 14:49
by Purno
planetmaker wrote:
Purno wrote:Aside from this discussion about what a source code is and what not; They've given us everything they have.
That is no source code. In absence of those one can and has to - as last resort - use the de-compiled code which was presented, but which is also something everyone can obtain by means of grfcodec. Unfortunately this is too often the case with old(er) NewGRFs (and was one of the reasons we setup the DevZone - and this project is of course invited to make use of it ;-) )

All this said: I'm happy to see activity for this set. It's a very nice set and updating it to make use of newer features and capabilities and will certainly be a nice thing :-)
This argument is useless. There's nothing better available. No matter how you continue on arguing that it isn't a source code, they've given us everything they have!

It can't be possible that a GPL license (or any other) would mean someone has to provide the source code even if they've lost it (like a harddisk crash or well, that kinda stuff which happens).

Re: US Set Development Thread

Posted: 26 Jan 2011 15:27
by DJ Nekkid
Purno wrote:This argument is useless. There's nothing better available. No matter how you continue on arguing that it isn't a source code, they've given us everything they have!
This is probably a discussion where different people probably have to agree upon disagreeing, however, they have not gives us everything they have, they have given us everything we had all along.

Re: US Set Development Thread

Posted: 26 Jan 2011 17:16
by Purno
DJ Nekkid wrote:This is probably a discussion where different people probably have to agree upon disagreeing, however, they have not gives us everything they have, they have given us everything we had all along.
I'm not quite sure I understand you correctly, but if I understand correctly you're saying the code they gave us contains nothing new as it doesn't contain any information the decoded GRF doesn't have? :P

Re: US Set Development Thread

Posted: 26 Jan 2011 17:17
by planetmaker
Welcome to reality.

Re: US Set Development Thread

Posted: 26 Jan 2011 17:22
by Purno
Is that decoded GRF any useful or are we better off coding from scratch again? :P

Re: US Set Development Thread

Posted: 26 Jan 2011 17:23
by planetmaker
Scratch might indeed be easier and faster - depending on how much you want to change and add.

Re: US Set Development Thread

Posted: 26 Jan 2011 17:38
by michael blunck

Code: Select all

3030 * 14    02 00 2A 81 10 00 FF 01 2C FF 01 01 FF FF
This is "source code". It fulfills all the conditions given here:
http://www.linfo.org/source_code.html wrote: Source code (also referred to as source or code) is the version of software as it is originally written (i.e., typed into a computer) by a human in plain text (i.e., human readable alphanumeric characters).
(I´ve just typed it in. I didn´t copy it. It´s written in plain text, i.e. alphanumeric, no control codes etc. It´s human readable: "zero two-A eightyone ten zero ...") :cool:

HTH
regards
Michael

Re: US Set Development Thread

Posted: 26 Jan 2011 17:50
by planetmaker
michael blunck wrote:

Code: Select all

3030 * 14    02 00 2A 81 10 00 FF 01 2C FF 01 01 FF FF
(I´ve just typed it in. I didn´t copy it. It´s written in plain text, i.e. alphanumeric, no control codes etc. It´s human readable: "zero two-A eightyone ten zero ...") :cool:
No offence, but thank you for demonstrating how well it is human readable and understandable.

And I guess we should stop this discussion here now before we're all kicked into the off-topic thread.

Re: US Set Development Thread

Posted: 26 Jan 2011 19:06
by George
andythenorth wrote:
wallyweb wrote:The grf is compiled from the source, therefore decompilation produces the source.
Not really :D
If you decompile FIRS / HEQS / FISH / 2CC / ISR etc, you don't get the source, you get decompiled nfo which is almost entirely un-commented bytecode. That violates at least the spirit of the GPL ;)
Many of the bigger sets are built with makefiles + templating systems. The source would include those tools and templates.
However if decompiled nfo is all there is...not much more to be said :o
Why do GRF authors almost do not use action 0C? :cry:
Look at the ECS. The most commented GRFs. After decoding you can read every comment I do for myself, nothing is lost

Re: US Set Development Thread

Posted: 26 Jan 2011 19:40
by michael blunck
planetmaker wrote: No offence, but thank you for demonstrating how well it is human readable and understandable.
Well, I simply used the definition introduced by yourself which does not contain the condition to be "understandable."

Apart from that, even something more remote from bytecode doesn´t automatically qualify to be "understandable":

Code: Select all

def(42) articulated(
      addveh(_TENDER) if(1) // tender
      ENDLIST else
)
In an attempt to move away from nfo-coding examples, I might even put some completely non-understandable C++ code snippet here, just for demonstrating that "human readable" != "understandable". :cool:

regards
Michael