vitoco Posted May 22, 2020 Share Posted May 22, 2020 39 minutes ago, rossum said: Cleaned up names/UI Thanks for the update. Looks nice. 35 minutes ago, rossum said: "o" key will open a file selection dialog. Couldn't an "Open" button be added somewhere on top or bottom of the left panel? I dropped some random files to do some tests, and when I change the type for any of those files to "Hard Interlace Picture" (not being a file of that format), the header for the right pannel dissappears. Then, it is not possible to select other type for the file. Again, it could be a way to return to the default file format. It is still missing an alternative way to display Font files, in order to use ANTIC 4 four color characters (2 bits per pixel similar to Graphics 7 Image, but on single scan lines). For images without a defined palette, it could be great to use default color palette in addition to the grey scale (selectable?). On ATASCII text modes, the extra top and bottom empty lines sometimes disturbs me... 55 minutes ago, rossum said: still working on TurboBasic XL These are the tokens and operands lists I extracted from my ATASCII printer: tokens = ["REM ","DATA ","INPUT ","COLOR ","LIST ","ENTER ","LET ", "IF ","FOR ","NEXT ","GOTO ","GO TO ","GOSUB ","TRAP ", "BYE ","CONT ","COM ","CLOSE ","CLR ","DEG ","DIM ","END ", "NEW ","OPEN ","LOAD ","SAVE ","STATUS ","NOTE ","POINT ", "XIO ","ON ","POKE ","PRINT ","RAD ","READ ","RESTORE ", "RETURN ","RUN ","STOP ","POP ","? ","GET ","PUT ", "GRAPHICS ","PLOT ","POSITION ","DOS ","DRAWTO ","SETCOLOR ", "LOCATE ","SOUND ","LPRINT ","CSAVE ","CLOAD ","","ERROR - ", "DPOKE ","MOVE ","-MOVE ","*F" ,"REPEAT ","UNTIL ","WHILE ","WEND ", "ELSE ","ENDIF ","BPUT ","BGET ","FILLTO ","DO ","LOOP ","EXIT ", "DIR ","LOCK ","UNLOCK ","RENAME ","DELETE ","PAUSE ","TIME$= ", "PROC ","EXEC ","ENDPROC ","FCOLOR ","*L ", "------------------------------".chr(155), "RENUM ","DEL ","DUMP ","TRACE ","TEXT ","BLOAD ","BRUN ","GO# ","# ", "*B ","PAINT ","CLS ","DSOUND ","CIRCLE ","%PUT ","%GET "] operators = ["","",",","$",":",";",chr(155), " GOTO "," GOSUB "," TO "," STEP "," THEN ", "#","<=","<>",">=","<",">","=","^","*","+","-","/", " NOT "," OR "," AND ", "(",")","=","=","<=","<>",">=","<",">","=","+","-", "(","","","(","(",",", "STR$","CHR$","USR","ASC","VAL","LEN","ADR","ATN","COS", "PEEK","SIN","RND","FRE","EXP","LOG","CLOG","SQR","SGN", "ABS","INT","PADDLE","STICK","PTRIG","STRIG", "DPEEK","&","!","INSTR","INKEY$"," EXOR ","HEX$","DEC", " DIV ","FRAC","TIME$","TIME"," MOD ","EXEC ","RND","RAND", "TRUNC","%0","%1","%2","%3","GO# ","UINSTR","ERR","ERL"] They are the same than Atari BASIC lists, but with extensions. You must also add 0x0D type when checking a[j] to extract an hex constant from 6 byte data stored as a BCD number. For string constants, you must duplicate the contained double quotes. I think there was also a check for variable numbers for more than 128 of them (probably token 0x54 is related). I hope this helps... 2 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 22, 2020 Author Share Posted May 22, 2020 16 hours ago, vitoco said: Thanks for the update. Looks nice. Couldn't an "Open" button be added somewhere on top or bottom of the left panel? I dropped some random files to do some tests, and when I change the type for any of those files to "Hard Interlace Picture" (not being a file of that format), the header for the right pannel dissappears. Then, it is not possible to select other type for the file. Again, it could be a way to return to the default file format. It is still missing an alternative way to display Font files, in order to use ANTIC 4 four color characters (2 bits per pixel similar to Graphics 7 Image, but on single scan lines). For images without a defined palette, it could be great to use default color palette in addition to the grey scale (selectable?). On ATASCII text modes, the extra top and bottom empty lines sometimes disturbs me... These are the tokens and operands lists I extracted from my ATASCII printer: tokens = ["REM ","DATA ","INPUT ","COLOR ","LIST ","ENTER ","LET ", "IF ","FOR ","NEXT ","GOTO ","GO TO ","GOSUB ","TRAP ", "BYE ","CONT ","COM ","CLOSE ","CLR ","DEG ","DIM ","END ", "NEW ","OPEN ","LOAD ","SAVE ","STATUS ","NOTE ","POINT ", "XIO ","ON ","POKE ","PRINT ","RAD ","READ ","RESTORE ", "RETURN ","RUN ","STOP ","POP ","? ","GET ","PUT ", "GRAPHICS ","PLOT ","POSITION ","DOS ","DRAWTO ","SETCOLOR ", "LOCATE ","SOUND ","LPRINT ","CSAVE ","CLOAD ","","ERROR - ", "DPOKE ","MOVE ","-MOVE ","*F" ,"REPEAT ","UNTIL ","WHILE ","WEND ", "ELSE ","ENDIF ","BPUT ","BGET ","FILLTO ","DO ","LOOP ","EXIT ", "DIR ","LOCK ","UNLOCK ","RENAME ","DELETE ","PAUSE ","TIME$= ", "PROC ","EXEC ","ENDPROC ","FCOLOR ","*L ", "------------------------------".chr(155), "RENUM ","DEL ","DUMP ","TRACE ","TEXT ","BLOAD ","BRUN ","GO# ","# ", "*B ","PAINT ","CLS ","DSOUND ","CIRCLE ","%PUT ","%GET "] operators = ["","",",","$",":",";",chr(155), " GOTO "," GOSUB "," TO "," STEP "," THEN ", "#","<=","<>",">=","<",">","=","^","*","+","-","/", " NOT "," OR "," AND ", "(",")","=","=","<=","<>",">=","<",">","=","+","-", "(","","","(","(",",", "STR$","CHR$","USR","ASC","VAL","LEN","ADR","ATN","COS", "PEEK","SIN","RND","FRE","EXP","LOG","CLOG","SQR","SGN", "ABS","INT","PADDLE","STICK","PTRIG","STRIG", "DPEEK","&","!","INSTR","INKEY$"," EXOR ","HEX$","DEC", " DIV ","FRAC","TIME$","TIME"," MOD ","EXEC ","RND","RAND", "TRUNC","%0","%1","%2","%3","GO# ","UINSTR","ERR","ERL"] They are the same than Atari BASIC lists, but with extensions. You must also add 0x0D type when checking a[j] to extract an hex constant from 6 byte data stored as a BCD number. For string constants, you must duplicate the contained double quotes. I think there was also a check for variable numbers for more than 128 of them (probably token 0x54 is related). I hope this helps... It did. Many thx. Now with Turbobasic, cheese etc. atr_image_explorer.htm 4 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 22, 2020 Share Posted May 22, 2020 Hi and thanks for adding TBXL. It shouldn't be showing the "ESC" character at the end of these dashed lines. 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted May 22, 2020 Share Posted May 22, 2020 1 hour ago, rossum said: tokens = ["REM ","DATA ","INPUT ","COLOR ","LIST ","ENTER ","LET ", "IF ","FOR ","NEXT ","GOTO ","GO TO ","GOSUB ","TRAP ", "BYE ","CONT ","COM ","CLOSE ","CLR ","DEG ","DIM ","END ", "NEW ","OPEN ","LOAD ","SAVE ","STATUS ","NOTE ","POINT ", "XIO ","ON ","POKE ","PRINT ","RAD ","READ ","RESTORE ", "RETURN ","RUN ","STOP ","POP ","? ","GET ","PUT ", "GRAPHICS ","PLOT ","POSITION ","DOS ","DRAWTO ","SETCOLOR ", "LOCATE ","SOUND ","LPRINT ","CSAVE ","CLOAD ","","ERROR - ", "DPOKE ","MOVE ","-MOVE ","*F" ,"REPEAT ","UNTIL ","WHILE ","WEND ", "ELSE ","ENDIF ","BPUT ","BGET ","FILLTO ","DO ","LOOP ","EXIT ", "DIR ","LOCK ","UNLOCK ","RENAME ","DELETE ","PAUSE ","TIME$= ", "PROC ","EXEC ","ENDPROC ","FCOLOR ","*L ", "------------------------------".chr(155), "RENUM ","DEL ","DUMP ","TRACE ","TEXT ","BLOAD ","BRUN ","GO# ","# ", "*B ","PAINT ","CLS ","DSOUND ","CIRCLE ","%PUT ","%GET "] 14 minutes ago, MrFish said: It shouldn't be showing the "ESC" character at the end of these dashed lines. Clearly, it is interpreting the chr(155) I included in my list as a displayed character, but it actually acts as a line feed. I wrote that code about 15 years ago, and I'm not sure how I managed it. I guess that it can be removed from the list for this tool. BTW, my statements list also includes the spaces for both Atari and TurboBasic reserved words, in order to manage them with a single algorithm, without checking if it is standard or extended (token id greater than 56). A single parser for both syntaxes, without the need of to add a single whitespace where it is required. Oh, in the file type, it should now say something like "Atari BASIC/TurboBasic XL". 2 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 22, 2020 Share Posted May 22, 2020 Should add indenting for tokenized TBXL listings. The above listing should look like this. 2 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 23, 2020 Share Posted May 23, 2020 All of these structures use indenting: REPEAT / UNTIL WHILE / WEND DO / LOOP IF / ELSE / ENDIF PROC / ENDPROC Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 23, 2020 Share Posted May 23, 2020 Hi! 3 hours ago, rossum said: It did. Many thx. Now with Turbobasic, cheese etc. atr_image_explorer.htm 105.24 kB · 11 downloads To support variables > 127, you need to add the "0" token at line 1624, like this (from line 1621): case 0x16: // EOL k = end; break; case 0x00: // variable > 127 txt = b.variable_names[a[j+k++]]; break; default: { var txt; if (op & 0x80) txt = b.variable_names[op&0x7F]; else { Have Fun! 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted May 23, 2020 Share Posted May 23, 2020 9 minutes ago, MrFish said: Should add indenting for tokenized TBXL listings. That is not very practical, because that should require a logic parser, not just a detokenizer. The structures don't look good when lines are combined using ":". I think this should remains the same, just like after an "*L-" statement. Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 23, 2020 Share Posted May 23, 2020 (edited) 5 minutes ago, vitoco said: That is not very practical, because that should require a logic parser, not just a detokenizer. The structures don't look good when lines are combined using ":". I think this should remains the same, just like after an "*L-" statement. It certainly looks better to have indenting for listings like above. Maybe he could have it as an option -- just as it's an option in TBXL. Edited May 23, 2020 by MrFish Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 23, 2020 Share Posted May 23, 2020 Hi! 36 minutes ago, MrFish said: It certainly looks better to have indenting for listings like above. Maybe he could have it as an option -- just as it's an option in TBXL. Attached has the three changes for TBXL files: - Adds support for more than 128 variables, - Removes the EOL at the end of "--", - Adds indentation. As @vitoco said, for this you need to parse the code a little, to detect "IF" without "THEN". I used the same algorithm as the original TBXL. Have Fun! atr_image_explorer.htm 2 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted May 23, 2020 Share Posted May 23, 2020 12 minutes ago, dmsc said: Attached has the three changes for TBXL files: - Adds support for more than 128 variables, - Removes the EOL at the end of "--", - Adds indentation. Thanks, it's working well -- as expected. Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 23, 2020 Share Posted May 23, 2020 Hi! 1 hour ago, vitoco said: That is not very practical, because that should require a logic parser, not just a detokenizer. The structures don't look good when lines are combined using ":". I think this should remains the same, just like after an "*L-" statement. This version adds a toggle to show indented or plain listing. 1 hour ago, MrFish said: Thanks, it's working well -- as expected. And also fixes a bug with IF and comparisons to empty strings: IF A$="" THEN was indented. Have Fun! atr_image_explorer.htm 5 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 23, 2020 Author Share Posted May 23, 2020 (edited) 18 hours ago, dmsc said: Hi! This version adds a toggle to show indented or plain listing. And also fixes a bug with IF and comparisons to empty strings: IF A$="" THEN was indented. Have Fun! atr_image_explorer.htm 107.25 kB · 25 downloads Incorporated changes. thx much. On 5/21/2020 at 8:29 PM, vitoco said: Thanks for the update. Looks nice. Couldn't an "Open" button be added somewhere on top or bottom of the left panel? I dropped some random files to do some tests, and when I change the type for any of those files to "Hard Interlace Picture" (not being a file of that format), the header for the right pannel dissappears. Then, it is not possible to select other type for the file. Again, it could be a way to return to the default file format. It is still missing an alternative way to display Font files, in order to use ANTIC 4 four color characters (2 bits per pixel similar to Graphics 7 Image, but on single scan lines). For images without a defined palette, it could be great to use default color palette in addition to the grey scale (selectable?). On ATASCII text modes, the extra top and bottom empty lines sometimes disturbs me... These are the tokens and operands lists I extracted from my ATASCII printer: tokens = ["REM ","DATA ","INPUT ","COLOR ","LIST ","ENTER ","LET ", "IF ","FOR ","NEXT ","GOTO ","GO TO ","GOSUB ","TRAP ", "BYE ","CONT ","COM ","CLOSE ","CLR ","DEG ","DIM ","END ", "NEW ","OPEN ","LOAD ","SAVE ","STATUS ","NOTE ","POINT ", "XIO ","ON ","POKE ","PRINT ","RAD ","READ ","RESTORE ", "RETURN ","RUN ","STOP ","POP ","? ","GET ","PUT ", "GRAPHICS ","PLOT ","POSITION ","DOS ","DRAWTO ","SETCOLOR ", "LOCATE ","SOUND ","LPRINT ","CSAVE ","CLOAD ","","ERROR - ", "DPOKE ","MOVE ","-MOVE ","*F" ,"REPEAT ","UNTIL ","WHILE ","WEND ", "ELSE ","ENDIF ","BPUT ","BGET ","FILLTO ","DO ","LOOP ","EXIT ", "DIR ","LOCK ","UNLOCK ","RENAME ","DELETE ","PAUSE ","TIME$= ", "PROC ","EXEC ","ENDPROC ","FCOLOR ","*L ", "------------------------------".chr(155), "RENUM ","DEL ","DUMP ","TRACE ","TEXT ","BLOAD ","BRUN ","GO# ","# ", "*B ","PAINT ","CLS ","DSOUND ","CIRCLE ","%PUT ","%GET "] operators = ["","",",","$",":",";",chr(155), " GOTO "," GOSUB "," TO "," STEP "," THEN ", "#","<=","<>",">=","<",">","=","^","*","+","-","/", " NOT "," OR "," AND ", "(",")","=","=","<=","<>",">=","<",">","=","+","-", "(","","","(","(",",", "STR$","CHR$","USR","ASC","VAL","LEN","ADR","ATN","COS", "PEEK","SIN","RND","FRE","EXP","LOG","CLOG","SQR","SGN", "ABS","INT","PADDLE","STICK","PTRIG","STRIG", "DPEEK","&","!","INSTR","INKEY$"," EXOR ","HEX$","DEC", " DIV ","FRAC","TIME$","TIME"," MOD ","EXEC ","RND","RAND", "TRUNC","%0","%1","%2","%3","GO# ","UINSTR","ERR","ERL"] They are the same than Atari BASIC lists, but with extensions. You must also add 0x0D type when checking a[j] to extract an hex constant from 6 byte data stored as a BCD number. For string constants, you must duplicate the contained double quotes. I think there was also a check for variable numbers for more than 128 of them (probably token 0x54 is related). I hope this helps... Added palette editor. Kinda fun with GR7. cheers atr_image_explorer.htm Edited May 23, 2020 by rossum now with attachment... 7 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 23, 2020 Author Share Posted May 23, 2020 .. and multicolor fonts https://github.com/rossumur/esp_8_bit/blob/master/atr_image_explorer.htm cheers atr_image_explorer.htm 7 3 Quote Link to comment Share on other sites More sharing options...
vitoco Posted May 24, 2020 Share Posted May 24, 2020 (edited) Oops! I got an out of memory error after dropping a random JPG file and changing from "Raw Data" (the default for an unknown extension) to a "Load and Go Executable". I had not taken a look into the sources but I guess that the tool is not checking for invalid XEX binary pointers for blocks, for example, a lower end memory address than the start one. Edited May 24, 2020 by vitoco Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 24, 2020 Share Posted May 24, 2020 Hi! 6 hours ago, rossum said: .. and multicolor fonts https://github.com/rossumur/esp_8_bit/blob/master/atr_image_explorer.htm cheers atr_image_explorer.htm 111.53 kB · 12 downloads You missed the support for variable numbers > 127, see attached test program and patched file, with this change: Have Fun! manyvars.bas atr_image_explorer.htm 1 Quote Link to comment Share on other sites More sharing options...
FULS Posted May 24, 2020 Share Posted May 24, 2020 Great tool. Can't believe all the updates this week. While you're at it, can ATX and PRO images be supported? Thanks, Doug 1 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 24, 2020 Author Share Posted May 24, 2020 10 hours ago, dmsc said: Hi! You missed the support for variable numbers > 127, see attached test program and patched file, with this change: Have Fun! manyvars.bas 4.42 kB · 7 downloads atr_image_explorer.htm 111.67 kB · 11 downloads Oops. Thanks again, really appreciate it. Added scan for hidden directory entries (Cribbage etc) Annotate Sectors with file info in ATR dump. atr_image_explorer.htm 4 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted May 24, 2020 Share Posted May 24, 2020 (edited) 1 hour ago, rossum said: Added scan for hidden directory entries (Cribbage etc) Thanks, but out of the images I tested it against, it only works for Cribbage. Perhaps it is easier to just let the user enter the starting sector of the directory. The VTOC has for read-only access no relevance. Find attached some images with varying starts of the directory (VTOC is mostly the sector before the directory). $16B - Spelling Bee v1.2 (1983)(MECC)(US)[BASIC][cr CSS] $187 - Factory, The (1983)(Human Engineered Software)(US)[!][BASIC][cr CSS] $2C2 - Survival Math (1982)(Sunburst(US)(Disk 1 of 2)[BASIC][cr CSS] $2C9 - Semantic Calculator, The (1983)(Sunburst)(US)[BASIC][cr CSS] $237 - M-ss-ng L-nks (1984)(Human Engineered Software)(US)[BASIC][OS-B][cr CSS] $136 - Pond, The (1983)(Human Engineered Software)(US)[BASIC][cr CSS] Various-Directories.zip It also does not work for DOS 2.0 DD disks. It seems that DOS 2.0D only uses the first 128 bytes of each directory sector. Atari Accountant, The (Disk 1 of 3)(Data Entry Program Diskette)(1981)(Atari)(US)[BASIC][OS-B][cr CSS].atr Edited May 24, 2020 by DjayBee Added DOS 2.0D 1 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 24, 2020 Author Share Posted May 24, 2020 6 hours ago, DjayBee said: Thanks, but out of the images I tested it against, it only works for Cribbage. Perhaps it is easier to just let the user enter the starting sector of the directory. The VTOC has for read-only access no relevance. Find attached some images with varying starts of the directory (VTOC is mostly the sector before the directory). $16B - Spelling Bee v1.2 (1983)(MECC)(US)[BASIC][cr CSS] $187 - Factory, The (1983)(Human Engineered Software)(US)[!][BASIC][cr CSS] $2C2 - Survival Math (1982)(Sunburst(US)(Disk 1 of 2)[BASIC][cr CSS] $2C9 - Semantic Calculator, The (1983)(Sunburst)(US)[BASIC][cr CSS] $237 - M-ss-ng L-nks (1984)(Human Engineered Software)(US)[BASIC][OS-B][cr CSS] $136 - Pond, The (1983)(Human Engineered Software)(US)[BASIC][cr CSS] Various-Directories.zip 155.61 kB · 3 downloads It also does not work for DOS 2.0 DD disks. It seems that DOS 2.0D only uses the first 128 bytes of each directory sector. Atari Accountant, The (Disk 1 of 3)(Data Entry Program Diskette)(1981)(Atari)(US)[BASIC][OS-B][cr CSS].atr 179.64 kB · 0 downloads This version does a full scan of the disk looking for directories and works for the above. It also scans for files with no legitimate directory entries: kind of a poor man's unerase. The Atari Accountant disk had garbage in the directory: sector start position and sized were mangled. an attempt at copy protection perhaps? This new version recovers these files despite the broken directories. many thanks for the help. atr_image_explorer.htm 4 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted May 24, 2020 Share Posted May 24, 2020 13 minutes ago, rossum said: The Atari Accountant disk had garbage in the directory: sector start position and sized were mangled. an attempt at copy protection perhaps? Yes, perhaps. But most important: It works. ... also on a DD disk with a correct directory. 1 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 25, 2020 Author Share Posted May 25, 2020 12 hours ago, FULS said: Great tool. Can't believe all the updates this week. While you're at it, can ATX and PRO images be supported? Thanks, Doug Added .PRO and .ATX support. atr_image_explorer.htm 5 Quote Link to comment Share on other sites More sharing options...
FULS Posted May 25, 2020 Share Posted May 25, 2020 Thank You so much for the ATX and PRO support. I don't know if this is fixable but the variable names might be off in the CHOPC.BA file. Chopper Rescue (1982)(MicroProse Software)(US)[BASIC].atx You are making my Atari experience very fun. 1 Quote Link to comment Share on other sites More sharing options...
rossum Posted May 25, 2020 Author Share Posted May 25, 2020 3 hours ago, FULS said: Thank You so much for the ATX and PRO support. I don't know if this is fixable but the variable names might be off in the CHOPC.BA file. Chopper Rescue (1982)(MicroProse Software)(US)[BASIC].atx 71.56 kB · 5 downloads You are making my Atari experience very fun. Try this one atr_image_explorer.htm 1 Quote Link to comment Share on other sites More sharing options...
FULS Posted May 26, 2020 Share Posted May 26, 2020 Seems to work great. Amazing! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.