Jump to content
IGNORED

Who has working source code for accessing the SaveKey on the 7800?


CPUWIZ

Recommended Posts

CPUWIZ and I ran a quick test on the side. The RIOT registers involved with SaveKey are common to both the 2600 and 7800, so the same code works for both.

 

In case anyone else is interested, I'm attaching a few files for Savekey development...

 

 

1. The AtariVox docs. (the SaveKey is functionality identical to the AtariVox, without the Vox) The documentation is quite good, and contains sample code and other needed info.

 

AtariVoxDevelopment.pdf

 

 

 

2. i2c driver code you need for reading and writing to the eeprom

 

i2c7800.inc

 

 

Even though its directed at bB, there's some useful general info in this thread.

 

Its worth mentioning here that reading and writing from SaveKey is very slow. Plan to split up writes larger than a byte or two across frames if you need to keep the display updated.

 

Also, once you write a number of bytes and have issued a "jsr i2c_stopwrite", you need to wait a while (a bit less than a frame, so waiting a frame works) before the eeprom is ready for more business.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

It seems the original i2c.inc from Alex Herbert actually needed some tweaks to run properly on the 7800. It often jams up after reading or writing a byte, and apparently it boils down to the speed that the driver works at. It seems that the 6502 running the driver at 1.79MHz instead of 1.19Mhz is bit-banging too fast for the eeprom and/or wiring.

 

I added a NOP to each bit write routine in i2c.inc to slow things down, and the situation improved greatly, though I still had problem with connecting to an AtariVox over one of my extension cables, but no problems with another. (extensions are required for using the AtariVox with a 7800) Throwing in another NOP made the driver completely robust, no matter which cable was used.

 

I've modified my post above to include the updated driver, and renamed the file to avoid confusion with the 2600 driver. If anyone makes improvements, or has observations, please share them here.

 

If anyone is trying to use the savekey/atarivox-eeprom on the A8, the same problem likely exists there too, since they also run at 1.79MHz.

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