Jump to content
IGNORED

Atari 800 Right BASIC Cartridge


Recommended Posts

Posted (edited)

Wednesday I received some more boards and with them is a prototype of a right cartridge board for an 800.  Something that bugged me is that my Atari 800 has that empty right cartridge slot.  So, I figured I'd make up a right-hand BASIC cartridge and install Altirra BASIC on it.  🙂

 

Of course, a right-hand cartridge installs at $8000 and BASIC runs at $A000.  So, I had to make up a banked cartridge.  $D5Ax looked like a safe place to put some banking logic.  I was able to put 4 banks of 8k on the chip without a problem.  There is also the ability to have another set of 4 banks just because. 

 

To get this to work, the right cartridge has to be executed.  The first piece of code copies a second piece of code to the main memory.  The second piece of code checks for an existing cartridge, checks to see if the select key is down, (if so) changes the cartridge's bank to the BASIC bank, copies BASIC to $A000, turns off the cartridge, changes RAMTOP, and exits.  I installed Altirra BASIC and finally got it working.   🙂

 

A few issues....

1.  This doesn't work right with OS-A for some reason.  Early testing shows it works with OS-B.

2.  When running BASIC, I have to set RAMTOP at $9F, as opposed to $A0, for some reason.  I am wondering if it is related to that "RAM Dragon" problem.  This results in a loss of 256 bytes....which results in some very large BASIC programs not running.

3.  DOS 2.5 doesn't detect the cartridge, so you have to exit by the "Run At Address" function and using A000.

4.  BASIC only loads on a cold-start.  I suppose having a modified OS would be helpful.

 

If I am running BASIC from a left cartridge, it's fine.

 

Right now, I have it programmed to load BASIC if the Select key is down.  I didn't make it the Option key for compatibility reasons, such as with Omnimon.

 

The first generation board has a place for an enable switch, too, but it doesn't work because I screwed up the RD4 connection.  Here's a rendering of the second generation board.

 

990571971_rightcartv2.thumb.png.89d95d6cc7ad03bb51f7042deefbb30b.png

 

I put solder jumpers on the board so SW1 and another jumper (on the opposite side) are both optional.  Also, the chip is shown on the board as an SST32SF0x0 because any of the 3 sizes of PLCC-32 chips could be used.  There are solder jumpers on the back side to ground out the right pins of the larger chips.  I started doing this because of the chip shortage.

 

 

Edited by reifsnyderb
  • Like 2
Link to comment
Share on other sites

Nice.

The problem that exists with both A and B (I think XL fixed it properly) is that the clear screen and S: init will sometimes blow out beyond RAMTOP.

Normally it's not an issue since you're either hitting ROM or empty space at $C000.

 

The problem with using a lower value is that the 7680 byte graphics modes will probably not work properly unless topped out at a 4K boundary.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Rybags said:

I think XL fixed it properly

I think the problem is with text mode scrolling. And I'm not sure if it was ever fixed, because I'm quite sure we (*) had to make this RAMTOP-5 memory reservation trick when you needed 4 pages for user defined font.
(*) we = XL/XE users of slavic language with many accented characters not included in intl. charset.

  • Like 1
Link to comment
Share on other sites

Mapping the Atari says this (I assume this is what you're referring to, since I didn't take the time to read the first post -- yet).

 

If you move RAMTOP to reserve memory, always issue a
GRAPHICS command (even issuing one to the same GRAPHICS
mode you are in will work) immediately so that the display list
and data are moved beneath the new RAMTOP. 
You should note that a GRAPHICS command and a CLEAR
command (or PRINT CHR$ (125) ) actually clear the first 64 bytes
above RAMTOP (see location 88; $58 for further discussion). 
Scrolling the text window of a GRAPHICS mode clears up to 800 
($320) bytes above RAMTOP (the text window scroll actually
scrolls an entire GR.0 screen-worth of data, so the unseen 20
lines * 40 bytes equals 800 bytes). PM graphics may be safe 
(unless you scroll the text window) since the first 384 or 768 bytes
(double or single line resolution, respectively) are unused. 
However, you should take both of these effects into account when
writing your programs.

 

I never adjusted RAMTOP; I always just reserved memory the appropriate amount below screen memory.

 

  • Like 1
Link to comment
Share on other sites

The advantage of RAMTOP is that your starting point should be a guaranteed 4K boundary which makes PMs easier.

 

Actually it's best to refer to RAMSIZ ($2E4 / 740) then adjust RAMTOP based on that otherwise you can walk it backwards by recursive runs of a program without pressing Reset.

 

It would be interesting to see if this bug is actually fixed in later OS versions.  But regardless you need to consider it for compatibility sake.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Rybags said:

The advantage of RAMTOP is that your starting point should be a guaranteed 4K boundary which makes PMs easier.

 

Actually it's best to refer to RAMSIZ ($2E4 / 740) then adjust RAMTOP based on that otherwise you can walk it backwards by recursive runs of a program without pressing Reset.

 

It would be interesting to see if this bug is actually fixed in later OS versions.  But regardless you need to consider it for compatibility sake.

I forgot about RAMSIZ and should adjust that as well.  I'll look into whether there was a bug fix or not as I am going to run a custom OS on this machine eventually anyhow.

 

 

 

Link to comment
Share on other sites

A quick investigation using breakpoints detecting writes - just setting RAMTOP to $80 then do GR. 0 in Basic - unable to create any problem using the XL OS Rev 2.

 

With OS-B, it appears to wipe 64 bytes extra on clear-screen and 96 when clearing a text window.

Scrollng the text window doesn't seem to have a problem but performing an Insert Line operation affects at least 768 bytes from RAMTOP onwards.

  • Like 2
Link to comment
Share on other sites

Posted (edited)
22 minutes ago, Rybags said:

A quick investigation using breakpoints detecting writes - just setting RAMTOP to $80 then do GR. 0 in Basic - unable to create any problem using the XL OS Rev 2.

 

With OS-B, it appears to wipe 64 bytes extra on clear-screen and 96 when clearing a text window.

Scrollng the text window doesn't seem to have a problem but performing an Insert Line operation affects at least 768 bytes from RAMTOP onwards.

Thanks!  It's good to hear it's been fixed somewhere.  I'll see if I can track down what was changed and will check to see if the fix is in the OS I am planning to use.

 

Edit to add: 

 

I found this....

The fix is supposed to be in OS 5.  OS 5 used a lot of code from OSB.  

https://forums.atariage.com/topic/316816-atari-80052kb-new-osb-bug/

(Page 1 of the above thread on February 10, 2021.)

 

This is good news as I am modifying OS 5 to run on an 800 anyhow.   🙂

 

 

Edited by reifsnyderb
Link to comment
Share on other sites

Posted (edited)
11 minutes ago, Rybags said:

For your usage case though, the XL OS is of little use.  But if the OS 5 you mention solves your problem and is 800 compatible then great.

OS 5 is an XL OS that Atari installed a lot of 800 code in.  (They also ripped out a lot of the great XL stuff and replaced it with some sort of help system.)  I've got a version I've been modifying (i.e.  the help system is gone) that is almost ready to install on an 800.  It does need a personality card that supports OS ROM in the $Cxxx region, though.  I can do that with the RAMROM 2022 card.   🙂

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

It appears the fix in OS R 5 works.   🙂

 

I installed a heavily modified version of OS R 5 (I'll post a separate thread on this as it's an XL OS that I modified to run in an 800.) in the 800, the right BASIC cartridge, and a Mega 4, and it's working nicely.  When booting with the Select key held down, Altirra BASIC loads, from the right cart, and I have the usual 37,905 bytes of memory.  Between Fast Math F+, for the floating point math pack, and Altirra BASIC, it's probably about as fast as it's going to get with an interpreted language.

 

Here's a pic of the cards:

 

pic.thumb.jpg.e07bb3ecdae9b5f659e22087c97ae88d.jpg

 

 

  • Like 7
Link to comment
Share on other sites

  • 2 weeks later...

I'll order the next version of the right cartridge soon.  The problem with the Enable/Disable switch should be fixed.  Also, I decided to change the banking such that 128k is now accessible.  It would be nice to have a menu and some boot options for the cartridge.  I can imagine this cartridge not only having Altirra BASIC but Atari BASIC R. C, some diagnostics, and a bunch of other packages.

 

1745529954_rightcartv3.thumb.jpg.b9c3c19fcffb4686de806480415b4490.jpg

  • Like 4
Link to comment
Share on other sites

in the Atari world, if the signal is present on a connector, it's usually a good idea to expose it allowing for use on whatever device that plugs into it. Updates and upgrades through firmware/add ons usually lead to it being put to good use in the future. Always adding never really taking away.

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

3 hours ago, reifsnyderb said:

I had a request to add a connection to Phi2.  So, I figured somebody may find RASTime and R/W useful and added them as well.

 

1022474285_rightcartv3a.thumb.jpg.22bdf3fb8c1c7067555dd9c750173d75.jpg

Very nice!!

 

That means we can now afford the luxury of sync'ing / timing any left-cart application externally, through right-port's [Phi-2] or [RAStime], as needed, and without touching the 800's Mobo !!

 

Kudos!

👍💪

  • Like 2
Link to comment
Share on other sites

If you are not using any DRAM cards, you could cut the RASTime trace on the personality card.  (Pin "V", opposite pin 18.)  Then, after soldering a jumper between Phi2 and RASTime, on this right cartridge, you would have Phi2 at the left cartridge.

Link to comment
Share on other sites

36 minutes ago, Rybags said:

Is it not present?  I get different info depending on who's sheets I look at.

I am guessing by "it" you are referring to Phi2?  Phi2 is not available on the left cartridge on a 400/800.  Buffered Phi2 is available on the "left" cartridge of an XL/XE.  For some strange reason, on a 400/800 Atari sent RASTime to the left cartridge slot.

Link to comment
Share on other sites

3 minutes ago, reifsnyderb said:

I am guessing by "it" you are referring to Phi2?  Phi2 is not available on the left cartridge on a 400/800.  Buffered Phi2 is available on the "left" cartridge of an XL/XE.  For some strange reason, on a 400/800 Atari sent RASTime to the left cartridge slot.

It’s been 3-1/2 years since I installed mine, but I believe one of thesteps in the Incognito installation process is to cut a trace and add Phi2 to the Left slot. (NOTE: I’ve slept since then and I might be mis-remembering. I also need more coffee …:) ). 

Link to comment
Share on other sites

4 minutes ago, DrVenkman said:

It’s been 3-1/2 years since I installed mine, but I believe one of thesteps in the Incognito installation process is to cut a trace and add Phi2 to the Left slot. (NOTE: I’ve slept since then and I might be mis-remembering. I also need more coffee …:) ). 

That makes sense to add Phi2 to the left slot.  On the next version of my RAMROM board, I am putting a jumper to select Phi2 output or RASTime output.

  • Like 1
Link to comment
Share on other sites

IIRC, lack of Phi2 was also the reason that the MyIDE-II cartridge would not work with an 800.

 

I presume from your last post (jumper) that the right cart Basic would not have to be active in order to have Phi2 in the left cartridge slot. (?) (So the Basic could be turned off.)

 

I'm looking for a way to use the MyIDE-II cart with an 800 without tearing the 800 apart.  There was a fair amount of interest in using the MyIDE-II with an 800, and I'm sure several folks were put off by having to go inside their 800.

 

 

Link to comment
Share on other sites

6 minutes ago, Larry said:

IIRC, lack of Phi2 was also the reason that the MyIDE-II cartridge would not work with an 800.

 

I presume from your last post (jumper) that the right cart Basic would not have to be active in order to have Phi2 in the left cartridge slot. (?) (So the Basic could be turned off.)

 

I'm looking for a way to use the MyIDE-II cart with an 800 without tearing my 800 apart.

 

 

The jumpers are completely separate from the function of this cartridge.  If you would disconnect the RASTime trace, at your personality card, and use this cartridge (with Phi2 and RASTime jumpered by a wire) you would have Phi2 going to the left cartridge slot.  Doing this would also send Phi2 to the RASTime pin of the RAM slots as well.  If you are using SRAM cards, however, the RASTime pin is not connected as it's not needed.

 

I have a place for a switch on this cartridge as well so the cartridge can be disabled without removing it from the slot.  (I screwed up the connection on the first version of this card.)  Also, I have my cartridge programmed so that I have to boot with the Select key down to load BASIC.  If the Select key isn't down, the cartridge turns itself off then exits.

 

 

 

 

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