Paolo #1 Posted May 19, 2005 Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am specifically talking about Starcat's Jagworms WorkInProgress .COF file, that I need to modifi in order to run it with JUGS. Thank you all! Quote Share this post Link to post Share on other sites
Matthias #2 Posted May 19, 2005 Hello Paolo! Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am specifically talking about Starcat's Jagworms WorkInProgress .COF file, that I need to modifi in order to run it with JUGS. Thank you all! 858047[/snapback] I am not aware of a dedicated converter-tool for COF-files, i only know about the possibility to convert ABS-files (to BINary or to JAGServer format). The COFF-header is not (necessary) of a fixed length, so you need to look into its struct-values: First check if the first Byte is $01 and the second Byte is $50, if so you can find the load-/start-address at offset 56 ($48) and the header-length at offset 68 ($64), both values are BigEndian-LONGs. For JagWorm.cof the load-/startaddress is $4000 and the header-length is $A8 = 168. Best regards Matthias Quote Share this post Link to post Share on other sites
Matthias #3 Posted May 19, 2005 Hi! Hello Paolo! Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am not aware of a dedicated converter-tool for COF-files, i only know about the possibility to convert ABS-files (to BINary or to JAGServer format). 858140[/snapback] Ok, i think you can use FILEFIX (from the Atari-Devkit) for this task: Run FILEFIX JAGWORM in your DOS-Box. It will output three files: JAGWORM.TX, JAGWORM.DTA and JAGWORM.DB (which is a script to load the other files into an Alpine-Board). The interesting files for you are the first two, JAGWORM.TX and JAGWORM.DTA, you should merge them with the DOS-copy-comand: COPY /b JAGWORM.TX + JAGWORM.DTA JAGWORM.BIN This will merge the .TX and the .DTA files to a BINary which you can upload (to address $4000) with JUGS (or whatever). Bye! Matthias Quote Share this post Link to post Share on other sites
Paolo #4 Posted May 21, 2005 Hi, Matthias. I read about FILEFIX, but I couln't find it anywhere. Also, as you probably know, Lars' website doen't host the dev tools anymore. If you or Justclaws could send this file to me, I'd be grateful, otherwise, I'll keep searching (but I really did it a lot). bye! Quote Share this post Link to post Share on other sites
Matthias #5 Posted May 21, 2005 (edited) Hello Paolo! Hi, Matthias. I read about FILEFIX, but I couln't find it anywhere. Also, as you probably know, Lars' website doen't host the dev tools anymore. If you or Justclaws could send this file to me, I'd be grateful, otherwise, I'll keep searching (but I really did it a lot). bye! 859359[/snapback] Ok, i have attached it to this message. Edit: I have exchanged this attachement with a later version of the FILEFIX-program. Bye! Matthias PS: JagWorm didn't work on my K-series Jaguar when uploaded with BJL. I'll try to test it with a M-series console later. filefix19950901.zip Edited May 22, 2005 by Matthias Quote Share this post Link to post Share on other sites
Paolo #6 Posted May 21, 2005 Hi, Matthias. Thanks for the program, but I think it didn't work: it didn?t generate a .txt file, and the data file was 0 length. However, I understand that if I just edit out the first 168 bytes, it should be ok; is that true? Quote Share this post Link to post Share on other sites
Matthias #7 Posted May 21, 2005 (edited) Hello! Hi, Matthias.Thanks for the program, but I think it didn't work: it didn?t generate a .txt file, and the data file was 0 length. However, I understand that if I just edit out the first 168 bytes, it should be ok; is that true? 859543[/snapback] It's not .TXT, it's .TX, the TX-file contains the program-portion of the COF, the DTA-file contains the DATA-segment. Did you use one of the "lovely" Windows-versions (like Win98?), or one of the "ugly" versions (like XP)? About stripping of the 168 bytes: Yes, this should work for the JagWorm.COF posted in this forum. Bye! Matthias Edited May 21, 2005 by Matthias Quote Share this post Link to post Share on other sites
Paolo #8 Posted May 22, 2005 I have not been clear enough, sorry. the result of FILEFIXing was: BSD/COFF format file detected... 0 sections specified Symbol Table offset = -1274544128 Symbol Table contains 2621468 symbol entries The additional header size is 3 bytes Magic Number for RUN_HDR = 0x01070007 Text Segment Size = -1801453568 Data Segment Size = 515899401 BSS Segment Size = -1520435200 Starting Address for executable = 0x40000000 Start of Text Segment = 0x40000007 Start of Data Segment = 0xd4a02e74 Text Segment empty, no TX file written. So i got an empty DTA file and no TX file Quote Share this post Link to post Share on other sites
Matthias #9 Posted May 22, 2005 (edited) Hi! I have not been clear enough, sorry.the result of FILEFIXing was: BSD/COFF format file detected... 0 sections specified Symbol Table offset = -1274544128 Symbol Table contains 2621468 symbol entries The additional header size is 3 bytes Magic Number for RUN_HDR = 0x01070007 Text Segment Size = -1801453568 Data Segment Size = 515899401 BSS Segment Size = -1520435200 Starting Address for executable = 0x40000000 Start of Text Segment = 0x40000007 Start of Data Segment = 0xd4a02e74 Text Segment empty, no TX file written. So i got an empty DTA file and no TX file 859731[/snapback] It's obvious that something goes wrong on your side, so it would be interesting to know which Windows-version you used. Here is my output (from a DOS-Box in Windows 98SE): D:\Develop\Jaguar\LarsHannig\JagWorms>filefix jagworm BSD/COFF format file detected... coff_header.magic = 0x0150 coff_header.num_sections = 0x0003 coff_header.date = 0x00000000 coff_header.sym_offset = 0x0007b408 coff_header.num_symbols = 0x00000028 coff_header.opt_hdr_size = 0x001c coff_header.flags = 0x0003 3 sections specified Symbol Table offset = 504840 Symbol Table contains 40 symbol entries The additional header size is 28 bytes Magic Number for RUN_HDR = 0x00000107 Text Segment Size = 496800 Data Segment Size = 7872 BSS Segment Size = 632160 Starting Address for executable = 0x00004000 Start of Text Segment = 0x00004000 Start of Data Segment = 0x0007d4a0 Regards Matthias Edited May 22, 2005 by Matthias Quote Share this post Link to post Share on other sites
Paolo #10 Posted May 22, 2005 how weird... Win98SE here as well I also downloaded the file again... Quote Share this post Link to post Share on other sites
Matthias #11 Posted May 22, 2005 Hello! how weird... Win98SE here as well I also downloaded the file again... 859816[/snapback] Ok, i am sorry, i managed to put an older version of FILEFIX into that ZIP-archive. I exchanged the attachment of my older message above now, please reload it. Best regards Matthias Quote Share this post Link to post Share on other sites
Paolo #12 Posted May 22, 2005 A-HA! So it was YOUR fault Now, in the meanwhile, I managed to strip the header manually, with your hints. Both files look the same. So now I am going and test the thing! *toying with jaglink...* Quote Share this post Link to post Share on other sites
Paolo #13 Posted May 22, 2005 (edited) checking for working stuff... ...hmmm... no luck 'til now... Edited May 22, 2005 by Paolo Quote Share this post Link to post Share on other sites
atarifan49 #14 Posted May 22, 2005 Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am specifically talking about Starcat's Jagworms WorkInProgress .COF file, that I need to modifi in order to run it with JUGS. Thank you all! 858047[/snapback] If you have the JUGS setup, then you have the ABS2BIN converter tool that will make a proper .bin file for you. Look on your JUGS CD. Glenn Quote Share this post Link to post Share on other sites
walter_J64bit #15 Posted May 22, 2005 Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am specifically talking about Starcat's Jagworms WorkInProgress .COF file, that I need to modifi in order to run it with JUGS. Thank you all! 858047[/snapback] If you have the JUGS setup, then you have the ABS2BIN converter tool that will make a proper .bin file for you. Look on your JUGS CD. Glenn 859930[/snapback] I do Have to rename the file from .COF to .ABS thanks use the ABS2BIN converter? Quote Share this post Link to post Share on other sites
Atari_Jaguar #16 Posted May 25, 2005 Sorry, guys, I am sure I read it somewhere here, but I couldn't find it anymore: How may I strip the headers from a COF file in order to 'turn it' into a JAG binary file? I am specifically talking about Starcat's Jagworms WorkInProgress .COF file, that I need to modifi in order to run it with JUGS. Thank you all! 858047[/snapback] Hmm, sounds like a tough one. I really must admit that I have no idea at all. goodluck with that deal. Quote Share this post Link to post Share on other sites