fujidude Posted July 30, 2016 Share Posted July 30, 2016 I can see that this is not documented anywhere, but NEXT actually accepts more arguments than just the counting variable name. The syntax is: NEXT varname [atr] [filemask] The atr and filemask are supposed to be the same as in the FOR var IN [atr] [filemask]. When these are not given, "all files" and "*.*" are assumed. In other words, if the line starting the loop specifies attribute different than none ("all files") and/or a mask different than *.*, these must also be specified in NEXT: for %d in +s *.FOO echo $%d next %d +s *.FOO I have no idea how this escaped the documentation. I will probably have to update the examples and let GoodByteXL know about it, so that this information will be reflected in next revisions of the User's Manual. Super! Thanks for the explanation. I was just getting ready to make a posting saying I was suspecting the bug was somewhere in the for loop mechanism. As it happens, it's not so much a bug as an errata for the docs. And now that I'm aware of this, I have no problem using it in that way. Just out of curiosity though, might it not make better sense to modify SDX to not require such specification in both the FOR and the NEXT, and instead just have it honor what was specified in the FOR? Unless there can be some kind of advantage I'm not imagining, it seems unnecessarily redundant. But in any case, thank you for yet another even better version of SDX. It is one of the best contributions to the A8 community. 1 Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 31, 2016 Share Posted July 31, 2016 I can see that this is not documented anywhere, but NEXT actually accepts more arguments than just the counting variable name. The syntax is: NEXT varname [atr] [filemask] The atr and filemask are supposed to be the same as in the FOR var IN [atr] [filemask]. When these are not given, "all files" and "*.*" are assumed. In other words, if the line starting the loop specifies attribute different than none ("all files") and/or a mask different than *.*, these must also be specified in NEXT: for %d in +s *.FOO echo $%d next %d +s *.FOO I have no idea how this escaped the documentation. I will probably have to update the examples and let GoodByteXL know about it, so that this information will be reflected in next revisions of the User's Manual. That code still fails if there are no .FOO files in the directory at all. For the time being I will work around it in my program, as doing so won't be too difficult. Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 31, 2016 Share Posted July 31, 2016 (edited) Okay... here is the batch file which will get the job done of recursively expanding all arcs into folders. Remember to be in the directory (current working directory) that you want processing to begin in. As the operator, you will have to manage free space considerations. For example, if you are using the SDX Toolkit disk on drive A: as a source of ARCs, there may not be enough free space on it to convert in place. You would need to all the stuff from A: to a place with more free space. On the up side though, the ARCs themselves are deleted as they are each successfully expanded. That means the free space requirements might not be so taxing. Unfortunately though, the 4.48 Toolkit disk does not have enough free space and so it must 1st be copied elsewhere 1st. I do realize that as is, this batch program will not be very useful to those without some kind of large storage like, HDD, APE, or at least a very large RAMdisk. That being said, I imagine a lot of the people using SDX these days tend to be power users who are likely to have larger storage options. But for those who don't, and for the rest of us who do but would rather not be bothered with copying 1st; I plan to update this program in the near future to allow you to specify a source which is in one place (like a floppy drive), and target which is somewhere else (perhaps another floppy which is larger). Let me know what you think and if it works for you. I tested it... but... there is always room for Murphy. ; RUNPACK.BAT ; Recursive (.ARC) Unpack by FujiDude 2016-07-30 proc bunpack ; %sfd is used as "safe for deletion" flag. if exists -s *.arc for %a in -s *.arc /n set %sfd=yes echo . echo Processing $%a$.ARC... seterrno 0 md $%a$ if error set %sfd=no else seterrno 0 arc e $%a$.arc $%a$> if error set %sfd=no fi fi if %sfd=="yes" delete $%a$.arc else echo There was a problem unpacking. echo $%a$.ARC not deleted. fi next %a -s *.arc fi sortdir . >>nul: return proc walkdir gosub bunpack if exists +s *.* for %d in +s *.* cd $%d gosub walkdir cd < next %d +s *.* fi return load command.com seterrno 0 echo Recursive (.ARC) Unpack (2016) Fujidude. echo Stand-by... gosub walkdir echo Recursive (.ARC) Unpack completed. load Edited July 31, 2016 by fujidude 2 Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 31, 2016 Share Posted July 31, 2016 By the way, the real little gem in that batch script, the "walkdir" procedure. In this case it is used to call a ARC unpacker recursively down a tree branch, but could be used to perform other actions instead too. Use your imagination. 2 Quote Link to comment Share on other sites More sharing options...
drac030 Posted July 31, 2016 Author Share Posted July 31, 2016 That code still fails if there are no .FOO files in the directory at all. Obviously, because, as I wrote before, this problem is unrelated to NEXT: it is a problem with FOR not handling EOF correctly. Nice batch-script. Do you mind if we put it onto the Toolkit? 2 Quote Link to comment Share on other sites More sharing options...
576XE Posted July 31, 2016 Share Posted July 31, 2016 Many thanks to All DLT! Supercart and IDEPlus 2.0 bioses works for me. Ingeniously! Quote Link to comment Share on other sites More sharing options...
drac030 Posted July 31, 2016 Author Share Posted July 31, 2016 Many thanks to All DLT! People directly involved in this release are: GoodByteXL, mono, trub and yours truly. Mono is a member of the Tristesse group, all the rest - DLT. @fuijdude: your script works great, I am impressed. It should be added that it requires ENV.SYS to be loaded, because otherwise the environment space will get completely filled up and an error will occur. 1 Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 31, 2016 Share Posted July 31, 2016 Thanks for the kind words about the script. That makes my day. Of course it can be included; I would be honored. I should mention though that I'm attempting to improve it yet a little more. Anything I come up with I will post here. 1 Quote Link to comment Share on other sites More sharing options...
pirx Posted July 31, 2016 Share Posted July 31, 2016 oh man, would never guess the sdx batch lingo is so powerful Quote Link to comment Share on other sites More sharing options...
drac030 Posted August 1, 2016 Author Share Posted August 1, 2016 The supercart build and Antonia upgrade: Now I just get a scrambled video and nothing boots. Also Side ! (use to work) with Antonia Upgrade now reacts the same as the Supercart no boot and scrambled video. It may be a bug in the SDX after all. Please enable the "linear" RAM in Antonia and drop an info, if it helped. Quote Link to comment Share on other sites More sharing options...
Roydea6 Posted August 1, 2016 Share Posted August 1, 2016 (edited) With Linear ON it will truly boot to DOS but it hangs while trying to load the side.sys driver for CF access. With nothing loaded to SIO D1: I get a full boot with Side(1) and also CF access. The MyIDE original version 3.1 and the super cart will boot to the CF card with the MyIDE.sys driver. MyIDE ][ works ok with the MyIDE 512 rom and the MyIDE CF cartridge comes up and is read with the Myide2.sys driver. And if I stack the Side (1) on the Super Cart and turn off SDX on the Super Cart it will boot and the side.sys driver loads to the CF card giving full access. XVER claims SIDE with out passthrough.. Side 2 still defaults to basic prompt or Self Test. Edited August 1, 2016 by rdea6 Quote Link to comment Share on other sites More sharing options...
fujidude Posted August 1, 2016 Share Posted August 1, 2016 Alright, I have updated the RUNPACK.BAT to allow specifying a different source directory. So let's say your current working directory is C:\TOOLKIT and you want to bring everything in from the Toolkit disk (inserted in drive A:). You would do it like this: -RUNPACK A:\ That also assumes you have RUNPACK.BAT located in directory included in your PATH environment. Here is the source. I will also attach an .ATR with it for convenience. ; RUNPACK.BAT ; Recursive (.ARC) Unpack by FujiDude 2016-08-01 ; This script requires the use of ENV.SYS. ; RUNPACK.BAT extracts files from .ARC files into a folder with the same name ; (without .ARC), and then deletes the original .ARC file if no errors. It ; will also recurse through subdirectories performing the same actions in ; each directory, on any .ARC files that exist. ; Pass source path on the command line if different than current directory. ; Otherwise contents of currnet directory will be processed in-place. proc bunpack ; %sfd is used as "safe for deletion" flag. if exists -s *.arc for %a in -s *.arc /n set %sfd=yes echo . echo Processing $%a$.ARC... seterrno 0 md $%a$ if error set %sfd=no else arc e $%a$.arc $%a$> if error set %sfd=no fi fi if %sfd=="yes" echo Deleting $%a$.ARC delete $%a$.arc else echo There was a problem unpacking. echo $%a$.ARC not deleted. fi next %a -s *.arc fi sortdir . >>nul: return proc walkdir gosub bunpack if exists +s *.* for %d in +s *.* cd $%d gosub walkdir cd < next %d +s *.* fi return load command.com seterrno 0 echo Recursive (.ARC) Unpack (2016) Fujidude. echo Stand-by... if _11 echo Copying files from $_11$... copy /r %1 if error exit fi fi gosub walkdir echo . echo Recursive (.ARC) Unpack completed. load RUNPACK.ATR 4 Quote Link to comment Share on other sites More sharing options...
drac030 Posted August 3, 2016 Author Share Posted August 3, 2016 Works great, thank you Quote Link to comment Share on other sites More sharing options...
drac030 Posted August 3, 2016 Author Share Posted August 3, 2016 Since it turns out that the SDX development suffers from insufficient testing (which, I guess, is a result of insufficient manpower), it is perhaps time to change the hitherto practice of passing the beta versions only to few people. So, I have setup a subdirectory on the SDX website where current betas will be stored. It is ROM files only, anyone who wants to try them out, will have to create a flashing disk: it is not complicated, just get the 4.48 flashing ATR for the appropriate build and replace the ROM file. Here is the link: http://sdx.atari8.info/sdx_files/current/449a.zip The list of changes is as always in the whatsnew*.txt file. 11 Quote Link to comment Share on other sites More sharing options...
JoSch Posted August 3, 2016 Share Posted August 3, 2016 Great news. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted August 3, 2016 Share Posted August 3, 2016 Awesome! Quote Link to comment Share on other sites More sharing options...
fujidude Posted August 3, 2016 Share Posted August 3, 2016 I'm guessing the new model will work out well. Phaeron and FJC have been doing it that way with a very similar set of users now for some time and it seems to work. Quote Link to comment Share on other sites More sharing options...
fujidude Posted August 4, 2016 Share Posted August 4, 2016 From the 4.49a notes: 2) during interpretation of a BAT file the "ECHO ON" command was ignored. Strange, while I was just developing the unpacker script, I'm pretty sure I made use of the ECHO ON inside the batch to aid in troubleshooting the code. I suppose it's possible I had also entered the command on the CL too, and assumed it was the one in the batch making it happen. Quote Link to comment Share on other sites More sharing options...
fujidude Posted August 4, 2016 Share Posted August 4, 2016 Feature suggestion: The PROMPT can utilize some variables for things like device letter(s), and path of the current working directory. It would be fantastic if such information could be made available to the batch language. I wish I could remember an example of code that required it, but I can't think of right now. Yes, one can simply code things so that the assumed cwd etc. is used, but I'm sure there was something I had thought of that needed it. Oh well, I suppose the least I could do is offer an example of why it would even be useful before asking anyone to put effort into it. I'll revisit this if and when I think of something. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted August 4, 2016 Share Posted August 4, 2016 One observation regarding the user manual is that it would be convenient if the table of contents entries were hyperlinks to the corresponding page. Quite a few PDFs work this way and it eases navigation through large documents. Quote Link to comment Share on other sites More sharing options...
JoSch Posted August 4, 2016 Share Posted August 4, 2016 One observation regarding the user manual is that it would be convenient if the table of contents entries were hyperlinks to the corresponding page. Quite a few PDFs work this way and it eases navigation through large documents. That would be especially useful, because most of the time the PDF page number is not the same as the document page number. The consequence is that the page number in the TOC is not sufficient to go the correct PDF page. Quote Link to comment Share on other sites More sharing options...
drac030 Posted August 4, 2016 Author Share Posted August 4, 2016 (edited) User's Guide: I guess that Walter did so to avoid ugly look of the TOC in print. When you open the PDF in a standalone PDF reader (and not just in the web browser), a list of bookmarks should open on the left, which is a clickable version of TOC. @fuijdude: strictly speaking the ECHO ON was not ignored, it was just not effective, because the code taking care of echoing the commands being executed was simply missing from the relevant SC module Apart from that the same module had yet two problems, which I believe I have already fixed. For convenience, I have split the 449a.zip archive contents into three parts: a) the SDX 4.49a beta ROMs (which are not changed), b) the toolkit-beta ATR (which has been updated a minute ago), and c) the relevant whatsnew file. Link: http://sdx.atari8.info/index.php?show=en_download_special (at the bottom of the page). As to whether or not the new model will be more efficient than the old one, hope so, but we will see. Edited August 4, 2016 by drac030 1 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted August 4, 2016 Share Posted August 4, 2016 (edited) User's Guide: I guess that Walter did so to avoid ugly look of the TOC in print. When you open the PDF in a standalone PDF reader (and not just in the web browser), a list of bookmarks should open on the left, which is a clickable version of TOC. I'd forgotten about the link pane in stand-alone PDF readers, but nevertheless there's really no need for clickable links to be ugly. See Phaeron's Hardware Reference Manual, Ultimate 1MB Alt BIOS Manual, etc, for clickable TOC links which do not look like URLs. Thankfully the fact most browsers are now able to read PDFs removes the need to install bloatware such as Adobe Reader. Edited August 4, 2016 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
drac030 Posted August 4, 2016 Author Share Posted August 4, 2016 (edited) I hope that Walter will take these suggestions into account. @fujidude: I overlooked the PROMPT-related question, sorry. Well, yes, a practical example would be most useful Edited August 4, 2016 by drac030 Quote Link to comment Share on other sites More sharing options...
fujidude Posted August 4, 2016 Share Posted August 4, 2016 I'd forgotten about the link pane in stand-alone PDF readers, but nevertheless there's really no need for clickable links to be ugly. See Phaeron's Hardware Reference Manual, Ultimate 1MB Alt BIOS Manual, etc, for clickable TOC links which do not look like URLs. Thankfully the fact most browsers are now able to read PDFs removes the need to install bloatware such as Adobe Reader. If anyone wants some tips on how to do this pretty easily, just raise your hand. I already know a pretty easy to use way to do this with MS Word 2010 (likely other versions too but I can't vouch). The method I use results in the side bookmarks as well as clickable TOC entries. 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.