World
Wide Guide | Knowledge Bank |
Kukushkin's Notebook
Also available in its original form,
APPENDIX.TXT, as part of the compressed text file calledFS5FCT20.ZIP. Information is available on downloading the original zipped text files. Presented here in enhanced form with the permission of the author, Konstantin Kukushkin, who reserves all rights.
Instruction Execution
speed, instructions/second
RefPoint(7)/v2=0 visible 123073
RefPoint(7)/v2!=0 visible 82932
RefPoint(7)/v2=0 invisible 215176
RefPoint(7)/v2!=0 invisible 120705
RefPoint(7)/far away invisible 118613
Call/Return
1289807
(All ...Call()s were measured together with the corresponding Return.)
RotatedCall( 0 0 0 )
107129
RotatedCall( X 0 0 )
57796
RotatedCall( X X 0 )
39165
RotatedCall( X X X )
29421
(Tests showed that zero displacements in TransformCall() do not increase performance.)
TransformCall( dx dz dy 0 0 0 ) 198047
TransformCall( dx dz dy x 0 0 ) 53658
TransformCall( dx dz dy x x 0 ) 37201
TransformCall( dx dz dy x x x ) 27580
(The following PerspectiveCalls were measured together with Perspective()/Return(). /50 means there were 49 other PerspectiveCall()ed objects. x2 means each object was PerspectiveCall()ed twice.)
PerspectiveCall()/50 101896
PerspectiveCall()/50x2 75600
PerspectiveCall()/100
90810
PerspectiveCall()/100x2
69674
PerspectiveCall()/150
81060
PerspectiveCall()/150x2
62565
PerspectiveCall()/200
78664
PerspectiveCall()/200x2
58152
PerspectiveCall()/250
74930
PerspectiveCall()/250x2 53260
Jump()
2832031
IfVarAnd()/nojump
1532625
IfVarRange()/jump
1691036
LineColor()
2954537
SurfaceColor()
2732680
ShadedColor()
628461
RepeatBitmap()
1274459
TexPolyShading()
537598
Bitmap()/enough RAM
82929
Palette()/old
419843
Palette()/new
100
(All dots were visible.)
Dot()
87399
DotPt()
142809
DotLine()/per dot [5 dots/line] 115360
DotLine()/per dot [10 dots/line] 131400
DotLine()/per dot [25 dots/line] 144000
MoveToPt()/DrawToPt()
5556
MoveTo()/DrawTo()
5456
(All polygon drawing commands were used to draw a polygon of the same shape at the same location. The drawing time of a solid polygon was the same for palettes 68, 69, and F0.)
Poly()/non-textured
460.29
ShadedPoly()
127.71
ShadedPoly()/033E=1
87.84?
(All texture mapping commands were used with the same scaling and position of the texture.)
TexWindow()
59.90
TexWindow()/zoom=4
27.62
TexWindow()/smoothing
52.48
TexWindow()/smoothing zoom=4 24.01
TexPoly()
31.60
TexPoly()/zoom=4
31.01
TexPoly()/smoothing
29.59
TexPoly()/smoothing zoom=4 26.14
ShadedTexPoly()
25.72
ShadedTexPoly()/zoom=4
23.00
ShadedTexPoly()/smoothing 25.40
ShadedTexPoly()/smoothing zoom=4 23.00
(All codes are ignored when crash detection is disabled. Codes not listed may cause crashes as well.)
Code(dec) Message When Comments
1 Crash
Cockpit
2 Mountain Cockpit
3 Crash
Cockpit
4 Crash Always
Forces zero altitude
5 Crash
Cockpit
6 Building Cockpit
7 Crash
Cockpit
8 Splash Cockpit
9 Crash
Cockpit
10 Gear up Cockpit
12 Overstress Cockpit
13 Crash Cockpit
14 Building Always
16 Collision Always Requires
Crash when Hit Objects enabled
18 Fuel truck Always Requires Crash
when Hit Objects enabled
19 Crash Always
20 Object Always
Requires Crash when Hit Objects enabled
22 Crash Cockpit
SCASM
FSASM
Area Group?R
EndA EndGroup
Area16 SurfaceGroup
End16 EndSurfaceGroup
RefPoint( 2 ... ) RefPtAMSL
RefPoint( 7 ... ) RefPtGL
Points DefPoints/Point
VecPoints DefVecPoints/VecPoint
Brightness Intensity
BigDot DotLarge
DrawTo LineTo
Poly FlatPoly
RunwayData Rwy
RunwayLights RwyLights
RoadMoveTo RoadWidth/StartRoad
RoadLineTo DrawRoad
RoadMoveTo2 RiverWidth/StartRiver
RoadLineTo2 DrawRiver
TaxiMoveTo TwyWidth/StartTwy
TaxiLineTo DrawTwy
RotatedCall RotCall
TransformCall TransRotCall
LayerCall/RunwayCall PriorityCall
Monitor3D Jump3Ranges
Bitmap TextureFile
RepeatBitmap MoveTexture
Inst_7D ResetTexture
MoveTexture MapTexture
Palette PaletteFile
BitmapMode PaletteMask
Smoothing ImageSmoothing
NOTE: The name MoveTexture is assigned to completely different instructions in SCASM and FSASM!
Frequencies in FS are coded using BCD numbers.
BCD stands for Binary Coded Decimals, and is a special format for storing decimal (mostly integer) numbers. Each digit is stored in 4 bits.
It is very easy to convert a decimal number into the BCD representation. The number is simply written in a decimal notation, but treated as a hexadecimal. In FSASM, it is sufficient to add a 'h':
2545 (decimal) = 2545h (BCD)
SCASM [v1.6] requires values for SetVar etc. to be decimal numbers. There are many ways of converting hex numbers into decimal format; one method is to use Windows Calculator in the scientific mode.
Because the first digit of frequencies is always 1, it is not coded at all. The rest of the frequency is multiplied by 100 and converted into BCD:
In SCASM: 125.45 (Mhz) -> 2545h -> 9541
(decimal) -> SetVar ( 7BE 9541 )
In FSASM: 125.45 (Mhz) -> 2545h ->
SetVar vCOM1,2545h