Jump to content
IGNORED

Supernotes


GDMike

Recommended Posts

If you have questions about the program in the scan, just let us know. I wrote it just 35 years ago, so I'm sure I remember it good enough to comment on it!

 

Oh, I realized now that I didn't write about that the tick mark [ ' ] is what the daisy wheel printer used for the @ character.

So MOV '6(R13),R2 should be read as MOV @6(R13),R2

Edited by apersson850
  • Thanks 1
Link to comment
Share on other sites

Yes, the program itself is in English. That's mainly because of the conflicts with the character sets in the old days, between English and Swedish. The note I wrote above about the tick mark for @ would come back if I attempted to print the program on my old impact printer.

MOV @6(R13),R2 would then be printed as MOV É(R13),R2. In Pascal, array[index] would be arrayÄindexÅ and so on. Due to that problem, I always wrote all my code in English, so I could use the English character set in the printer.

  • Like 1
Link to comment
Share on other sites

1 hour ago, TheBF said:

The Swedish is interesting to me.

I speak Dutch and with English there is a lot of overlap in the vocabulary.

It's so close to comprehensible to me but not quite. :) 

 

i didnt mean to be so blunt on your use of the EQU label tags...I was stressing at that time...sorry about that!

Link to comment
Share on other sites

14 minutes ago, TheBF said:

No worries.  I never know what is helpful or not so I just offer them up.

 

i should have kept my mouth shut...always good to get information..i was def not well then...

i have no excuse really, just stupid. I can't read his code on that newsletter well either and a little too much for me to follow.

Im still having trouble, I thought I was moving my CPU ram,(S32P1=840 bytes of data) to VDP buffer (BUFR, >1000) by doing this:

 

FPAB DATA >0000,>BUFR,>0000,>0348,>000F

TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later...

 

LI R0,S32P1

LI R1,BUFR

LI R2,840

BLWP @VMBR

 

and then performing my WRITE

LI R0,FPADR

LI R1,FPAB

MOVB @SAVE,R1

BLWP VSBW

 

I get a file written to DSK3 called MYFILE

It is a PROGRAM type file with a size =2

 

but viewing the hex file, is '0000' '2020'

for most of it except the header...

so do you see anything that jumps out?

 

 

FILEM

MYFILE

Edited by GDMike
Link to comment
Share on other sites

I think the VMBR should VMBW to write to VDP RAM.

 

You might also want to reorg how you do your PAB it makes it easier to know which fields are bytes and which are ints.

(I think I got it right, but double check)

 

* vertical organizing this PAB let's you use the BYTE directive as needed
* Better clarity on what is what 

FPAB               * for Load/save actions
FLG   BYTE >00      * FLG is a BYTE
FBUF  DATA >BUFR,
RLEN  DATA >0348,   * RLEN and chars field used together
RNUM  DATA >0000
RSTAT BYTE >00
FLEN  BYTE 11         * this byte MUST be the length of the text below
      TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later...

* WRITE the CPU buffer to VDP RAM
      LI R0,S32P1
      LI R1,BUFR
      LI R2,840
      BLWP @VMBW      <-- * we are writing to VDP RAM not reading ?

 

* and then performing my
      LI R0,FPADR
      LI R1,FPAB
      MOVB @SAVE,R1
      BLWP VSBW

 

Link to comment
Share on other sites

You could just as well have studied SETPAB in my program. It installs the PAB in VDP memory, then calls DSRLNK. It also saves what's in VDP RAM at the PAB location, and restores that afterwards, but you don't have to do that if you don't need to.

Right at the beginning of SETPAB there's some housekeeping, since I used the same SETPAB regardless of whether I was writing or reading the file.

  • Like 1
Link to comment
Share on other sites

3 hours ago, TheBF said:

I think the VMBR should VMBW to write to VDP RAM.

 

You might also want to reorg how you do your PAB it makes it easier to know which fields are bytes and which are ints.

(I think I got it right, but double check)

 


* vertical organizing this PAB let's you use the BYTE directive as needed
* Better clarity on what is what 

FPAB  BYTE             * for Load/save actions   ***** There has to be a byte here too, or everything is off by one ****
FLG   BYTE >00      * FLG is a BYTE
FBUF  DATA >BUFR,
RLEN  DATA >0348,   * RLEN and chars field used together
RNUM  DATA >0000
RSTAT BYTE >00
FLEN  BYTE 11         * this byte MUST be the length of the text below
      TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later...

* WRITE the CPU buffer to VDP RAM
      LI R0,S32P1
      LI R1,BUFR
      LI R2,840
      BLWP @VMBW      <-- * we are writing to VDP RAM not reading ? *** Yes, should be VMBW ****

 

* and then performing my
      LI R0,FPADR
      LI R1,FPAB      <--- There's no point storing a value in R1, when it's overwritten in the next instruction
      MOVB @SAVE,R1
      BLWP VSBW

 

No, this isn't correct. Look at the changes I did in the code above.

 

Mike, you wrote earlier that you can't save this to a floppy disk, since the files are too large. But you save 840 bytes in a file. Even if you merge several such blocks, there's a size limit to memory image files. Normally they aren't more than 8 kbytes each. Which is the limit you are thinking about when you say they are too large for a floppy?

  • Like 1
Link to comment
Share on other sites

6 hours ago, TheBF said:

The Swedish is interesting to me.

I speak Dutch and with English there is a lot of overlap in the vocabulary.

It's so close to comprehensible to me but not quite. :) 

If you know Swedish and German, then you can semi-understand Dutch. One of my daughters speaks decent Dutch. She lived in the media city, Hilversum, for a year.

  • Like 1
Link to comment
Share on other sites

5 hours ago, apersson850 said:

No, this isn't correct. Look at the changes I did in the code above.

 

Mike, you wrote earlier that you can't save this to a floppy disk, since the files are too large. But you save 840 bytes in a file. Even if you merge several such blocks, there's a size limit to memory image files. Normally they aren't more than 8 kbytes each. Which is the limit you are thinking about when you say they are too large for a floppy?

 

Rt now I'm just trying to get anything to write to a file, it doesn't have to be 8k, even though I want 8K on the final result, at this point I'm just trying to get a feel of what and how to get even 840 bytes or 10 bytes on a file. I might be getting 840 bytes here, but it's not the 840 that I'm looking for, it's not my cpu data, it's coming from somewhere else and that is what I was trying to figure out.

Edited by GDMike
Link to comment
Share on other sites

I've understood that part of it. But earlier, when we discussed where to put the buffer in VDP RAM, I pointed out that you should avoid the last part of VDP RAM, as it's used by the disk controller. Then you replied that a floppy was too small. That's why I asked "too small for what?", since it's for sure not too small for 840 bytes. What are your long range plans here?

 

In your comments you stated that VMBR was a typo. That would be good, since i should be VSBW. But then you wrote it's VMBR in the code... It shouldn't be!

Again, if you need help understanding what's going on in the code I posted a scan of, then feel free to ask. But I got to get a feeling for where you get stuck, or I can't be of any assistance.

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

I'm trying something else, I'll tell you in a moment and then we can straighten some things out, because so far, when trying to write a 8K file, I haven't achieved that, even with the pab set for >2000

And my buffer >1000 filled with 8192 bytes of my SNP pages.

So in a moment I'll show what I've got in code..

Thx so much

Link to comment
Share on other sites

26 minutes ago, GDMike said:

Rt now I'm just trying to get anything to write to a file, it doesn't have to be 8k, even though I want 8K on the final result, at this point I'm just trying to get a feel of what and how to get even 840 bytes or 10 bytes on a file. I might be getting 840 bytes here, but it's not the 840 that I'm looking for, it's not my cpu data, it's coming from somewhere else and that is what I was trying to figure out.

 

What you need to understand is that the DSR does not use CPU RAM buffers. It uses only VDP RAM. The buffer address you put in PAB+2 must be in VRAM. Your CPU RAM buffer(s) must be copied to that VRAM buffer before you attempt to write data to a file. If you are trying to SAVE 8 KiB to a file, you must copy that much data from CPU RAM places to your VRAM buffer. The DSR call by DSRLNK does not do that for you.

 

...lee

Link to comment
Share on other sites

3 minutes ago, Lee Stewart said:

you are trying to SAVE 8 KiB to a file, you must copy that much data from CPU RAM places to your VRAM buffer. The DSR call by DSRLNK does not do that for you.

Yes, that is understood, I'm just wondering if I'm doing it correctly with a VMBR.

I'll display what I've got a bit later. 

I'm able to write an 8K file, I'll explain the issue I had with that too. 

Edited by GDMike
Link to comment
Share on other sites

Hmm ...I'm falling behind on this thread...:roll:

On 1/27/2021 at 7:07 PM, GDMike said:

I'm using>1000 for my buffer area Address

That sounds so... inalterable!:? I was hoping you'd be more open minded about this...;-)

On 1/27/2021 at 11:02 AM, HOME AUTOMATION said:

...use VDP RAM from 0 to 15119(18, 840 byte pages).:ponder:

Where feasible, I try to come up with ideas that don't lock-off valuable resources, thus leaving development options open(flexible).:grin:

On 1/27/2021 at 7:10 PM, GDMike said:

What does this look like? I think the PAB has a value for these save/load. But what do you mean VMBW/R? As in reading the screen? 

...to save?(from cpu to disk)...?

 

1. Set up PAB. Probably best to place it at the top of VDP RAM.LOAD
2. Save all or parts of VDP RAM to SAMS or TIPI(for restore after SAVE/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 to move TEXT pages, or entire SAMS pages, to your VDP RAM buffer.
5. Use DSRLNK to SAVE from your VDP RAM buffer to DISK(TIPI).
6. Restore VDP RAM from step 2.
7. Unblank the screen.

 

...to load?(from disk to cpu)...?

 

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 DSRLNK to LOAD from DISK(TIPI) to your VDP RAM buffer.
5. Use VMBR to move TEXT pages, or entire SAMS page data, from your VDP RAM buffer, back into to CPU RAM.
6. Restore VDP RAM from step 2.
7. Unblank screen.
 

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