Author Topic: Corrupted file  (Read 3730 times)

0 Members and 1 Guest are viewing this topic.

Offline cmuzzini

  • Newbie
  • Posts: 5
    • View Profile
Corrupted file
« on: February 25, 2020, 10:23:54 pm »
Hello guys, after crying for some days I decide to ask help here.
I have an old software (library), probably is corrupted.
The file is in QuikBasic 4.5 binary format. When I try to convert in plain text with QB64, there is the error message - Conversion failed
Also, I used QB45BIN (https://qb64.org/wiki/Tokenized_Code) to convert my file. Some errors like this
===================
Unhandled Error #254
Line:2805(in main module)
Unprintable error
Continue
===================
How to read it? Any idea?

Thank you so much.
Ciao Claudio

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: Corrupted file
« Reply #1 on: February 25, 2020, 10:32:10 pm »
I don't believe libraries written for Microsoft's QuickBasic were in tokenized BASIC form, so trying to convert a library, the popular AltQuick library for example, to BASIC code will not work.

Perhaps someone else can elaborate on this more.
In order to understand recursion, one must first understand recursion.

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: Corrupted file
« Reply #2 on: February 25, 2020, 10:40:23 pm »
Hello cmuzzini

If possible please attach a file that does convert correctly and say (at least) one that does NOT convert correctly.

DO NOT ATTACH ANYTHING THAT CONTAINS SENSITIVE OR PERSONAL INFORMATION etc.

I cannot guarantee anything, I will try to process these through MS PDS 7.1 (an upgrade to QB4.5).

Note that you may not be able to attach via the OFF-TOPIC section  - just start a new post in DISCUSSION section.

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: Corrupted file
« Reply #3 on: February 25, 2020, 11:00:01 pm »
Just to follow up.


I do not know if you have tried this already but …


If you use an emulator like DOS-BOX (the one I always use) - you could actually run QB45 (in DOSBox), attempt to load your library (as binary), and attempt to save as a text file (depends on WHAT kind of 'library' you have though).


Just a thought, may not work.

Offline cmuzzini

  • Newbie
  • Posts: 5
    • View Profile
Re: Corrupted file
« Reply #4 on: February 25, 2020, 11:26:01 pm »
Hello Richard,
 Here a file in binary format that I can convert - B727r.BAS
https://file.io/ofnRJK

Here the same file but converted with QB64 - B727R (converted).BAS
https://file.io/CqWGGt

Here the file that I can NOT convert - LIBRERIA.BAS
https://file.io/RE8tZ2

Thanks and best regards.

Claudio

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: Corrupted file
« Reply #5 on: February 25, 2020, 11:32:21 pm »
Just tried those links now   PROBLEM  get error


file i.o

404 

Page not found


for all 3 links.

Have you already tried using say DOS-BOX to run QB45   - just curious?

Offline cmuzzini

  • Newbie
  • Posts: 5
    • View Profile
Re: Corrupted file
« Reply #6 on: February 25, 2020, 11:51:41 pm »
Not yet.
Cheers

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: Corrupted file
« Reply #7 on: February 26, 2020, 12:03:38 am »
Thanks for replying.

I found that DOS BOX takes a little getting used to at first - likes working with drive     Z:\   which is not saved automatically if you exit DOS-BOX.

It is worth the effort to install (its free and small in memory requirements)  - it has the advantage for you that should you find other (old) files, you can try say QB45 (in DOS BOX) first and not worry about sensitive information etc being seen by others.

You can run MANY old 16-bit applications in DOS-BOX and there is a number of "flags" for configuration purposes.

By all means please use QB64 to do new or revamped old code.

Note that DOS-BOX is not the only emulator (to run QB45) - but it is what I use to run (MS PDS 7.1).

FellippeHeitor

  • Guest
Re: Corrupted file
« Reply #8 on: February 26, 2020, 12:24:46 am »
@cmuzzini

The links you shared don't work. Please attach your files directly to this page.

Notice that old binary *libraries* are not compatible with the conversion tool and won’t load at all.

However, old *programs* saved in QuickBASIC 4.5’s quick save binary mode will be converted successfully in most cases.

If the binary is from QB7.1 or even VBDOS, the binary save formats were different and won’t load at all, and you will need to be running either QB7.1 or VBDOS under DosBOX to convert the files to text mode yourself, as stated by Richard.

All that said, if you do upload the faulty files here we can have a peek and try to help diagnose the case.
« Last Edit: February 26, 2020, 12:28:11 am by FellippeHeitor »

Offline cmuzzini

  • Newbie
  • Posts: 5
    • View Profile
Re: Corrupted file
« Reply #9 on: February 26, 2020, 12:42:17 am »
Thanks! FellippeHeitor,

FellippeHeitor

  • Guest
Re: Corrupted file
« Reply #10 on: February 26, 2020, 12:56:49 am »
Unfortunately your file seems to be actually corrupt. I does get recognised as a QB4.5 binary but even QuickBASIC 4.5 itself won't load it, in DosBOX.

I also tried it with QB7.1 and VBDOS, no luck.

Sorry about that.

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: Corrupted file
« Reply #11 on: February 26, 2020, 01:02:40 am »
Yes, as FellippeHeitor stated it appears to be a file that has been cross-linked with something else. I see references to a few BASIC commands in it and then later on references to Windows 95 file entries.
In order to understand recursion, one must first understand recursion.

FellippeHeitor

  • Guest
Re: Corrupted file
« Reply #12 on: February 26, 2020, 01:12:32 am »
This is as far as the converter utility went before finding a bad token:

Code: QB64: [Select]
  1. DECLARE SUB termica ()
  2. DECLARE SUB bnero ()
  3. DECLARE SUB fft (X!(), Y!(), ln%, iop%)
  4. DECLARE FUNCTION atan2! (X!, Y!)
  5. DECLARE SUB cramer3 (co!(), tn!(), X!())
  6. DECLARE FUNCTION sidelobe! (vet!(), n%)
  7.  

Offline cmuzzini

  • Newbie
  • Posts: 5
    • View Profile
Re: Corrupted file
« Reply #13 on: February 26, 2020, 01:23:24 am »

Sorry about that.
Thank you so much for your effort. I really appreciate.
Cheers  - Claudio

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Corrupted file
« Reply #14 on: February 26, 2020, 12:15:52 pm »
When one door closes, another opens up.

Welcome to QB64!