Jump to content
IGNORED

why isn't VIC Mail program working with SD2IEC after a few program changes?


Recommended Posts

As an approach to using minimal memory, as you are asking the user to type in the filename rather than a numbered list of choices, I would not use an array to load the directory and simply display each directory entry you come across.

 

Additionally, since you only want to deal with SEQuential files, the pseudo-file to open for the directory will be "$*=S" or "$0:*=S"

Link to comment
Share on other sites

Posted (edited)

 

@OLD CS1...  I am getting closer and closer I think to getting this thing to work, but I still have a few things to fix, because I saw I unfortunately created another splat file. I was hoping not to abandon this project (as I/we all decided it was best to do with the Data Manager program on my other thread) since from your help and Casey's help it seems I am very close. The current status is that the main dot matrix listing I posted works great and my handwritten amend1 showing how I routed your drive directory file list segment, despite your last post, worked PERFECTLY too (thank you!). However, when I added 4 new lines which involve the ,S,R and ,S,W, those, in conjunction with the main program itself, caused the new splat file. So I would have to post those 4 lines and we would have to get those correct and working in conjunction with the entire program, which means reviewing it as a whole to make sure there are no other conflicts within the entire program. 

 

The whole splat file thing just makes me, well, nervous. I would only want to finish the program off if you- (addressing you here because you are the one who has been mostly with me on this thing), but I will say it to everyone here on the thread, so, if you all will try to help fix the error/s and take this home. I will, this one last time, put my card back in the PC and just delete that one splat file, but never again will I do this. It's just too scary.

 

So what I am saying is that I don't want to try saving another sequential file again until we are 100% sure the final program will not cause any more splat files.

 

If I posted the 4 lines, would you (all) work with me to finish it off and ensure it is working perfectly before I would try to save a data file again?  If no one wants to examine this with me, I will abandon it, because I just don't want to risk any more playing attempts on my own with saving a data file since each imperfect attempt will likely cause a splat file.  I was personally willing to try more experimenting to get it on my own, but factoring in the splat thing, at this point, I actually just need it to be correct, tested, and ready to go before I would again run the program.

 

This is the likely the last VIC-20 program modification for the SD2IEC I will ever try myself or even ask about at all.

  

 

 

Edited by newTIboyRob
Link to comment
Share on other sites

Just a quick note - a splat file is just a file that hasn't been closed properly in the disk device.

 

Example - do the following in direct mode:

OPEN 2,8,2,"TEST FILE,S,W"

PRINT#2,"SOMETHING"

LOAD"$",8

LIST

 

You'll see a splat file at this point.

The act of loading the disk directory has caused BASIC to forget about file #2, but the disk drive still has it open.

Enter this:

OPEN 15,8,15:CLOSE 15

LOAD"$",8

LIST

 

The splat file is no longer a splat file.  Opening and closing a file to channel 15 (command channel) closes all open files in the disk drive, even if BASIC's side is already closed.

 

All of this is to say - creating a splat file and it staying there happens for just a short list of reasons:

1. A disk error occurred (Disk full, taking the disk out while the program is running, etc).

2. A program error occurred (?SYNTAX ERROR IN 10 for instance) - which aborts open files in BASIC but keeps them open in the disk drive.

3. Somehow getting to the end of the program without issuing a CLOSE command to the open file number

 

 

Link to comment
Share on other sites

Hm, I didn't know that opening and closing the command channel would close all files from the drive's point of view and get rid of splat files. I thought only validate would fix that. You learn something new every day (more or less).

Link to comment
Share on other sites

2 hours ago, carlsson said:

Hm, I didn't know that opening and closing the command channel would close all files from the drive's point of view and get rid of splat files. I thought only validate would fix that. You learn something new every day (more or less).

It only works if the file channels are still open on the drive -- so, when this happens do not reset the drive/SD2IEC.

 

If you know what the file numbers are, when the program stops and exits back to immediate mode, you could issue a CLOSE to close the files, too.  Not sure it will work after loading a directory, however.  You need to do it right away.

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