Jump to content
IGNORED

PBI device driver loaded from disk instead of ROM?


Recommended Posts

I'm trying to wrap my head around one particular detail of the PBI specification. I understand every PBI device must supply a bare minimum of a vector table in ROM at $D800-$D81C, but it's optional to include the PBI device driver in the remainder of the 2K of ROM available. In the case of not including the device driver in ROM, I understand one could instead load from disk.

 

What I am trying to understand is what addresses one would put into the various dispatch sections of the vector table of the PBI device ROM, not knowing exactly where a device driver might be loaded in the future.

 

Can anyone shed some light on this?

 

I'm gearing up to work on a PBI project and I think it'll be a much faster testing & debug process to assemble code and load a driver over an SIO2USB link from my PC, rather than re-flash the ROM section of my FPGA each time I want to make a driver code change.

 

Link to comment
Share on other sites

I suspect you'd just have a stub handler in the Rom. Then have it check for something like a magic number in Ram that indicates that a valid handler has been loaded.

Maybe that intention is to aid developers or to help keep costs down. But given that a PBI compliant device needs that bare essential stuff that is in Rom? I suppose they could have used really small Roms in the day which might have only been a page or two in size.

 

Also, there's "relocatable handlers" - though I think the intention of those was to be downloaded from SIO devices into Ram, not sure if PBI devices can supply those and I don't think there's a compliant way to just adhoc load them from disk.

 

For testing purposes you could probably make good use of the Ram under the OS and Basic. It survives coldstarts so with a bit of creative coding you could have the PBI device check if one has been preloaded then either copy it to low Ram or just run it in place.

Edited by Rybags
Link to comment
Share on other sites

Another possible option is that I could map a small segment of RAM from the FPGA to the PBI ROM segment, just above the mandatory vector table. Then I could disk load the handler into that RAM and it would appear to operate like a regular PBI ROM once loaded. Seems like it would work as long as the PBI device was not accessed before the handler was loaded from disk.

Edited by TangentAudio
Link to comment
Share on other sites

I just found this little tidbit in an article that FJC pointed out...

 

"By the way, in the case signal EXTSEL\ is not held low, the internal RAM will be activated instead of the Math ROM, so you can load your driver software there without using a ROM. This should be done for testing purposes only, since this is not compatible with the PBI specification."

 

I don't believe this helps with initial device detection when the OS looks for the PBI device signatures, but might be a way to switch over from a mostly empty ROM to a soft handler in RAM without much work.

 

See this thread from today for a link, I reformatted the articles and posted as PDF.

http://atariage.com/forums/topic/263844-800xl-parallel-port-docsinfo/?view=getnewpost

Link to comment
Share on other sites

The internal RAM at $d800-$dfff may be unfortunately occupied. So this is definitely not a way to go.

 

Good to know, thanks. Is this likely true even on a freshly booted system? I'm just looking for a technique to use to write my device handler in a quicker way.. Pretty much any 2KB chunk I can find and guarantee is empty will probably be fine.

Link to comment
Share on other sites

Yes, a freshly booted SpartaDOS 3.x, SpartaDOS X, DOS XE, Real.DOS may occupy that memory. And even under other DOS-es that RAM may be occupied by some quite popular programs, such as Turbo BASIC XL.

 

Within the standard RAM area there is probably no 2k space which you could consider free enough. This memory should be supplied by the external PBI device. It can of course be RAM, it is fully free then for the purposes of that device.

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