Sign in to follow this  
Guest

exclude with masm?.....ARNO?RHUMBA?CHRISTIAN?

Recommended Posts

Hello everybody!I wanted to exclude objects using the masm code and to do so, i had a look at FS2000 scenery sdk and the *.inc files... but i haven't seen any macros using "exception data". Do we have to make one?Any idea?Of course, using "GenExc" with scasm work perfect but i want to test masm code!I've wrote this *.asm code, compile with bglc, but no exclusion in FS2K2!; exceptionsdata_base label word; DATABASE HEADER dd 0004E727AH ; 02 North bound dd 0004E53B8H ; 06 South bound dd 00539FCA7H ; 10 East bound dd 00539FCA5H ; 14 West bound dd 0 ; VOR data dw 0 ; lowest VOR freq dw 0 ; highest VOR freq dd 0 ; seeds level 8 data dd 0 ; seeds level 9 data dd 0 ; seeds level 10 data dd 0 ; seeds level 11 data dd 0 ; seeds level 12 data dd 0 ; traffic data dd 0 ; minimum safe altitude data dd 0 ; terrain mesh data dd 0 ; object data dd 0 ; library data dd 0 ; facilities data dd 0 ; anchor point data dd 0 ; ATIS data dd 0 ; NDB data dd 0 ; dynamic object paths data dd 0 ; minimum library id dd 0 ; maximum library id dd 0 ; miscellaneous data dd 0 ; title and description data dd 0 ; magnetic variation data dd exception_data - data_base ; exception and exclusion data dd 0 ; magic number dd 0 ; compression switch dw 0 ; spare dd 0 ; GUID dd 0 ; product id dd 0 ; product build number dd 0 ; new facility data pointers dd 0 ; new facility name list data dd 0 ; new facility band list data dd 0 ; new facility data; OBJECT DATABASE exception_data label word db 03 ;;opcode dw 01 ;;type objects dd 0004E727AH ; 02 North bound dd 0004E53B8H ; 06 South bound dd 00539FCA7H ; 10 East bound dd 00539FCA5H ; 14 West bound EOL

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi cavok.I think the problem lies with your header setup. Here is an example of an exclusion for KSFO ( San Francisco ):; --------------------------------------------------------------------Exclusion Macro Type, north, south, east, west LOCAL startstart LABEL word BYTE 3 WORD Type dd north dd south dd east dd westEndM; --------------------------------------------------------------------; San Francisco exclusion N37* 36.80' W122* 23.30'; ===============================data_base label word; DATABASE HEADER dw 1 ; 00 world set number dd 0003FD2E4h ; 02 North bound dd 0003FC63Ah ; 06 South bound dd 0A8FA05BBh ; 10 East bound dd 0A8F5C461h ; 14 West bound dd 0 ; 18 VOR data dw 0 ; 22 lowest VOR freq dw 0 ; 24 highest VOR freq dd 0,0,0,0,0,0 ; 26 (MUST be 0) dd 0 ; 50 minimum safe altitude data dd 0 ; 54 new terrain data dd 0 ; 58 object data dd 0 ; 62 library data dd 0 ; 66 facilities data dd 0 ; 70 (MUST be 0) dd 0 ; 74 (MUST be 0) dd 0 ; 78 ADF data dd 0 ; 82 dynamic data dd 0,0 ; 86 minimum library id dd 0,0 ; 94 maximum library id dd 0 ; 102 misc data ( ground alt db) dd 0 ; 106 title and description data dd 0 ; 110 magnetic variation data dd exception_data - data_base ; 114 exception and exclusion data dd 0 ; 118 magic number dd 0 ; 122 spare2 dw 0 ; 126 spare3 dd 0,0,0,0 ; 128 GUID dd 0 ; 144 product id dd 0 ; 148 product build number dd 0 ; 152 new facility data pointers dd 0 ; 156 new facility name list data dd 0 ; 160 new facility band list data dd 0 ; 164 new facility data; ===============================; OBJECT DATABASEexception_data label word Exclusion 1, 0003FD2E4h, 0003FC63Ah, 0A8FA05BBh, 0A8F5C461hEOLI'll attach the code to this post. Note the multiple instances of the "0's". In the comment area, I include the address of the header code items. Note I did create an exclusion macro at the start of the code. The parameters are the type, then the bounds. I used the same bounds as the header. You could create a macro to do the whole works ( header plus code ).The type here is 1 ( objects ).====================There is no advantage to using BGLC over SCASM, except that I believe SCASM does have some restrictions for commercial use.Here's the SCASM code:Header( 1 N37:38:17.61 N37:36:32.59 W122:22:35.71 W122:23:59.86 )exclude( F N37:38:17.61 N37:36:32.59 W122:22:35.71 W122:23:59.86 )That's it... 2 lines, and drag'n'drop on the SCASM icon. SCASM does add some additional code identifying itself as produced from SCASM.Dick

Share this post


Link to post
Share on other sites

Hello Dick!Thanks very much for your answer....yes, SCASM have some restriction for commercial use and it's logic regarding extraordinary works Manfred does. I used SCASM since 2 years now, then i've learned its code and now i want to have a look at the "native" *.asm and bglct to have a look at the "native" *.asm and bglc!That's true: my header is not the good one..."FL_free An array of six 32-bit variables that are free and should be 0."Six of course!;) Thanks again... i'm going to make the macro !N.B. G.Ioannu could add an exclude switch to his FSREGEN with your information!

Share this post


Link to post
Share on other sites

Hi guysThere's a point that needs clearing up here: there is nothing 'native' about BGLC and .asm code. BGLC is just another tool (based on Microsoft's MASM assembler and a set of macro commands supplied in a series of .inc include files) for creating BGL files. It takes .asm files and 'assembles' them into BGL files in a very similar way to what SCASM does with .sca files.SCASM and BGLC have relative advantages/disadvantages in different circumstances. In particular, SCASM cannot produce certain types of BGL file (notably Terrain Mesh Files) whereas BGLC can produce these files. But when SCASM can do the job, it is by far the better choice because it is much easier to use. SCASM code still has pretty much the same one-to-one relationship with native BGL opcodes that BGLC has. Using BGLC instead won't teach you much new about creating BGL files, all it will really teach you about is the extra work involved in using a pure assembler as opposed to a higher-level tool like SCASM! It is also much 'easier' to make serious mistakes when using BGLC (it's still quite easy to do that using SCASM - but there is much more help and examples available for getting it right with SCASM).Incidentally, BGL files can also be produced using C or C++, or any other similar programming language ...RegardsGerrish

Share this post


Link to post
Share on other sites

Hi Gerrish.I agree completely. Especially for excludes, nothing is easier than 2 lines of SCASM code, and the end result is identical to BGLC code. Why endure the headache of BGLC, when SCASM is so simple to use?Dick

Share this post


Link to post
Share on other sites

Hi gerrish and dick!I agree SCASM is much more easier than BGLC !:-) In fact, i went to *.asm because of your explanation of how to make tmf and LWM and because of codes generated by gmax!I wanted to understand the whole story and when you see the mistakes that appeared sometimes in gmax's code, i think it's very important to have a look at scenery SDK FS2000... of course, it's the same for all codes even for *.sca or *.scm! For example, it didn't realized how much header and latrange were important in a scenery... programs as Architect are so simple to use sometimes that you draw something, it creates the code and BANG! :-newburn framerates fall to 0!My thought is i didn't trust anymore those programs without having a look at the generated code before i launch scasm or bglc. But it's my own point of vue ;) Good work! Nicolas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this