Jump to content

Casey

Members
  • Posts

    535
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Casey's Achievements

Dragonstomper

Dragonstomper (6/9)

462

Reputation

  1. I received a beige 99/4A for Christmas in 1983 (I was 8 years old), and it was $50 then. I remember asking for an Atari 2600 for Christmas that year and getting the TI computer instead (most likely because it was cheaper and my parents did not have a ton of money). But I have that decision, and the 99/4A to thank for my interest in computers and my career today, so the beige 99/4A is very important to me for nostalgic reasons.
  2. 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
  3. One comment I will add - I don't know anything how the SD2IEC works, but if it emulates a 1541, you'll want to make sure to check that the user actually entered a filename at the prompt (don't assume they did!). On a real 1541 drive (and I just duplicated this on my The VIC20 using accurate disk emulation), suppose a user just hits Return at your INPUT for a filename F$ will equal a null string, so your OPEN statement will work out to OPEN 2,8,2,""+",S,W" The result of this is a SEQ file named "," on the disk. The 1541 will happily let you create many such files on a disk, all named "," - it will not give you a "FILE EXISTS" error if you do the same thing more than once. The "fast" disk emulation on The VIC20 doesn't do this, so perhaps the SD2IEC won't either, but if it accurately emulates a 1541, it is something to watch out for. If you end up with multiple comma files, you can only access the first one for reading and you can't rename them. You can delete them, but they all get deleted at once.
  4. Why not just load VIC Mail into the VIC-20, format the volume on the SD2IEC, and then save VIC Mail back to the image?
  5. For question 3 - what happens in a normal file is that the file is made up of 256-byte blocks. The first two bytes contain the track and sector numbers of the next block, and then 254 bytes of the file fill the block. In a splat file, the last block hasn't had the track and sector numbers filled it (the track number would be set to 0 if the file had been closed correctly), so they don't point at anything meaningful. Now, let's save a new file. It may claim the block that wasn't closed as a part of itself, since the BAM would indicate the block is available, and then fill other blocks, updating the track and sector pointers as it goes. The original file (the splat file) doesn't know that it wasn't closed, so if the track and sector pointers happen to point to something that now contains parts of your new file, the disk drive doesn't know they are 2 different files. The directory may know that, but the files themselves don't. The directory only points to the first block in the file. If you then scratch your original file, the disk drive will trace down the file, marking those tracks and sectors as free in the BAM, and it'll keep marching along through your new file. Now, parts of your new file are marked "free" in the BAM. Maybe not in the directory yet, but in the BAM, they are free blocks. Save a new file and you may stomp all over your other file because the disk drive thinks those blocks were free, creating a big mess. The Validate command causes the dive to reconstruct the BAM by tracing each file through the track and sector links from the directory entries. That's how it cleans up a splat file without generally wrecking anything else.
  6. I don't know about how an SD2IEC device works, but the secondary addresses have meanings that can cause issues, so hopefully this is helpful. On tape, to write a file, you use: OPEN 1,1,1,"FILENAME" (where the filename is actually optional) On tape, to read a file, you use: OPEN 1,1,0,"FILENAME", again the filename is optional. The reason you see OPEN 1 in the program is that device 1 is the default device number, 0 is the default secondary address and no filename is the default. Thus OPEN 1 is equal to OPEN 1,1,0. The important thing here is - secondary address 0 = read, 1 = write. In your example, you turned this into: OPEN 1,8,1,"FILENAME" On disk, secondary address 0 is reserved for LOAD, secondary address 1 is reserved for SAVE. You can use these (as you did) but it causes issues because 2 additional bytes are added to the front of the file for the load / save address. You can use secondary addresses 2-14 without this effect, which is why @OLD CS1 did that above. Disk errors (flashing lights on disk devices), with the exception of ?FILE NOT FOUND ERROR are never displayed on the screen. You have to ask the disk drive what its issue is. To get you going, based on your previous message, you should ask the user for the filename as you did, but do something like this: 0 OPEN 15,8,15 (open the command channel to the disk drive - do it very early in the program and leave it open. If you close this file, *ALL* open files in the disk drive are closed) 70 INPUT "FILE TO SAVE";Q$ 80 OPEN 1,8,2,Q$+",S,W" (The disk drive needs to know that you are writing a sequential file - it will assume reading if you don't specify) At this point, you should go check the disk drive and see if it had heartburn. 90 GOSUB 1000 100 IF EN THEN (a disk error occurred) - this could be anything from a READ or WRITE ERROR, DISK FULL, FILE EXISTS (I suspect this is the issue you may have). You have to decide what to do if a disk error occurs. You could just abort the program like this: 100 IF EN THEN PRINT EN,EN$,ET,ES:STOP and the disk error message will be displayed. You could also check for the specific error number for FILE EXISTS or FILE NOT FOUND and then tell the user to give you a new filename. The point here mainly is that disk requires more handholding than tape does. .... 1000 INPUT#15,EN,ER$,ET,ES:RETURN You'll also need to figure out how you want to handle the files from this program. Do you want to just use 1 file and replace it each time? Want a new file? Want to ask the user what to do if the file already exists and give them a choice? With tape, we don't really have to worry about all this - the person can just fast forward or rewind the tape to a new spot, or change the tape. Incidentally you just need to say IF EN without looking for anything else because if the error number is 0, then no error occurred. The message returned in the variables would be 0, OK, 0, 0.
  7. SpeedScript is ML - definitely not BASIC. It probably has 1 BASIC line like: 0 SYS ####, which makes it easy to save and load like BASIC - but it is definitely ML. Probably very difficult if not impossible to change to work with a 40-column screen rendering software. One handy side effect of this, though, is if you change the colors within SpeedScript, then exist and save it, when you load it, it will come up in the colors you selected.
  8. In TI BASIC, you have 2 options. You can use INPUT and just tell the user to press Enter (this will cause the screen to scroll however). Otherwise you can use CALL KEY in a loop. 150 PRINT "PRESS ANY KEY TO CONTINUE" 160 CALL KEY(0,K,S) 170 IF S=0 THEN 160 This will keep the program "paused" until you hit a key. It will throw the key away that you pressed (you can retrieve it if you wanted it by looking at K) but will move on if you press any key. Doing it this way doesn't cause a scroll also. As others have mentioned, the Personal Record Keeping and Statistics modules are actually TI BASIC programs in a cartridge. TI added extra subprograms to allow for the equivalent of DISPLAY AT and ACCEPT AT to the module for the program itself to use, but they are callable to you if you put the module in and then select TI BASIC. You can find some examples of how to use them on the whtech site. Another good example of how to do things in TI BASIC - If you can find the "Oldies but Goodies Games I" cassette or disk - one of the games in this collection is "Word Scramble" Word Scramble does some interesting data entry techniques within plain TI BASIC, by accepting screen input on certain lines on the screen, using CALL GCHAR and CALL HCHAR, and plotting the cursor (character code 30) on the input line. It would be useful, if you wanted to study controlled input in TI BASIC. TI BASIC and Extended BASIC, however, will never start text at the "home" position and print down the screen until hitting line 24. It just doesn't have the ability to do that.
  9. DSK1 will require a file name. (CS1 doesn't recognize filenames at all). One choice would be to replace the "CS1" with a very specific filename like "DSK1.CALCFILE", but this means your file will be overwritten each time you use it. A better option would be to add a line requesting a filename, between 1280 and 1290, like: 1281 INPUT "FILENAME: ":FN$ Then change 1290 to add that filename to the OPEN command: 1290: OPEN #1:"DSK1."&FN$,INTERNAL,INPUT,FIXED 192 A similar change before line 1410 to allow you to specify an output filename. This way, you can deal with multiple files on the same disk image.
  10. It's been about 5 years now I guess, but I also bought a never opened console on Ebay (though a beige one, because that's the version I had as a child) and it, too, worked perfectly and still does. It's back in its box right now while I have my "The VIC20" hooked up, but I do get it back out from time to time. Very cool to have that experience of being the first person to use a 40-year old computer.
  11. I think TE II came with an overlay for the 99/4 and code in the module to allow typing all of the keys that are not normally available. TE II manual TEII Addendum I think if we could find an image of the overlay, that would probably show where the extra characters are. The space key acted as a Control key and you could switch cases with a Control key combo...
  12. The Super Expander 64 cartridge will give some level of compatibility with BASIC 7.0's graphic commands if that is of any value. Most of them are present in the Super Expander. It adds a few other things as well that exist in BASIC 7.0 (ELSE I believe, for one).
  13. I also don't understand why anyone would do this with a 1571. It would take a series of commands that very few people would ever have the use of to create a wrong-way flippy disk... While it certainly is possible to format a double sided disk as 2 single sided disks in a 1571, there's no practical reason to do that. Formatting them single sided by turning over the disk to format the second side would make them compatible with a 1541. Formatting them as 2 single sided disks in the 1571 would not do anything more than give you the same size as a double-sided format, but with the added inconvenience of having to send disk head change commands to see the back side. Clearly whoever put this disk together doesn't know what they are doing.
  14. Your comments prompted me to have a thought... The 1541 (and all other Commodore drives) rely on the ID characters used when the disk is formatted to know if the disk has been changed. If both sides of the disk were formatted with the same ID, the drive would not know you changed the disk and that could cause all kinds of problems. The way to know for sure would be to load the directory LOAD "$",8 for side A, look at the 2 characters that come after the disk name. Turn the disk over and then send the disk drive an Initialize command and then load the directory again for side B: OPEN 15,8,15,"I0":CLOSE15 LOAD "$",8 Then see if the second side directory looks correct (and compare the ID characters to side A). If the same ID was used, you'll have to send the Initialize command each time you change sides of the disk.
  15. BASICA doesn't run on a PCjr unless you have Cartridge BASIC plugged in. It does work if you rename it to BASICB or something else, but IBM DOS on the PCjr will insist on calling Cartridge BASIC if you run BASIC or BASICA. Keep that in mind. Also the PCjr specific features are not available if BASICA is renamed to something else. IBM BASIC will automatically append the .BAS extension to the filename with the SAVE command unless you supply one yourself. It will also autoload a .BAS file without needing the extension if you supply a filename after the BASIC command. If you want to run the compiled version, you'll type PC-CALC. If you want to run the BASIC version, you'll need to copy PC-CALC.BAS to a disk that also has BASIC on it, or load it from within BASIC after you start BASIC up and switch disks... You could try it out first to see if it does what you want by putting DOSBox on your modern computer, putting the PC-CALC files in a directory on your computer's hard drive, setting DOSBox to emulate a PCjr, and then running it there first before you go to all the trouble of typing in a huge program listing.
×
×
  • Create New...