Jump to content
retroclouds

TiVi Development Thread

Recommended Posts

11 minutes ago, RXB said:

If you change a single 4K page you could do the same thing like I do with RXB that loads 540K in my game IN THE DARK.

All of it sits at lower 8K >2000 to >3FFF so I swap out the 2 pages of 4K there to use 540K for the game.

Just to not have a problem with Assembly in my game the Assembly is at >D000 and thus this does not interfere with the XB at >A000 to >C9F8

Of course I do not use CALL LINK but instead use RXB CALL EXECUTE(ADDRESS) instead as it needs no name to be found.

But do you get the idea?

 

 

Yes, I see where you are going when using SAMS. That's the approach I will be following for the lines index (mapping line numbers to editor buffer) as well. The index is at >3000 - >3fff. In this 4K area I store the pointers for the 2048 lines, by swapping this to the next SAMS page I get access to the next 2048 lines and so on. So, if you want to for example jump to line 9600 in the file you are editing, it's just a matter of deriving the correct SAMS pages for index and editor buffer.

 

Do note that I will have a different memory map depending on when using SAMS or not. For example, the editor buffer will be RLE encoded when only 32K  memory expansion is available. Don't see going through the overhead of doing RLE encoding/decoding if I have many SAMS pages at my disposal. 

 

So, coming back what you mentioned. It would be possible when using SAMS I don't use the whole >a000 - >ffff range as usual, but only a subset of that. But again, I'm quite sure that as long as everything is properly saved/restored upon program entry and exit, things should work as planned.

 

While we're at it; are there many other critical memory areas to stay clear of when using extended basic? Has been a while since I looked at Extended Basic memory map. 

 

 

 

Share this post


Link to post
Share on other sites

Just the normal pointers in Scratch Pad you know about and VDP pointers you delete if you make a copy and put back.

This is what I do in RXB to load screens, most of the VDP pointers are just copies but some are very important, like flags.

 

IN THE DARK game in RXB on SAMS I use 768 bytes to write to screen and save 768 bytes of screen to SAMS

when the 768 bytes gets within upper of lower 8K limit I move the >2000 to >2FFF to >3000 to >3FFF and load lower page at >2000 to >2FFF

same happens when I get to upper 8K limit and move >3000 to >3FFF to >2000 to >2FFF and load a new page at >3000 to >3FFF

 

It looks like a box moving in a larger box and that small box is the screen. You could use the same trick for Text,

the cool thing is this leaves you 24K to play with for programming space. Also most of VDP too.

Share this post


Link to post
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.

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