Jump to content
IGNORED

SpartaDOS X 4.48


drac030

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by fujidude
  • Like 2
Link to comment
Share on other sites

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?

  • Like 2
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by rdea6
Link to comment
Share on other sites

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

  • Like 4
Link to comment
Share on other sites

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.

  • Like 11
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by drac030
  • Like 1
Link to comment
Share on other sites

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 by flashjazzcat
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...