Jump to content
IGNORED

SpartaDOS X 4.48


drac030

Recommended Posts

I updated the SDX installs in Altirra last night before trying it in the next day or two on real hardware. First I updated the (virtual) U1MB installation (which mirrors my real hardware with FJC's latest BIOS, SIDEloader and PBI driver). I had no trouble updating and afterward things appear fine. Next I did the (virtual) SIDE2 cart. Again things appear to be fine. However, there is something odd going on.

 

With just the U1MB installed and booting to SDX, switching to CAR: and then typing a simple DIR | LESS works just fine as expected; I get one page worth of directory contents and a prompt to continue the listing or quit. However, turning the U1MB SDX off and trying the same with the SIDE2 version of SDX gives me odd-ball errors. See screenshot below.

 

SDX 4.48 running from U1MB:

post-30400-0-20025900-1469658988_thumb.png

 

 

SDX 4.48 running from SIDE2:

post-30400-0-10862700-1469658789_thumb.png

 

 

Link to comment
Share on other sites

This may occur e.g. when the $TEMP variable is set to something non-writable like CAR:

 

This is wild guess only, but I just reproduced this effect by doing SET TEMP=CAR: and then DIR | LESS.

 

It would help if you could list the env variables for both cases. I also think that if $TEMP is not set, the current directory is assumed.

 

The pseudo-pipeline in DIR | LESS of course needs a temporary storage, so it writes data to a temporary file (located in $TEMP directory).

Link to comment
Share on other sites

CAR: only has one channel... I suspect that has something to do with the pipe not working.

 

But why would it work with the U1MB then?

 

This may occur e.g. when the $TEMP variable is set to something non-writable like CAR:

 

This is wild guess only, but I just reproduced this effect by doing SET TEMP=CAR: and then DIR | LESS.

 

It would help if you could list the env variables for both cases. I also think that if $TEMP is not set, the current directory is assumed.

 

The pseudo-pipeline in DIR | LESS of course needs a temporary storage, so it writes data to a temporary file (located in $TEMP directory).

 

 

Hmm. These are default SDX roms right off the project page, with no changes made to any of the CONFIG.SYS options or system variables.

 

EDIT: Okay, I rebooted, manually loaded RAMDISK.SYS, then set TEMP=DO: After that, DIR | LESS works as expected.

Edited by DrVenkman
  • Like 2
Link to comment
Share on other sites

Ok, it behaves so, because normally the $TEMP is set by RAMDISK.SYS. In SIDE and SIDE2 the RAMDISK.SYS is removed from the default CONFIG.SYS, and the SIDE.SYS driver is loaded instead. Most probably because of the MEMLO being too high if both are loaded.

 

But this means that you must set the $TEMP variable manually to a valid drive, if you want the pipelines to work properly.

 

EDIT: you were quicker :)

Edited by drac030
  • Like 3
Link to comment
Share on other sites

Hmm, a question: The download of the "supercart" version contains an ATR and ROM file. The ATR includes a "flasher" program to update the cart. I've successfully used that.

 

Now, if I make changes with the SDXImager, the program just modifies the ROM file. But how do I program this ROM file to the cartridge? Is there a stand-alone "flasher" program? Or how can I create a similar ATR which includes the "flasher"?

Link to comment
Share on other sites

As anticipated, 4.48 is even better than 4.47. It's really great to see what is awesome become even more awesome. Good work guys! So far what is tickling my fancy the most is the improvements to Sparta Commander, and the ability to make a non disk device like CAR: or PCL: the current working device.

Link to comment
Share on other sites

@Draco probably, but anyone who has insight please don't hesitate to jump in. In light of the fresh new release of 4.48 and its corresponding toolkit disk, I have decided to revisit my idea of attempting to make a recursive script to automagically find all the ARC files and extract them all. As Draco pointed out, there already exists code to do the ARC extraction. That works good. I want to wrap that up in code that will "walk the directories" doing that whenever an ARC file is discovered. Recursion is the only way I can think of to accomplish this in a script (batch).

 

So here's where I'm at; I have started formulating and experimenting with recursion through a directory tree but I'm just doing a simple dir listing when in them to see how it works. And it does work... at first. But before long, perhaps just 3 or 4 levels deep in recursion, things go wrong. An attempt is made to CD into something other than a directory, even though the loop specifies to work in +s *.*. I'm not sure how that happens, and also according to the docs, one should be able to go as deep as 8 levels without incident. I will put the code below:

EDIT: I will get back to this after I check it some more.
Edited by fujidude
  • Like 1
Link to comment
Share on other sites

A flashing ATR is just a disk in SpartaDOS format, containing two files: the flasher (*.COM) and the ROM image (*.ROM). Just replace the latter. Perhaps the Altirra's Disk Explorer (Tools->Disk Explorer) may be used to do that.

 

Ok, yes. Stupid me...

Link to comment
Share on other sites

Thanks. Just found it out by myself.

 

Quoting the manual:

 

 

 

 

SDX supports up to 16 open files, but each driver has its own limitation. The DSK: driver
allows you to specify the maximum number of channels open to it (the default is 5
which should be enough for any application). The CAR: driver only has 1 channel which
means that you may not copy files from CAR: with the COPY command. (COPY uses two
channels, one the source device and one on the destination. This is because COPY
opens one channel to the directory and another to the file to be copied.) To overcome
this limitation, you may TYPE the file on CAR: and redirect output to a file on disk (e. g.

TYPE CAR:COMMAND.COM >>NEW.COM).

Link to comment
Share on other sites

Okay continuation from post #38 above...

 

Here is the code:

;WD.BAT by FujiDude

proc walkdir
  seterrno 0
  for %d in +s *.*
    echo %d = $%d
    cd $%d
    if error
      exit
    fi
    gosub walkdir
    cd <
  next %d
return

gosub walkdir

And here is the output:

I:\
#-i:\wrkbench\wd
%d = BAT
%d = EXAMPLES
%d = MAKE
%d = MAKE.TXT

150 Path not found

I:\BAT\EXAMPLES\MAKE\
#dir

Volume:    SYSTEM
Directory: MAKE

MAKE     BAT    586 22-08-10  9:58
MAKE     TXT    523 22-08-10  9:52
62683 FREE SECTORS

I:\BAT\EXAMPLES\MAKE\
Edited by fujidude
Link to comment
Share on other sites

 

@Draco probably, but anyone who has insight please don't hesitate to jump in. In light of the fresh new release of 4.48 and its corresponding toolkit disk, I have decided to revisit my idea of attempting to make a recursive script to automagically find all the ARC files and extract them all.

FIND B:*.ARC >>TOOLS.BAT

Gives a list like this..

DB:>MAN_CMD.ARC
DB:>MAN_DRIV.ARC
DB:>UTILS>APETIME.ARC
DB:>UTILS>CDD.ARC
DB:>UTILS>CRC32.ARC
DB:>UTILS>DD.ARC
DB:>UTILS>DELDUP.ARC
DB:>UTILS>DPOKE.ARC
DB:>UTILS>DU.ARC
DB:>UTILS>FA_REG.ARC
DB:>UTILS>FSTRUCT.ARC
DB:>UTILS>HDSC.ARC
DB:>UTILS>HEXDEC.ARC
DB:>UTILS>INVERSE.ARC
DB:>UTILS>LS.ARC
DB:>UTILS>MACH.ARC
DB:>UTILS>MD5.ARC
DB:>UTILS>MEMINFO.ARC
DB:>UTILS>MKATR.ARC
DB:>UTILS>NVRAM.ARC
DB:>UTILS>PHDPLD.ARC
DB:>UTILS>RDDUMP.ARC
DB:>UTILS>RPM.ARC
DB:>UTILS>RUN.ARC
DB:>UTILS>SL.ARC
DB:>UTILS>STAT.ARC
DB:>UTILS>TAR17.ARC
DB:>UTILS>TREE.ARC
DB:>UTILS>TSR.ARC
DB:>UTILS>WC.ARC
DB:>UTILS>XFCONF.ARC
DB:>UTILS>XT.ARC
DB:>UTILS>XVER.ARC
DB:>SHELLS>MYDUP.ARC
DB:>SHELLS>SC100.ARC
DB:>SDX42>ERR_GMSG.ARC
DB:>SDX42>U_GETKEY.ARC
DB:>SDX42>XCOMLI.ARC
DB:>SDX42>JFSYMBOL.ARC
DB:>DSKTOOLS>EDDY204.ARC
DB:>DSKTOOLS>CLX19C.ARC
DB:>DRIVERS>CAD.ARC
DB:>DRIVERS>CPMFS.ARC
DB:>DRIVERS>PBI.ARC
DB:>DRIVERS>KTRACE.ARC
DB:>DRIVERS>RAMD816L.ARC
DB:>DRIVERS>FATFS.ARC
DB:>DRIVERS>TURBOBRD>65816.ARC
DB:>DRIVERS>TURBOBRD>HRAMTST.ARC
DB:>DRIVERS>TURBOBRD>HRAMSPD.ARC
DB:>DRIVERS>TURBOBRD>RAPIDRD.ARC
DB:>DRIVERS>SCRDRV>CON.ARC
DB:>DRIVERS>SCRDRV>SVBXE104.ARC
DB:>DRIVERS>SCRDRV>RC_GR8.ARC
DB:>DRIVERS>SCRDRV>VBXE.ARC
DB:>DRIVERS>PCLINK>PCLINK.ARC
DB:>DLL>UNIXTIME.ARC
DB:>DLL>FSEL.ARC
DB:>COMPAT>VPRINT.ARC
DB:>BOOTLD>SDLOAD.ARC
DB:>BAT>MAKE.ARC

61 matches found!
And then use ED TOOL.BAT and edit for this effect..

COPY B:>UTILS>*.ARC
COPY B:>SHELLS>*.ARC
COPY B:>SDX42>*.ARC
COPY B:>DSKTOOLS>*.ARC
COPY B:>DRIVERS>*.ARC
COPY B:>DRIVERS>TURBOBRD>*.ARC
COPY B:>DRIVERS>SCRDRV>*.ARC
COPY B:>DRIVERS>PCLINK>*.ARC
COPY B:>DLL>*.ARC
COPY B:>COMPAT>VPRINT.ARC
COPY B:>BOOTLD>SDLOAD.ARC
COPY B:>BAT>MAKE.ARC
ECHO BAT DONE..

Move this batch file to Partition/Folder where you want the ARC files to go an run it..



Not a neat script and took about 10 Minutes to complete but OK for my needs..

  • Like 1
Link to comment
Share on other sites

@rdea6: I'm always interested to see how other Atarians such as yourself approach things. That does work, but for me I wanted to unpack the ARCs in their original hierarchy, not in one flat folder. What I've been doing in the mean time (if and until I can ever create exactly what I want) is walking the tree manually and using the UNPACK batch code that Draco referred to. Like your method, that also took me not much time to do. But for me it isn't so much about just making the task easier and quicker; rather it's about the challenge to create the algorithm. As a bonus, if I am able to accomplish it, then it can save many people the 10 minutes or so which then makes the effort more worth it even from a time investment perspective.

  • Like 2
Link to comment
Share on other sites

@fujidude: that looks like a bug, yes, as, despite the +S, it picks up the last file in the directory. This certainly needs closer inspection. For now I have no clear idea where to look to trace it down.

 

@rdea: a list of subdirectories is easier generated with DU /Q.

  • Like 1
Link to comment
Share on other sites

@fujidude: I can confirm, that is a bug in the FOR command. It does not correctly handle EOF. It is reproducible in much simpler circumstances, e.g.:

 

for %d in +s *.*
  echo d = $%d
next %d
when ran on an empty disk, will display 'd = MAIN' which is obviously incorrect :)

 

Anyway, I do not know if your approach has much chance to work, because of the very limited size of the "stack" the GOSUB/RETURN and FOR/NEXT utilize.

Edited by drac030
  • Like 1
Link to comment
Share on other sites

@fujidude: I can confirm, that is a bug in the FOR command. It does not correctly handle EOF. It is reproducible in much simpler circumstances, e.g.:

 

for %d in +s *.*
  echo d = $%d
next %d
when ran on an empty disk, will display 'd = MAIN' which is obviously incorrect :)

 

Anyway, I do not know if your approach has much chance to work, because of the very limited size of the "stack" the GOSUB/RETURN and FOR/NEXT utilize.

 

 

Well the docs say up to 20 levels deep but only up to 8 is safe. I think 8 is probably more than enough in most cases since the path length is so limited in the 1st place. I'm not giving up on this just yet. Is there a way to conditionally test if something is a directory?

 

I think I just found it in the manual...

IF NOT EXISTS +S %1

I'm going back to digging around more.

Edited by fujidude
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. Edited by drac030
  • Like 1
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...