Oops, 10 million is a bit wrong...
Should be something as:

> LD DE,%aabbbbbbbbbbbbbb
So, 14 bits for block selection = 16384 blocks
16384*16k = 262144k = 256 Mb :)

When all 16 bits are use, you have 1 Gb adressing, but have to use another
byte to select the memory page.

Or you want to only use page b000-efff for swapping.


What ya think?

> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Versteeg, Benjamin
> Verzonden: dinsdag 29 juni 2004 15:15
> Aan: '[EMAIL PROTECTED]'
> Onderwerp: RE: A poor mans CF interface :-)
> 
> 
> Maybe there is some rom-space left to add some functions as "swapping"
> memory pages from a defined size (e.g. 16k) from-and-to 
> compact flash using
> the new interface.
> 
> LD DE,%aabbbbbb
> CALL SWAPCF
> 
> aa = select memory page:
> 00 - 0000-3fff
> 01 - 4000-7fff
> 10 - 8000-afff
> 11 - b000-efff
> 
> bb = block on disk (maximum of 10 million logical blocks)
> 
> Use a fixed 'block' for the space to swap to on disk, e.g. block 0.
> 
> So SWAPCF does:
>   SAVE MEMORY PAGE aa TO BLOCK 0
>   LOAD BLOCK bbbbbb TO MEMORY PAGE aa
> 
> 
> Just an idea...
> 
> Rom 4.0 ?
> 
> 
> Ben
> 
> > -----Oorspronkelijk bericht-----
> > Van: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Edwin Blink
> > Verzonden: dinsdag 29 juni 2004 12:41
> > Aan: [EMAIL PROTECTED]
> > Onderwerp: Re: A poor mans CF interface :-)
> > 
> > 
> > 
> > From: "Stuart Brady" <[EMAIL PROTECTED]>
> > 
> > > This looks great! I'm especially interested in this, since 
> > I only have a
> > > single 1 meg card. I have a few questions, though:
> > 
> > > Is this just as fast as the SAM's internal memory? (I don't 
> > know whether
> > > or not the 1 meg card is slower.) Also, how expensive is paging?
> > 
> > The CF will not work just like RAM instead it works just 
> like a 8-bit
> > harddisk
> > by using memory mapped I/O. Every 512 byte sector must be 
> > selected first.
> > But when selected and available it will be as fast as RAM an 
> > can be loaded
> > with a single LDIR
> > instruction or in any other way you like. It's also possible 
> > to execute code
> > from it directly.
> >  But only in a linair way.
> > 
> > > (I will need to do paging every few instructions, since I'm mainly
> > > interested in using CF as extra memory, rather than as 
> disk space.)
> > 
> > I hope your not to disapointed now.
> > 
> > 
> > Edwin
> > 
> 
> 
> ----
> 
> This message is confidential and may be privileged. Any 
> review, retransmission, dissemination or other use of, or 
> taking any action with reference to this information by 
> persons other than the intended recipient is prohibited. If 
> you received this message in error, please notify the sender 
> by reply e-mail and delete this message from all computers. 
> Please note that e-mails are susceptible to change. The 
> sender will not accept liability for the improper or 
> incomplete transmission of the information contained in this message.
> 


----

This message is confidential and may be privileged. Any review, retransmission, 
dissemination or other use of, or taking any action with reference to this information 
by persons other than the intended recipient is prohibited. If you received this 
message in error, please notify the sender by reply e-mail and delete this message 
from all computers. Please note that e-mails are susceptible to change. The sender 
will not accept liability for the improper or incomplete transmission of the 
information contained in this message.

Reply via email to