Jump to content
IGNORED

Programming an eeprom in place?


Larry

Recommended Posts

I've long wondered if it would be possible to program an eeprom (or maybe even a flash rom) in the computer while it is running. In this scheme, it would work something like this. Boot the computer, then place the OS in ram-under-rom. Then one (or more) bytes at a time, point to the OS to eeprom and write those bytes to the eeprom. Naturally this would be a different OS, probably held in expanded ram. Conceptually, this seems like moving the OS from rom to ram, only in reverse. Any possibility this might work? Maybe this has been done already?

 

-Larry

 

 

Link to comment
Share on other sites

The OS ROM and BASIC don't have the write line connected, so there's already a need for some hardware modification. I think it would be safer to add a small circuit that would map the OS EEPROM into another window (say $8000-BFFF) and re-write it there; you could have the flasher app at $2000; the OS image at $4000-7FFF, the OS EEPROM at $8000-BFFF, and finally the RAM version of the OS from $C000-FFFF.

  • Like 1
Link to comment
Share on other sites

As an example you can't program the 32in1 from Atarimax as it requires an extra chip to allow flashing. The workaround is that people put the chip into an 8mbit flashcart then write the image.

 

Generally flashing is done at a block level, some magic locations get written to which tells the chip to enable flashing then it expects a block worth of bytes, blocks are various sizes - I think the Atarimax types are mainly 8K for the small ones and as much as 64K (?) for the big ones. Not sure if you write to a single location or to the actual location that's being changed.

 

The presence of the OS at the time - I would say probably not critical, if you did have an OS chip that could be flashed in place you'd probably need to run the code from Ram anyway as the bank to be flashed would have to be visible, obviously you'd not want it running code since the contents would be changing.

So the solution would be run from Ram with interrupts disabled, character set copied somewhere, no OS services being used. For a 16K Ram totally feasible.

 

To summarize for the current 32in1 though - 2 problems. Lack of flash controller as mentioned, plus the fact that the way it works, changing banks isn't totally straightforward. What happens is you send commands via PORTB bit 7 (same as for selecting SelfTest Rom) then wait for the PIC to respond and do it's stuff. Changing banks also means the PIC will reset the computer which could be problematic if the new image is either corrupted or not compatible with the current active OS.

  • Like 1
Link to comment
Share on other sites

The OS ROM and BASIC don't have the write line connected, so there's already a need for some hardware modification. I think it would be safer to add a small circuit that would map the OS EEPROM into another window (say $8000-BFFF) and re-write it there; you could have the flasher app at $2000; the OS image at $4000-7FFF, the OS EEPROM at $8000-BFFF, and finally the RAM version of the OS from $C000-FFFF.

 

Thanks! Yes, that's quite an "oops" not to have a write line!

Link to comment
Share on other sites

Really though, I don't see it as being critical for flashing purposes to have the EEPROM mapped to any special place or in fact for an OS needing to be present for the operation.

The bare bones resident type upgrade that would do what you want would have to incorporate the controller as per Atarimax carts or have an EEPROM chip that can be flashed without extra hardware, and presence of the write line. Given that you have to modify the machine or at least have an adaptor board to replace the OS, that's not really a big thing.

Link to comment
Share on other sites

Yes, lots of alternatives -- just trying to think of a way to "keep it simple" and get away from eproms. The 32-in-1 is PITA to update, IMO. Ultimate and Antonia are the simplest that I know of. Although I think there was someone who had a multi-OS adapter that was on a ribbon cable out the back of the computer. Don't remember any details, though.

 

-Larry

Link to comment
Share on other sites

I also forgot about the Internal MyIDE. It comes pretty close to meeting the criteria, and it has two OS -- one flashable to whatever you choose, and the XL/XE "failsafe" OS that is not normally flashable. There is one issue, however, even if you don't want to use the MyIDE portion -- the IDE+2 has an issue co-existing with the MyIDE. So a couple more lines must be disconnected (or switches added) if you want to use just the flashable OS portion.

 

And it's also a reasonably expensive solution to the issue.

 

-Larry

Link to comment
Share on other sites

  • 2 weeks later...

What you want is a system with an internal, flashable OS, right? Just one OS at a time?

 

Then you load a new OS into $4000-$7FFF (for example) and write it out to the flash chip. Then boot from that?

 

How about a cartridge? You load the cart with your target OS, insert the cart, boot, and the internal OS is automagically re-written. Switch on the cart determines whether you read a new OS into the cart or write a new OS into your computer. You could mount one of those teeny thumbwheel switches and have 16 OS versions in the cart, switch selectable.

 

You'll need hardware in your computer, though. And, a custom cart. Not cheap, but you only need one cart for multiple systems.

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