CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: Devilmarkus on 10:28, 05 September 11

Title: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 10:28, 05 September 11
I coded a little Tool in java to list BASIC files.
It's an 1:1 adaption of Kevin Thacker's baslist.exe
But I also handle the 0x1f Token to get decimal values.
Also my tool formats the BASIC listing proper (no missing spaces between commands and other variables)
Interesting is that it can change CTRL chars to ";CHR$(char);".
This changes all CTRL+KEY combinations inside a PRINT line to the original chr$.
When the screen turns red after listing a file, it uses these chars.
When a line is too long after listing, you will see an error message and should edit the output file by hand...

The GUI (Amstrad font, simple input parsing, etc...) is just for fun!
The 2 buttons (LIST file and Copy) and also the checkbox to convert control chars are important.
After listing a file, you can copy it into clipboard and use in a notepad or other text program.
(Only the listing is copied! Not the other screen output!)

If you don't know, how to run a .jar file:
Add a .BAT file containing:
java -jar BASlist.jar

Have fun!
Title: Re: BASlist Java Tool to list BASIC files
Post by: Gryzor on 10:42, 05 September 11
Why not add an Open function?

Nice little thing, I just might start programming in BASIC again :D
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 11:42, 05 September 11
Quote from: Gryzor on 10:42, 05 September 11
Why not add an Open function?

Nice little thing, I just might start programming in BASIC again :D

So I see you did not use my tool :P
When you click "LIST file" you can open a .BAS file.

Edit:
This app. is planned for usage in a Java-DSK editor later... But I found it useful to code a little GUI for it...
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 13:27, 05 September 11
Examples:
10 MODE 1:INK 0,0:INK 1,24:INK 2,6:INK 3,26:BORDER 0
20 MEMORY &3FFF
40 LOAD "PLAYER.BIN",&4000
50 LOAD "takeoff.BIN",&8000
60 CALL &4000,&8000
70 EVERY 1,1 GOSUB 150
80 GOTO 80
150 CALL &4003:RETURN


1 ON BREAK CONT:ENV 2,1,14,1,14,-1,7:|SO:|ST:CALL &C7D0:|SP:|M1
2 |M1:|PL:mn=1200:D$="":F$="":X=2:C$="":V$="":E$="":PU=0:w$="PUEDES VER ":y$=" SALIDAS:":u$=" PUERTA":PRINT "           ARQUIMEDES XXI":PRINT "           PROGRAMA:EGROJ":PRINT "       GRAFICOS:LUIS RODRIGUEZ":PRINT " ADAPTACION:DEVILMARKUS Y MIGUELSKY"
3 PRINT "  COPYRIGHT  DINAMIC SOFTWARE 1986":|SHOW,&5200,192:CALL &BB18:|M2:|ST:m0=1:mn=1200:EVERY 50,1 GOSUB 10000:Q=0:S=0:u=0:V=0:w=0:y=0:Z=0:A=0:C=0:F=0:I=0:J=0:K=0:L=0:M=0:O=0:p=0:R=0:NA=0
101 |SHOW,&5200,192:E=2:PRINT "ESTAS EN LA SALA DE AUTOMATISMOS.  ";w$ + "UN ORDENADOR CPM2. HAY   UNA SALIDA HACIA EL ESTE. PUEDES":V$="VER UN CARTEL":IF Q=0 THEN V$=V$ + " Y UNA GRAPADORA"
106 PRINT V$
110 GOSUB 7999:IF A$="COGEGRAP" AND Q=0 THEN Q=1:V$="BIEN HECHO":GOTO 248
114 IF A$="COGEGRAP" AND Q=1 THEN V$="NO PUEDES":GOTO 248
116 IF A$="E" AND F=0 THEN V$="NO PUEDO IR TODAVIA":GOTO 248
117 IF A$="EXAMPARE" THEN V$="VES UN BOTON AMARILLO":GOTO 248

------- snip --------
4001 IF LEN(cl$)>6 THEN PRINT " ";ELSE IF LEN(cl$)>5 THEN PRINT " ";ELSE IF LEN(cl$)>4 THEN PRINT " ";ELSE IF LEN(cl$)>3 THEN PRINT " ";ELSE PRINT " ";
------- snip --------

Without CHR$ replacement!

4001 IF LEN(cl$)>6 THEN PRINT " ";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";ELSE IF LEN(cl$)>5 THEN PRINT " ";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";ELSE IF LEN(cl$)>4 THEN PRINT " ";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";ELSE IF LEN(cl$)>3 THEN PRINT " ";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";ELSE PRINT " ";CHR$(8);"";CHR$(8);"";CHR$(8);"";CHR$(8);"";
Line 4001 with CHR$ replacement.
Of course it's too long but a coder should be able to change this ;)
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 15:59, 24 June 13
Quote from: Devilmarkus on 10:28, 05 September 11
Also my tool formats the BASIC listing proper (no missing spaces between commands and other variables)

Hi D,
Some 10 years ago I used BASLIST and Cpcxfs with a batch file lash-up.
It was possible to extract from a large collection of dsk files in one go.
Hundreds of files would appear instantly, each in bas and asc version. Htm pages also w. clean code, using SED.

Using simple fc on known clean ASC files and those produced by baslist, Kevin squashed a fair number of bugs in one go.
There still remained the problem with floating numbers though, and that made fully automated ripping impossible.
About 1/3 of bas files would fail to copy out good to asc.

I'd like to roll this thing again, and would like to know if an updated BASLIST.EXE is now available.
Also, cpcxfsw.exe was necessary at the time. Is it still available, or can current cpcfxs now do the same batch file jobs?

Staggering what you do w. Java, and all without a GOTO ;-)


Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 12:01, 25 June 13
There's  no update yet.

What do you mean with batch files?

Did you extract many .BAS files on the fly to ASCII?

About CPCXFS I can't tell you. Kevin may help you here...
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:34, 25 June 13
Yes, plain batch files.
For example mget.bat will call: cpcxfsw %1 -mg *.bas
This batchfile runs once for each dsk in the folder.
More commands get automated and one winds up with a dsk ripper.

Each bas file gets a txt version using baslist exe.
Also a port of this txt to htm using SED to escape all characters offensive to html.

The result can be mouthwatering, but because my version of baslist is 10 years old,
many extracted bas files are no good.

Using file compare on good code saved with ,A on the cpc and results from baslist,
turned up a fair number of bugs that got corrected then.

But the set-up only makes sense if the baslist results are trusted.
No verification is possible on so many files.

cpcxfsw still works in a dosbox under win 7. Updated SED also.
I only corresponded briefly w. Kevin on this, and afterwards did not find a version later then 2003.

From your program description, it seems you are using a version with more corrections.
That was the reason for posting here.

Attached a zip w. random results, using only bas programs known to work OK w. baslist.
Viewing the htm source in browser will show up all the escape characters sed puts in.
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 16:48, 26 June 13
I could do this for regular 40 tracks data dsk's...

For that it's no problem.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 21:34, 26 June 13
Baslist turned up in Kevin's archives, 2009 version.
So it looks like I answered all my own questions, as usual.

Haven't been at it for a long time ... Sorry for any bother.

It's mostly an archiving project, getting possibly useful versions of a bas program under one roof.
I'll diddle dos some more and see if results are  usable.
This Baslist should be interesting. Thanks to Kevin for taking it up again, an itch there maybe?



Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 00:07, 27 June 13
You can't compare Kev's Baslist and mine...
Mine is just based on his work, but has a few changes. (Also it's coded in Java instead of C) ;)

The Baslist I use in JavaCPC internally is already better improved.

JavaCPC Desktop's BASIC debugger uses it. So you can see what happens in your program in realtime...

JavaCPC Basic debugger - Trace Basic line by line (http://cpc-live.com/bastrace/)

Basic Breakpoints (http://cpc-live.com/basicbreakpoints/)

You can of course also list a program what is in the CPC's memory here...
Title: Re: BASlist Java Tool to list BASIC files
Post by: TFM on 00:15, 27 June 13
That's pretty cool things! 8)
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 12:34, 27 June 13
Thanks to both for being encouraging and to Dev for pointing out some facts of life and tools.
new baslist = old baslist. Reboot? (Y/N): N

The dumb thing is that automation was good already on Win95/97 on a RAM disk.
Some rewriting specifically to do batch file compare on different text versions, turned up a lot of "easy" information.

** poster removes lewd code.

If you are interested I can try some more of that for fun ;-)
Title: Re: BASlist Java Tool to list BASIC files
Post by: arnoldemu on 13:14, 27 June 13
I am aware mine is out of date.

Markus provided me with some fixes and I need to upload a new version.

I'll do that this weekend hopefully.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 13:35, 27 June 13
hmm ...  I may have bugged the wrong victim.
last time around you guys were on comp.sys

Things are still set up and any new version of baslist very welcome.
More fun yet ...


Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 21:36, 27 June 13
As I told ;)

In JavaCPC Desktop the BASList already has the fixes:

[attach=2]

I just need to make it standalone again...

(When I find the motivation / time)
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 23:43, 27 June 13
I fiddled a bit around.

So I've done a slight update to Baslist.

Actually it's a Windows .EXE! (Need to find a better way to parse java params)

You still need Java installed!

But for a test it should be enough.

What has changed?

- Some token calculation have been fixed
- Simple CPC filesystem integrated to extract BAS files from 40 tracks DATA DSK
- Simple parameters added.

I attach a file here with a few examples included.

Example:
Extract a few dsk files:

Baslist.exe -extractdsk "disk1.dsk" "disk2.dsk" "disk3.dsk" "C:\CPCFiles\MyDisk.dsk"

After -extractdsk parameter you can add as many dsk files as you wish.

Example 2:
Extract all DSK files inside a given folder:
Baslist.exe -extractdsk "C:\CPCFiles\*"

You can also open a DSK file with this tool. -> Right click on DSK -> Open with -> Select Baslist.exe

It's also possible to open .BAS files with this tool.

.BAS are only in single commands possible yet. No batch processing implemented. It's late now... ;)

Attached file: Baslist.exe, few DSK images,  a BAS example, 3 .BAT file examples

[attachurl=2]

Known bugs:
- Sometimes BASIC files have no spaces between Commands and other expressions. (I re-entered a whole basic prog with autotype after "printing" it out, then it worked... Strange, really)
- Relative jumps not possible because a) BASIC prog. cannot be executed and b) no CPC emulation included. (They normally only appear while a program is running, so no worries)

Help me to improve it ;)

It's no official release! I just attached it here for copychr$ and for you all of course, too, to try it.

The extracted files all appear in the same folder, where Baslist.exe is located. (Make sure, it has write permissions inside it's folder)
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 12:12, 28 June 13
Some bugs fixed: (One was, that the app. didn't close)


Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 12:13, 28 June 13
Up and running sweet.
In tandem with Kevin's ...

I will remove that posting about those weird REMs, as it achieved its objective ;-)
That also made rid of those "too long lines".

Repeatedly calling it from dos without a problem, working through a filename list.

Also tried your "Open with" advice on the BAS file extention in windows.
Every bas file gets its icon. With a double click a txt file pops up.
Instant read in the view pane. Voilà.

Not to gush, but now I have 2 favorite programs up.
Same named twins by Kev and Dev :-) What's a user to do?
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 13:30, 30 June 13
Attached are file compare results on 11 BAS files from your test download.

4 passed in both Kevin's and your version of Baslist. Exact copies.
Please find other info in the zip.

I'm doing this on random basic files also, and will foreward anything useful.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 13:52, 30 June 13
Quote from: arnoldemu on 13:14, 27 June 13
Markus provided me with some fixes and I need to upload a new version.

I leeched on to markus as soon as it said baslist in the searchbox ;-)
Didn't ignore you, but hey, you all go by more names now than some people on WoW.

We went through this routine before, so these results are familiar.
Both baslist versions do the same run and results are accessible side by side.
Please consider this meant equally for your use.

Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 17:18, 30 June 13
 :blank: Now the sun shines.

12 old type-ins, all pass the 2 baslist hurdle. One is 16K.

All the escape chars required for correct html. have been inserted.
Code can be copy/pasted from the browser window.

The txt files contain the code as baslist output.

Nothing says they actually run, one would have to play them from the included dsk.
Provenance is mentioned in the zip.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:27, 04 July 13
Hello Kevin and Markus,

I've picked out fails etc, or quircks from about 50 programs, and put them into 2 test programs.
In the end it's pretty simple; numbers and a few other things ;-)

It doesn't look like there is anything much new for you.

Results are very fair, most numbers are perfect after putting ascii back to dsk!
More in the zip, along with some exceptional characters in the 10 liner Minicalc.bas by ...

Title: Re: BASlist Java Tool to list BASIC files
Post by: arnoldemu on 14:06, 05 July 13
Great tests!

I have just fixed how I translate REM statements. There was a bug there.

Much better :)

I need to do fix more with the display of numbers.

Interestingly, integer numbers like 49152 are tokenized as floating point numbers!

Title: Re: BASlist Java Tool to list BASIC files
Post by: AMSDOS on 22:47, 05 July 13
Quote from: arnoldemu on 14:06, 05 July 13
Interestingly, integer numbers like 49152 are tokenized as floating point numbers!

Due to it exceeding 32767 I presume.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 23:50, 05 July 13
Experimenting with putting ascii code back to dsk and saving to bas, is pretty useful.

Kevin's baslist was letter perfect  on MINICALC.BAS, and when put back to the CPC listed and ran as when birthed (by forceps no doubt).

Java test_baslist pulls out numbers well, but shows some added digits at the end:

370 PRINT 0.0
380 PRINT 0.12345678
390 PRINT 1.2345678
400 PRINT 2.345678
410 PRINT 3.45678
420 PRINT 4.5678
430 PRINT 5.677999999
440 PRINT 6.779999999
450 PRINT 7.800000001
460 PRINT 8.0
470 '
490 PRINT 0.00000003
500 PRINT 0.00000032
510 PRINT 0.00000327
520 PRINT 0.00003276
530 PRINT 0.00032766
540 PRINT 0.00327669
550 PRINT 0.03276699
560 PRINT 0.32766999
570 PRINT 3.2766999
580 PRINT 327.669989944
590 PRINT 3276.699899673
600 PRINT 32766.999000549
610 PRINT 327669.989990234


However, once saved back to BAS on the CPC, the original listing shows again:

370 PRINT 0
380 PRINT 0.12345678
390 PRINT 1.2345678
400 PRINT 2.345678
410 PRINT 3.45678
420 PRINT 4.5678
430 PRINT 5.678
440 PRINT 6.78
450 PRINT 7.8
460 PRINT 8
480 '
490 PRINT 0.00000003
500 PRINT 0.00000032
510 PRINT 0.00000327
520 PRINT 0.00003276
530 PRINT 0.00032766
540 PRINT 0.00327669
550 PRINT 0.03276699
560 PRINT 0.32766999
570 PRINT 3.2766999
580 PRINT 327.66999
590 PRINT 3276.6999
600 PRINT 32766.999
610 PRINT 327669.99


Picture perfect, love it or leave it.
Title: Re: BASlist Java Tool to list BASIC files
Post by: arnoldemu on 11:19, 06 July 13
Attached is a dsk with a BASIC program ;) (2 copies slightly different)

Both have crazy characters in REM and PRINT statements.

So my question is, how should these characters be listed? The PC characters are not the same as the CPCs, so we do not get a true representation.

Should it have a special form e.g. [CTRL+A]?

I can't remember what magazines did when these listings were printed.



Title: "Crazy For You"
Post by: copychr$ on 16:06, 06 July 13
This throws everybody into a tiff. Server too.
Can't even paste some of the output into a code window here.

An unbreakable cold-war secret code?
Time to fish out that pencil with the eraser ...



Title: Re: BASlist Java Tool to list BASIC files
Post by: Gryzor on 19:15, 06 July 13
YOU BORKED THE SERVER! Damn you...
Title: Re: BASlist Java Tool to list BASIC files
Post by: AMSDOS on 00:11, 07 July 13
I once saw a type-in which I think was in our Aussie Mag "The Amstrad User", which had CTRL+X in it, and of course when the program was first published the control codes came out as an "X", which was corrected in a later issue where someone had to draw in the top & bottom line, so I think the magazines would of had a bit of a battle trying to get the codes out correctly, I don't recall AA ever having programs with control in their type-ins, through when the AA Covertapes came out with Cheat-Modes, I remember some of those Graham Smith cheats having Control Codes in them, and I think this was discussed in one of those later issues after someone noticed it, to which it was discussed how they had their Advantages/Disadvantages. Normally I just stick with the good old CHR$() when using Control Codes which is the friendly way.  ;D
Title: Re: "Crazy For You"
Post by: arnoldemu on 13:08, 10 July 13
Attached is my latest exe.

Fixes:
* REM statements are now decoded correctly
* Floating point numbers are mostly displayed correctly (a few tweaks to needed concerning how numbers are rounded up/down for display)
* ON SQ fixed.

Please try it.
Title: Ripabug - a Baslist utility.
Post by: copychr$ on 00:06, 13 July 13
Quote from: arnoldemu on 13:08, 10 July 13
Attached is my latest exe.
As expected; a new version comes along while one is off-line doing the dirty ;-)

Ripabug - a Dos utility - runs both versions of Baslist and tests their output.
Against each other and, if available, against the original ASCII version.

Everything is set-up to find BAS programs that don't BasList correctly.

Kevin's new Baslist slotted right in, and looks to be doing good.
[...]

Post modfied: zip removed.
Please pick up again on this subject in post #39:
ripabug v2 (http://www.cpcwiki.eu/forum/index.php?topic=2674.msg65479#msg65479)
*An updated version of ripabug can be downloaded from post #49:
Ripabug updated (http://www.cpcwiki.eu/forum/index.php?topic=2674.msg66772#msg66772) 
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 14:03, 14 July 13
The attached spreadsheet shows the results from a run through of the acu collection.

84% of 285 bas files now show "no differences" between the two versions of baslist.
Still, one cannot be sure there are no problems. Both might return the same faulty output, even null.

Two bas files were not processed because of name problems: foot&tag.bas and shoot'em.bas
Java error log attached.
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 16:52, 17 July 13
Found the reason why you got an error log.

But no idea how to avoid that.

The imported BAS program seems to be corrupted.

I made a workaround and the log will not be written.

Instead a message pops up showing the linenumber what caused the problem.

(Not compiled yet, because I'm actually hard working on a mod for Skyrim...)
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 20:41, 17 July 13
It is the only one so far with this behaviour.

As you see from the zip, the basename shoot'em gets carried forward and baslisted by baslist_kev.
Output from baslist_jav is a null file named shootem.

It is likely basename related and I'll experiment some more with strange names.
Also, I'm still using the first test version, due to some problems under dos, but will try again w. newer version.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 11:07, 19 July 13
Wyrd is the word.

Take a well crammed 10-liner, say to merge some code.
RENUM 60000. Many of those nice long lines have now been truncated by up to 4 chars.
The missing code can not be accessed by shift+copy or edited.
The listing will print out truncated. When saved to ASCII, the code is bad and when saved back to BAS, it will not run.

But the re-nummed code will still run, and when given lower line numbers, the missing chars show up again.

So we have "legal" code, that lists as "illegal".

Both versions of baslist take the wide view here and actually add back the lost chars at the end of the lines.
Neat! But now the lines are too long. High line numbers + original code results in output that will not run on the CPC anymore.

So, there is a §22. Repair the lines but leave unusable code, or render as per listing equally unusable code?
Somebody better call Ghostbusters.
Title: Re: BASlist Java Tool to list BASIC files
Post by: arnoldemu on 13:02, 19 July 13
Interesting.

The problem is that BASIC has a line limit length of 256 chars?
So it is truncating the lines for display.

Yes, baslist would add the chars back, because it doesn't have this limit.

I will add a note to the wiki.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 10:20, 20 July 13
Looking at just what's what when breaking code lines, this baslist output showed up.
It was forced by my fooling around, not found in a real bas program.

That pseudo bas code and some comments could be useful for counting out things.

The contents of this post looked awful and are much better viewed in the text version.
Look at the column numbers & line breaks in the  text editor.

Do check the numbers, the tax fellow always does and he seems smart enough.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 13:48, 22 July 13
Quote from: Devilmarkus on 16:52, 17 July 13

Found the reason why you got an error log.
But no idea how to avoid that.
The imported BAS program seems to be corrupted.
...

After changing the name shoot'em.bas to shoot-em.bas, everything was normal for your Baslist.

DOS won't copy etc. file names like: foot&tag.bas. Changing to foot-tag.bas gives normal results there also.

I'll be looking for more like this.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 08:34, 24 July 13
After running through many of the files at ftp://ftp.nvg.ntnu.no/pub/cpc/typeins/
not all that much new turned up.

Atm about 3/4 of the German databox dsk files fail to extract under cpcxfs.
So that leaves quite a few programs in there. In emulators there are no problems though.

A much more usable version of ripabug will be up shortly to run on your own archives.

In the meantime, this is what the cat drug in:
Title: ripabug v2
Post by: copychr$ on 13:21, 26 July 13
A much improved version of ripabug.

Many inefficiencies removed and fewer files generated.
Not much left to do apart from checking Baslist function.

The remainder of post was outdated and has been removed.
* Please, read on to next
post  #40 ...
Title: Update using Java Baslist test #2
Post by: copychr$ on 11:04, 29 July 13
Java Baslist test #2 now used in ripabug.

Redirecting the dos window output to nul ;-) did the trick. sry Markus.
Closing the program properly and unlocking the output file, speeds things up very much, to the point it's hardly fun anymore ...
The error-log messages are visible now. Those 5 sort programs that fail each produce one.

The problem with "& and +" characters in file names is due to me not quoting pathnames.
That is not needed for the 8.3 dos and cpc name format. But in the batchfiles, DOS reads these chars as operators and stops all treatment of the file.

The " ' " char (shoot'em.bas) gives trouble with Java baslist.

These "foo&bar.bas" files remain stuck in the topfolder. As a work-around they will be renamed to foo&bar.bad (my bad) and also sent on with the exports for separate attention.

This all requires an update, as will be the case any time the Baslists change etc.

To distinguish between versions the naming scheme is by date using y.mm.dd format as in; ripabug_130729 for today.
A null text file in the top folder also has this information.
Best leave it for verification. Unless one eliminates any older versions, things get mixed up fast.

Post modfied; outdated (130729) zip removed.
* A download for the current version of ripabug - 130901 - is posted in: #49 Ripabug updated (http://www.cpcwiki.eu/forum/index.php?topic=2674.msg66772#msg66772)
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:18, 07 August 13
More verifications using ASCII text files:

Comparing output from both Baslist versions turns up about 15% of programs that fail to render exactly like the original.
The rest are provisionally accepted by ripabug.

In order to accept a file with certainty, a comparison is necessary with the original ASCII code.
The type-ins ACU collection from 1989 to '92 at ftp://ftp.nvg.ntnu.no/pub/cpc/typeins/ (ftp://ftp.nvg.ntnu.no/pub/cpc/typeins/) comprises 7 dsk files, for a total of 282 BAS files.
The sole comparison - as done in the *.fcb files - between Baslist outputs eliminates 43 BAS programs (15%).

Only after preparing ASCII files is it possible to see what falls between the cracks.
That is; find programs where Baslist outputs are identical but both not exact.

This procedure eliminates a further 16 BAS files (6%).
Total fails becomes then 59 files out of 282, or 21%.

These 16 programs, possibly of special interest, can be found in folder "rip_samefail.dsk" in the zip.
Documentation logs are in the top folder, with the output files in the rejected bin there.

File snakx.bas, from this lot, is particular. I have added a mode 2 listing from Arnold and a view of that text in Notepad++
Clearly a solid knock-out blow and a winner for the type-ins crowd ;-)
Actually the file becomes corrupted when converting to ascii on the CPC, and Baslist also gets garbadge in.

The other 43 programs are on 3 dsk files in folder "xfails".
These dsk files go into the top folder of ripabug and allow for a complete analysis of mostly known problems.

All 59 selected BAS programs have been given an ASCII copy (*.TXA) on dsk, so any results are 100% verifiable.
These files also make a handy test lot for new Baslist versions.

The remaining 223 programs, some 80%, are flawlessly processed by both versions of Baslist.
Very fuzzy that.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:26, 26 August 13
Here is an unusual fail, in a well known program.
cpcpara.bas by Marco Viieth.

The program works:
[attachimg=1]

and saves to ascii normally.

Kevin's baslist produces output but then stops working.
Java baslist shows a log and has null output.


[attachimg=2]
A fragment "8240" can be seen in kevin's baslist, then every line corrupts.
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 22:32, 26 August 13
I don't know, where you get your BAS files from, but your attached cpcpara.bas is incomplete.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:35, 26 August 13
It is as downloaded and used since forever.
Let me check, if it's a bad file, I'll pull the post.
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 22:38, 26 August 13
Edit: Your file is not incomplete, but your CPCPARA.BAS file is ASCII and has some crappy chars @ end?

Try these files:
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 22:53, 26 August 13
 ;D

This is the ending of my ascii version from emulator:
[attachimg=1]

The listing is identical there.

I've got nothing else to compare to.
Maybe all my BAS files are crappy?
Title: Re: BASlist Java Tool to list BASIC files
Post by: Devilmarkus on 22:55, 26 August 13
Well I downloaded your attached cpcpara.zip file and checked the file CPCPARA.BAS in it.

It had additional characters @ EOF.

I then downloaded the "original" CPCPara from Marco Vieth's website and put it onto a new DSK.

This should list fine...
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 23:15, 26 August 13
Yes, now everything is normal...
I hope it's just 1 bad file.
Come to think of it; this file originally transferred itself to my PC.
Some history.
Title: Ripabug updated
Post by: copychr$ on 21:33, 01 September 13
* Please read this post together with the next, #50, where the final update is found.

Thanks for helping me out there, Markus.
Old file, but a heads up because I was not using CPCxfs properly.
The switches are now in, but it seems the output was OK anyway.

Ripabug got a re-write. Again much improved ;-)
This was easily done, as the initial concept only needed to be turned inside out.

* edit; zip removed.

Each DSK now gets it's own self-named archive, without user intervention.
The command is: MRIP for multiple dsks.
For  a few other commands, see the Readme or type info at the z> prompt.

One can not rename the ripabug folder. That name is now referred to in code.
The folder itself is not modified any more and remains usable.
One can rename the Holding folder as needed though.

As an addition, all Bas and Ascii files found, are grouped for easy manipulation.
In folder bas, three sort folders hold accepted, provisional or rejected programs.

The same demo.dsk is included. Each file should sort into one of those three categories.
Other dsks with ASCII files are available from post #41, and I will make up a more interesting mix.
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 18:46, 26 September 13
This is supposed to be the final version of ripabug  ::)

[attachurl=2]

The program flow is good to go and easily cloned for re-use in different flavours.
The pre-NT Dos code has been updated to reflect current practice and does away with a lot of overhead.

However, it will not run any more under win95/97, sigh.
Authenticity only goes so far and the curly braces and whorly stuff had to go.
To think that 10-12 years ago, the hacks people came up with (to get basenames) were top of the line.

On the whole this program is of interest mostly to the Baslist coders, and will go the way of the dodo once they are done.
Since there don't appear to be many "new" problems, the most obvious use would be to run any new code against a fixed set of test files.
An added folder "put", now collects Baslist output files (*.kev and *.jav) for putting back to dsk and further verification.

Both versions of Baslist must have run a couple of billion times by now, and the least one can do is call them stable.
If this was a review, a couple of **** would certainly be in order.

Title: Re: BASlist Java Tool to list BASIC files
Post by: TFM on 18:51, 26 September 13
Hey, I will never use it, but you do deserve a LIKE!  :)
Title: Re: BASlist Java Tool to list BASIC files
Post by: copychr$ on 20:08, 26 September 13
Neat; the doctor tells me I'm actually having triplets, not just a nervous disposition.
Some will be up for adoption or even early marriage.
Maybe with some custom code?  :-*
Title: Re: BASlist Java Tool to list BASIC files
Post by: karlvr on 05:06, 26 January 25
Hi, I've just discovered this thread and I've used `BASList.jar` to convert some `.bas` files. Thank you very much! I've had to fix what looks like a fault with it with `DATA` (it puts spaces between characters in the data). I wonder if the development is still alive somewhere? Is anyone interested in putting it on GitHub? I've taken the liberty of decompiling `BASList.jar` in order to patch it, but it would be great to be able to work with original source code.

Alternatively, is there another tool that we've moved on to that I should be using?
Powered by SMFPacks Menu Editor Mod