Jump to content
IGNORED

Supernotes


GDMike

Recommended Posts

2 minutes ago, GDMike said:

Yes sir. I figured that, what you said above.

I've counted my string that a user inputs for filename, I start my search just to the right of the first decimal point, then start counting until either eol, or another decimal is reached and I added that count to >0F...

Why? In DSK2.FILENAME there are eight characters to the right of the first decimal point. But the file name is the entire DSK2.FILENAME. That's 13 characters. You don't get that by 8+>0F, since that will be 23. So your file name will be DSK2.FILENAMExxxxxxxxxx, where the xxxxxxxxxxx represents whatever leftover is in memory. If the previous file name was DSK.SUPERDISK2.ANEWFILE, then the filename you'll get will be DSK2.FILENAME2.ANEWFILE with your method.

All that reasoning you did about when to change the file name is completely irrelevant. It doesn't matter if you put it in place early or late, as long as it's there in time for the DSRLNK call. Well, unless you overwrite it by something by mistake, of course, but if you do that, then you are completely off anyway.

Link to comment
Share on other sites

2 minutes ago, apersson850 said:

Why? In DSK2.FILENAME there are eight characters to the right of the first decimal point. But the file name is the entire DSK2.FILENAME. That's 13 characters. You don't get that by 8+>0F, since that will be 23. S

Yep. That is why my explanation about how hard it is to explain stuff using text! of course I have a filter for that kind of thing and I bypass those file names

Edited by GDMike
Link to comment
Share on other sites

23 hours ago, GDMike said:

Yes, that's right. Because my change I'm making is always to PAB+13

And with that said, my PAB 9th byte has been>0A, but I only seem to create a 5 digit filename, so I bumped byte 9 of my PAB to >0F,

Which seems to be the reason for the complete confusion. At PAB+10, you have something like DSK2.MIKE. This is the file name, all of it. Nine characters. In that case, PAB+9 should be 9. Nothing else. If the name of the file is INTRODUCED, then you get DSK2.INTRODUCED. Now the length is 15 (or >0F, if you prefer). That's the value that goes to PAB+9.

  • Thanks 1
Link to comment
Share on other sites

7 minutes ago, GDMike said:

Yep. That is why my explanation about how hard it is to explain stuff using text! of course I have a filter for that kind of thing and I bypass those file names

It's not hard. What do you bypass? You aren't supposed to bypass anything, you are supposed to include the whole file name in the count. All the letters DSK2.FILENAME, for example.

  • Like 1
Link to comment
Share on other sites

7 hours ago, apersson850 said:

It's not hard. What do you bypass? You aren't supposed to bypass anything, you are supposed to include the whole file name in the count. All the letters DSK2.FILENAME, for example.

I think I posted a video showing it already working? It's back a ways..., Ahh yes #647

Edited by GDMike
Link to comment
Share on other sites

Maybe I forgot to mention. That it's working for me.

I see what you are saying, here's the one point that I either didn't understand for whatever reason, but I didn't know that the PAB needed to first be setup and sent to VDP ram before doing other stuff, like I didn't know the order mattered.

What I was talking about when I said, either in the first part of the last part...

Was, because I didn't understand that what I just said about placing PAB in memory, so my first part, that I was referring to was exactly that, setting up the PAB and placing defaults in VDP RAM and the last part, meaning making my changes and pushing that into VDP RAM., Well, I saw what you said, and so I went back and made those changes to go ahead and do everything at the first part of my routine. I'm very sorry to everyone for not getting this understood, and it may have very well been mentioned and I just didn't understand what that looked like for whatever...

It's all new to me, you may take it for granted, but I have to try to figure out the individual pieces.

I was breaking the entry down into sections because I didn't understand how the seperator was going to effect the PAB, as I thought I'd have to count each sub folder and add into my PAB+9 MSB byte.

I'm getting it understood, your patience is invaluable and I completely understand your frustrations as the trail of posts are bleeding..if I could go to post 2, I'd delete the rest.

So what did I learn.

Put more details in my comments

 

how to open a file, write a record,close a file. 

Thank you very much. 

 

 

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

My next step in my process was cleaning up a little bug, it seems that when I press F5, to pull up my command line, that my tipi clock would lose its first digit.

So I found that I Branch to a routine that copies my screen so that it can be restored after my file activity was completed, and Well, that"Copy screen" routine had a section that read whatever is in the keyboard buffer at the time and writes it so as to not get a "picture" with a cursor in the screen. But I had already taken steps to do that already, prior to the routine.

So great, I saved some memory by removing 2 instructions and fixed my disappearing date digit.

  • Like 1
Link to comment
Share on other sites

5 minutes ago, GDMike said:

I've changed my file type. I've decided to do a DF 210. This way, I could read from CPU Ram an 840 byte page in 4 passes to VDP Ram.

TBD...

I'm not sure but it probably won't make any difference if you used 210 or 256.  I think the machine is going to read full sectors anyway.

Home Automation is onto something too. If you want to go for your own file format, LOAD/SAVE operations let you grab 8K in less than a second.

It's just sitting there in VDP RAM for you after that.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

24 minutes ago, TheBF said:

I'm not sure but it probably won't make any difference if you used 210 or 256.  I think the machine is going to read full sectors anyway.

Home Automation is onto something too. If you want to go for your own file format, LOAD/SAVE operations let you grab 8K in less than a second.

It's just sitting there in VDP RAM for you after that.

I'll toss it around and see what I can come up with...he would know

Link to comment
Share on other sites

Yupper!

 

This should work great with TIPI...

 

1. Set up PAB. Probably best to place it at the top of VDP RAM.
2. Save all or parts of VDP RAM to SAMS or TIPI(for restore after SAVE/LOAD completes).
-now you can use VDP RAM freely for your SAVE/LOAD operation-
3. Blank the screen using VDP registers(unless you want a kool sideshow on the screen while saving/loading).
4. Use VMBW/VMBR, SAVE/LOAD, to move data en masse(just don't overwrite the PABs).
5. Restore VDP RAM from step 2.
6. Unblank the screen.

 

Since you can specify the start address and length in the PAB, as well as with VMBW/VMBR, there isn't to much math to do(just sorting out the pages).

 

You will want to leave some space for the DISK DSR's PAB(s). I'm not all to familiar with the various DSRs exact PAB or buffer locations. You could perhaps observe this by using Classic99's debugger while loading/saving disk data. I imagine it would be safe to use VDP RAM from 0 to 15119(18, 840 byte pages).:ponder:

 

Edited by HOME AUTOMATION
Link to comment
Share on other sites

The only reason for not using a memory image file is if you want to save more than the maximum size, which is no more than 16 kbytes (in reality a bit less, due to not all of VDP RAM being available for your buffer), in the same file. Many make the memory image files 8 kbytes, to avoid having to save a lot of stuff from VDP RAM when doing IO. A common way to name these files, if you need more than one file, is FILEA, FILEB, FILEC or FILE1, FILE2, FILE3 and so on.

Regarding the records, then yes, since a disk sector is 256 bytes, and records will not be split across sectors, the largest record size less than 255, that's meaningful, is 128. If you go to a record size of 129, then you get 127 wasted bytes in each sector. But two 128 byte records will fit in one sector. That will pack data just as efficiently as a memory image file, but it will not load as efficiently.

 

Oh, by the way, just because something works doesn't necessarily mean that you have done it in a good way. Sometimes the time to start over is just when it starts to work, since then you know what it takes. Add to that your own experience and input from others, and you may end up with a new solution, one that's faster, smaller, cleaner, easier to understand and combines easier with the rest of your program.

Link to comment
Share on other sites

8 hours ago, HOME AUTOMATION said:

2. Save all or parts of VDP RAM to SAMS or TIPI(for restore after SAVE/LOAD completes).
-now you can use VDP RAM freely for your SAVE/LOAD operation-

What does this mean? Thx

If your talking about the information on my screen being wiped out, I've already got a copy screen performed prior to my F5 command call. I restore after my file work is completed. I think this is what you're talking about.

Ok, handled.

 

Regarding item 3, slideshow. I've seen this happen. I know how to blank out the screen, but why does the screen do this?

 

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

4 hours ago, apersson850 said:

just because something works doesn't necessarily mean that you have done it in a good way.

Exactly, that's what happened here, I had a working situation, but when I saw what you said about, something..I forget now... but it clicked together. So I went back and destroyed about 20 lines of coding.

That's when it all came together for me regarding the PAB. And why? Well I was focused on the seperator and what impact it has, and having my 9th byte set to a value and setting the initial TEXT portion, byte 10, then 25, to a length equal to xx bytes, and so I knew how to adjust the 9th Byte but I thought it had to be done as soon as the PAB was defined, so like lee said, it's getting killed by the next command that turns it back into >A, so I just made a routine that looks for the decimal and adjusts the value of byte 9 with my new count. And things didn't turn out well when I had a wrong value in PAB but the right length in another area and that threw me off because I was doing this exact thing and it had failed, so I never went back again, and that led me to believe that whole idea was wrong. Which it WAS NOT. But, I did find a work around???

And it did work.lol

not good practice though, and not efficient.

But when you said something like, no, it's all done at once or something like that... and we were talking about the"." Seperators,sub folder length, ah ha .. light bulb.

I just won't give up.

 

Edited by GDMike
Link to comment
Share on other sites

1. Set up PAB. Probably best to place it at the top of VDP RAM.

 

can I use that area designated for Extended Basic, or is that only available when that cartridge is active?

I Suppose I could start at the top of VDP RAM and even destroy my pattern table, as I can just reload the pattern table on exit of the save/load routines?

BTW, I'm not using ANY sprites so that area is free too.

and another question, am I looking for 8K in VDP ram, I'm not understanding your saying, 8K is available..

unless I'm looking to use, where this map says, extended basic which to me looks like the lower part of VDP ram by looking at this map, unless you mean the upper "addresses" vs the upper 0000.

let me see, VDP  grows... Down? 

 

IMG_20210127_083519912.jpg

Edited by GDMike
Link to comment
Share on other sites

16 hours ago, GDMike said:

 

It's all new to me, you may take it for granted, but I have to try to figure out the individual pieces.

I was breaking the entry down into sections because I didn't understand how the seperator was going to effect the PAB, as I thought I'd have to count each sub folder and add into my PAB+9 MSB byte.

 

I've not been checking this thread too often, but had a couple of minutes and saw this statement you made.

 

If the path to your file is TIPI.SUB1.SUB1A.FILENAME, then your length is decimal 24 or hex >18 for your PAB+9 byte as you do have to count each sub folder.

 

A lot of programmers will allocate a blank string of spaces 40 bytes in length to accommodate the maximum path length for a device path and filename, many times with a BSS 40 instruction.

 

Depending upon how you handle filename entry by the user, you may actually want to make it a BSS 42, so that during the filename entry, your buffer is actually the filename.  After filename entry depending upon how you have coded things, you would either keep a count of the length as the user enters it, or go back and calculate the length looking for some kind of termination character which is why I added 2 more bytes to land on an even word boundary when you include the termination character.  With the TI-99/4A, if you clear in VDP where you are typing the filename, you would count character length reading one character at a time and stop the count at the first space character on the screen.  There are a multitude of ways to handle determining the filename length.

 

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, GDMike said:

Can I use that area designated for Extended Basic, or is that only available when that cartridge is active?

 

Extended Basic (XB) does not have anything to do with activating access to any part of VRAM. All of VRAM is available to Assembly Code (ALC), though some of it not without dire consequences.

 

What XB does with VRAM should not concern you unless you are writing ALC for XB, which you are not. You have 16 KiB of VRAM (>0000 – >3FFF) in which to work. There are a few areas you should either not touch or backup and restore when you are done. I am not sure whether TIPI uses upper VRAM for I/O buffering, but with the TI controller, you cannot touch the DSR’s buffers at the top of VRAM without serious consequences. This area varies in size by the number of simultaneous, open files you allow, but you know its size by consulting >8370 in scratchpad RAM. >8370 contains the VRAM address immediately before the DSR’s buffer area. Stay below it.

 

...lee

 

 

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