Shop OBEX P1 Docs P2 Docs Learn Events
So, how close is a Propeller Demo Board — Parallax Forums

So, how close is a Propeller Demo Board

cbmeekscbmeeks Posts: 634
edited 2006-05-23 21:29 in Propeller 1
to a single-board computer? lol

Seriously, would this work:

1 cog for video
1 cog for audio
1 cog for keyboard/mouse
1 cog for OS (C=64 style)
1 cog for storage device (via breadboard)

cbmeeks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Metroid Classic:
http://metroidclassic.com

Metroid Forums:
http://eblarg.com/bbs/mc

=========
DMCA Sucks
RIAA Sucks

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-16 21:21
    It's part of Chip's vision to have a self contained Propeller development system. While that wasn't accomplished this go around (IDE is not on the propeller itself), an end system as you describe is definitely do'able. However it remains to be seen how much memory is going to be left over for applications, you can page a portion of the memory in and out from the storage device, but you will need a permanent "cordoned off" space for your video buffer etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-17 08:27
    Seems that the SDcard is really the mass storage of choice. With an I2C or SPI interface, the system would be quite expandible and you would have upto to 4 gigabytes of storage available. Certainly not the old days of floppy disks and an AppleIIe.

    Some regions of the world are struggling because of their linguistic heritage not being very adaptible to computer encoding. Sanscrit, Arabic, Chinese, non-written languages.

    I really miss good ol' Wordstar as ASCII is compact [noparse][[/noparse]compared to Unicode] and doesn't have to fuss with GUI. It was highly ergonomic in the editing mode and I suspect the code was quite compact too. For much of the world, the alphanumeric languages, it can provide nearly all that is needed to comprehending computing. Of course, character based languages and more esoteric scripts are left to catch up or learn Western languages and keyboards.

    So, I suspect much hangs on the question of revisiting an exended 256 byte ASCII and a Wordstar-like program for documents or supporting fully modern UNICODE with world languages and mulitple keyboards. Spreadsheets, databases, and IDEs can simply follow whatever.

    The obvious solution is to just repete the evoloutionary steps of the early days of personal computing, but set aside all the deadends and distractions.

    It would make the Propeller a superior teaching machine for younger learners as it would be able to re-visit all the problems of file management, sorting and searching, and so much more. I recall the early Dr. Dobbs Journal [noparse][[/noparse]and Ortidontia], while it really was covering this material there were many, many blind alleys that were presented by very compelling writers.

    Chip's Propeller will do wonderfully to blend the useful and need-to-know principles from the earlier days with the innovative, creative use of less silicon and newer tools to show that there are many ways to achieve the same thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • rokickirokicki Posts: 1,000
    edited 2006-05-18 23:19
    If Parallax plans to release a newer version of the demo board, I think they should consider adding a SecureDigital slot
    to the board, assuming the cost of the socket is sufficiently low. Having that much nonvolatile mass-storage on the demo
    board can enhance its use as a prototyping system significantly!
  • pnppnp Posts: 3
    edited 2006-05-19 02:18
    it's interesting that the SD card issue came up. I'm somewhat of a neophyte when it comes to Parallax products, but to prototyping or design. I was directed by a post in one of the other forums to a website called sparkfun.com They have sd cardslots that go for less than 3 bucks. I can only speak for myself, but for 3 bucks (yes plus development costs, I'm realistic) I'm good with that.

    The other post piqued my interest in small persistant storage devices which is a requirement for a stamp based controller that I am working on. the same website has a SD Card Breakout Borad and a link to a SANDISK document that describes the porotcol used to access SD memory Devices.

    Additionally, there is an IBUTTON device (1 wire) that provides 64kbits of ram in a button size package.

    pnp

    p.s. my Propstick is on backorder. I have no idea when i will get it. Parallax ought to note this fact on their website.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-19 09:04
    The physical holder for the SD card isn't the main issue.

    The problem is all the support overhead of a FAT [noparse][[/noparse]File Allocation Table] and the fact that Mr. Bill Gates seems to claim part of this to be owned by him [noparse][[/noparse]longer file names]. Apparently the '8 character - dot - 3 character' format is in the public domain as it was used by at least CPM [noparse][[/noparse]another disk operating system], other companies, and maybe even the early Apple II's.

    uALFAT has provided a great little 3.3volt board that handles all this and can interface via an RS-232 format, an SPI format, or an I2C format. In some ways it is like the hard disk requiring a 'hard disk controller'. These can even be combined to have two in an IDE Master/Slave relationship.

    Having the controller outboard is a bit less compact, but it does free the Propeller to be dedicated to more important real time tasks. Having a real time clock that is outboard is another appealing add-on that just disapates the Propeller's resources.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-05-19 13:56
    Ummm, Just for the record...
    You DON"T NEED a PC complient file system (FAT, NTFS or other!). In fact, all you really need is access to the raw sectors/ bytes. From there, a simple command set, and simplified sector map and you have mass storage. For up/downloading, it would just have to be part of the PROGRAM using a serial connection and a simple program on the Host. Heck, even the USB2SER works well. The host pc can deal with the FAT and it's overhead. THis is quite simple and very "dooable". In fact, I already started working on the FS commands (I'm calling it PFS Propeller File System), and it will reconize HUGE drives. Again, just to reiterate; the media used won't be directly readable by any other system (excluding another PFS). With 1" glass drives at 18Gig for less then $180 on a USB jack,things like this is where things are heading. It's just a matter of selecting the media interface (USB, SD, CF, IDE, SATA, ect.) and coding the low level drivers that give raw access. Heck, give it a real short time and it will be here. If not by me (most likely not, I don't get that much dev time), someone else will be there. And, just for the sake of adding it; If you code for the USB interface, that includes over 80% of the SD, CF interfaces as well. I havent even gotten the details on the SATA specs yet, so I don't know if the propeller can handle that interface yet, which is the only reason why I'v included in this list.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-19 14:18
    You may want to give us a description of the PFS, so that we can not only check it for errors and functionality, but also so that those of us who have the means, can make our own drivers for various other machines.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • rokickirokicki Posts: 1,000
    edited 2006-05-19 14:38
    Just as a heads-up: I'm quite far along with my SD card reader for the Propeller. I've got the card talking back to
    me and am working on the FAT16 interface. Truly, supporting basic FAT16 root directory 8.3 read/write is not hard
    at all, not much overhead. I'll probably have something to post by Monday.
  • mcstarmcstar Posts: 144
    edited 2006-05-19 14:42
    Paul Baker said...
    It's part of Chip's vision to have a self contained Propeller development system. While that wasn't accomplished this go around (IDE is not on the propeller itself), an end system as you describe is definitely do'able. However it remains to be seen how much memory is going to be left over for applications, you can page a portion of the memory in and out from the storage device, but you will need a permanent "cordoned off" space for your video buffer etc.

    I was recently thinking about the possibility of writing a simple video driver for an old ISA video card.· This would give us access to many megs of video buffer space.· I haven't written any low level video card drivers though. Does anyone know if this would be feasible and if we'd gain any benefits?· I suppose that what it would come·down to is whether a low level video card driver could be done in less·RAM than a video buffer.· Any thoughts?· My thought is that even if sizeof(Videobuffer) == sizeof(videoCardDriver) code, that we'd still be better off since you'd have all that video Ram available to the app for read/write access.· Does anyone know of a single chip that allows IC2 or other serial to control an ISA buss?· T
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-19 15:07
    Well, I am both surprised and pleased to see it is possible. At this point it would be too steep of a learning curve for me to code, but I'll be following from the side lines. From what I can see, it does take several more I/O pins though. ALFAT's RS-232 is 4 pins and the SPI is 6 or so.

    What I really do NOT like about the ALFAT is that there is not any true CRC of the data packets, only a simple Checksum. At some point, I suspect that would become an issue. After all, transfers of data might become huge as this evolves.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • pnppnp Posts: 3
    edited 2006-05-19 17:38
    I keep seeing a reference to the FAT file system. For my purposes, I just need something to store and retreive data. IF i need it to be read by a pc or other OS, i'll either use existing tools that come with the os or create an propeller object to format the data and then spit it out a USB or serial port.

    I'm new into this sd card stuff but i get the feeling that there really isn't a need for a FAT16 type of driver code. I'm getting the notion that the driver on the OS formats the data to comply with FAt16 structures. So maybe this concern about the size of code and the RTU fees are a mute point.

    of course i just may be having a Blonde moment

    smile.gif

    pnp
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-19 17:44
    The FAT file system is only necessary if you want the data to be readable by anything other than devices you create the code for. The MMC or SD card just looks like a numbered series of blocks of raw data. The file system allows you to name "files", keep track of where they are on the device, and keep track of space not allocated to "files".
  • rokickirokicki Posts: 1,000
    edited 2006-05-19 17:46
    My argument is, even if you need read/write, you need *some* way to track used sectors and the like, and FAT16 is pretty close to the simplest
    possible way to do this (if you ignore long file names and subdirectories). It's not *the* simplest, but consider even for the single-file-only case
    you still need to store the length of the file somewhere. Note that we still rely on a different OS to initially format the card for us; we don't
    need to write a fully legal FAT16 volume header and the like, we only need comply with what's already there.

    Look at the code I have on Monday and I'll let you judge if it's overly long or complex for what you need.

    There's a *lot* of utility to be had by using a standard file system.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-05-19 18:16
    Gadgetman:
    rokicki, your dead right on the requirements for needing a FAT system. And with a simple FAT that doens't deal with sub directories and long filenames, it will take care of 99% of every ones needs. Me, I'm still waiting on $$$ for some stuff, and more dev time for what I was calling the PFS. Right now, I have no low level drivers in place, just the upper level FR (File Read), FW (File write), FI (File Info), FD (File Delete) and a FP (File Pack) commands in pesdo code. Again, this is all outside of any PC file system, and is intended to be a object with no asm code, and to export or inport data from the propeller (up or download), a serial connection to a pc and a program on the pc is needed. IF you have a FAT16, will, that really superseeds what I'm working on. I'm very interested in seeing it. Even with a max of 512 entries in the rood directory (as imposed by all the FAT systems), its better then what I was woking on, only because you don't need another program and a serial connection to ul/dl data / files to it.
    Yes, I'm very interested in seeing what you have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-19 21:28
    There are several 'small' and 'simple' filesystems around that it might be a good idea to look at...

    There's the one used on the Psion Organiser II datapaks which is interesting as it is made specifically for EPROMs(8/16/32KB or larger, the types that needs to be erased by UV-light)

    And then there's the 1-Wire file-structure which is made to deal with even smaller storage-spaces.

    What they, and FAT, have in common, though, is that none of them are really suited for small files on LARGE media. And lets face it, most files handled by the Propeller(when used as a general-purpose computer) will be small files.

    What we need is a FS that can be scaled from units as small as 8KB(64Kbit iButton), 32/64KB EEPROM/FRAMs up to Multi-megaByte SD-cards.
    Defining a decent FS and formulating the IO-functions(Create/Open/Read/Write/Close/Delete file) is the difficult part. As soon as that is done, the low-level functions will tend to fall into place almost by themselves.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-05-20 04:43
    Good call Gadgetman.
    Well, the litations of any FS are imposed by the file containing the maping.
    Microsoft tried to do the scaling thing starting with FAT32 and with NTFS.
    The main issue is, altimatly, how the information about the data on the storage unit is its self stored.
    Predefined Size mapings (like microsoft does) could do it.
    Editable predefined size mapings would make it even better.
    My idea was make a predefined File Alloc File (ie, a file with a fixed format),
    and make the FS determin by the length of the file how it's stored. Along the lines of RLE, only with editable prams.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-20 14:11
    OTOH, it would be nice to have the SDcard be directly useful on a PC.

    Let's say you have a data logger that fills the SDcard, you swap it with an empty card, and then you want to use Excel to reform and analyse the data which you have gotten.

    Further, it would be nice to plug in via my USB read and note that this card was used by my Propeller system (because I would recognize the file name) rather than thinking it was empty because no file was recognized. And, it would be nice to be able to prepare and transfer large blocks of data to the Propeller via the SDcard for use in video, audio, or machine control files.

    Historically, the original 8" floppy disks were proprietarily formated and there were dozens of different formats. The computer companies then charged a mere $25 to $50 USD per floppy to the customer. You can do it that way and charge for your card reader software and for the conversion. But, I suspect everyone loves the more generic, universalized approach.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • JT CookJT Cook Posts: 487
    edited 2006-05-20 16:24
    I have been working with video routines with the Propeller chip and you would need more than one Cog for video. You need one for the TV driver, and at least one for video rendering if not more. To get something going with sprites and scrolling background you may need 3 cogs for the video rendering and 1 for the TV driver which would be 4. Also don't forget you have SPIN interpreter COG which is always there.
    cbmeeks said...
    to a single-board computer? lol

    Seriously, would this work:

    1 cog for video
    1 cog for audio
    1 cog for keyboard/mouse
    1 cog for OS (C=64 style)
    1 cog for storage device (via breadboard)

    cbmeeks

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-20 16:58
    I suspect you can easily add on extra video options until you run out of cogs.

    Parallax developed SPIN as an OOP because that is really what allows large systems to be developed in pieces and in parallel by many people. For a start, I suspect we should really be trying to find the Objects that must work together rather than counting Cogs. At some point, an Object may be written in a more compact form that uses one less Cog.

    My personal first goal is a full duplex RS-232/RS-485 Monitor and Keyboard to be used with BasicStamps. Since it would be all ASCII, why would I immediately need sprites and such? I doubt that I even need the Mouse.

    Another easy and useful application may be an Advertizing Display that runs through a series of attention getting images and then an informative presentation. A mouse might be useful for the viewer to work through menus.

    If you really want to make a video game machine, Andre LaMothe is doing that on a huge scale with the Propeller and it will be coming out a few months from now.

    If you want a graphic video drafting terminal, I wonder how you are going to encode and save the images. After all, I can easily spend a few days on a technical drawing. But without the means to save my work, I have little interest in beginning.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 5/21/2006 7:18:22 AM GMT
  • John CoutureJohn Couture Posts: 370
    edited 2006-05-20 18:37
    Kramer,

    you might want to check out www.sddatalogger.com which is manufactured by Bean (of SX fame)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-20 18:44
    Here's my thoughts on the whole file system issue. Alot of the file systems out there were designed to be a main file system carrying an OS, and support major use and as such enable fragmentation. I haven't looked at psion's file system so I dont know where it fits in.

    I think the simplest FS to implement and use would be a file system which does not support fragmentation. This allows the complete elimination of a FAT. Instead you maintain a file table and use it more like a heap. The data is allocated from the bottom address, and the file table is created from the top address. Each file entry is a fixed width and is organized in the exact order as it appears in the data allocation. IOW the first file entry is at MaxAddress - size(file record). The data for the file is located at address 0·to size(file0), the second file entry is located at MaxAddress - 2*size(file record). And the data for the file is located size(file0+1) to size(file0 + file1).

    Each file record would contain the name of the file, the start address, the end address, and status bits (including a delete bit). Every file is continously allocated and in the exact order as dictated by the locaion in the file table. The disk become full when the allocated space exceeds the bottom address of the file table which is determinable during the file allocation process. Whenever a file is deleted, the bit in the file record is marked, and that is all thats done. Whenever it is determined that there is not enough space to allocate for a new file a garbage collection routine is entered, this goes through searching for deleted files, and accordian collapses both the file records and the data portion. Append mode makes things a little complicated, but heres how that is done: if the file exists at the end of the allocated data (ie it is the last file created), it simply updates the file record and expands the file as needed. If the file is not the last file, it copies the existing file into a new file located at the end of the allocated data, creates a new file record at the end of the file records, then proceeds as above. The old file's record has the delete bit marked, to be reclaimed during a garbage collection process.

    You would likely want to keep the smallest allocatable unit to be the block size of the device, but you could break it down to the byte level if you really wanted to, it would make some operations such as garbage collection a little more time consuming, but not·impossible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10

    Post Edited (Paul Baker) : 5/20/2006 6:48:30 PM GMT
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-20 21:02
    With 'top' and 'bottom' which one would be 0000h on an EEPROM?

    If you add a block at the beginning, chich contains a FS-identifier(in case another FS is also created), unit name(label) and block/total -size information, you should have a good one.

    Byte-level allocation tends to get 'messy'. I believe that the smallest practical allocation-unit in an EEPROM is 16Bytes(it would be nice if filename and attributes also fit in 16Bytes).
    As that is a nibble-size it might be easier to work with.
    But 32 or 64Bytes is probably a more realistic size?

    The Psion FS is made to access both Applications and Data, stored on a EPROM, which is made so it is very easy to read sequentially, but which may be a bit more difficult to do random access to. (Basically, the address is set using one or more 4024 or 4040 counters and just pulsed to read the next address)

    It also deals with deleted records as its EPROMs, not EEPROMs(they introduced FLASH and RAM modules later), and you need an UV-light to erase the chips.
    (Psion ran a mail-in erase service back then, in 1986 when they introduced that series)
    As the computer only has a hitachi 6303 8bit processor running at .9MHz, a 32KB ROM(which also contains an Agenda, Editor, Translator, OPL-interpreter and a few other utilities), they had a lot of the same constraints as we have.

    A curious thing, though, is that when you save a file on the Psion, you can hear it ticking...
    (There's a 22V charge-pump step-up generator in there to create the programming-pulse of the EPROM, and its that which ticks)

    The FS they used in internal RAM, though...
    Yes, they had dynamic allocation of files and running programs on it.
    As the first of the series the Organiser II CM only had 8KB, you start to wonder...

    Ooops... Rambling...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 21:36
    Anything we're likely to use these days is flash memory or equivalent (battery backed RAM, ferroelectric, etc.) so updates can be made in place unlike with the Psion (yes, I have one in a drawer somewhere). The Palm's memory system (a heap) is perhaps a better example we might copy. There's a list of free space, often several lists based on free block sizes for efficiency. There would be a root block at location zero which would contain the volume name and addresses of the free list(s) and the start of the directory. The directory would be a linked list of blocks, each with one file descriptor in it and the address of the first and last block in the file. You could have forward and backward links to allow reading backwards easily. You can ask the system for a block of any size and it would use the first block it found that was large enough, then it would free up the unused portion. It would link the block into the existing file. The directory is just another file. When a file is deleted or a record in a file is deleted or changes in size (by allocating a new record, copying the data to it and freeing the old one), the record(s) are put back on the free list. Optionally, the memory manager can merge adjacent freed blocks so that large ones are usually available. A utility program could be written to compact the file structure when it becomes fragmented.
  • Stan671Stan671 Posts: 103
    edited 2006-05-20 23:26
    Fragmentation is totally unimportant with a purely electronic storage media. So, there is no point in trying to avoid a fragmentation producing FS. Avoiding the need for a "garbage collection" process seems more important to me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Stan Dobrowski
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 23:37
    In the system I described, fragmentation has more to do with the inability to find large blocks when the FS becomes close to full. It's not so much a matter of garbage collection as compaction. If adjacent free blocks are merged, compaction is less of a problem. There are other issues that come up because of the type of storage media. Flash is not the same as RAM in that the cost of writing is much higher than that of reading and writing works much more efficiently when done in small blocks. With serial memories, sequential locations for reading or writing is more efficient than random. Maybe we should use a tree structure rather than a list. It more easily allows random access and usually involves few writes when updating and they're all blocks.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-05-23 15:19
    Paul...
    Your comments are very close to what I was thinking about, only yours make some better sence then mine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-23 18:38
    I was also thinking of perhaps doing away with the entire concept of a seperate table, every file has a header containing all the pertainant file information (size, name, attributes etc) including a pointer to the beginning of the next file, this would be immeadiately followed by the data for the file. Since the time to get any particular sector is uniform, the scattering of file records across the flash wouldn't impose the delays inccured by traditional hard drive media, which is the original reasoning for the file tables. This would also require the occasional compaction when the flash is exhasted in order to reclaim deleted filespace.

    I can also see the possibility of implementing a directory structure within this methodology. There would be a special directory structure which could actually be comprised of only the directory name, and two pointers: a·pointer to the next "same level" structure which is either a file or another directory, and a pointer to the first "sub level" structure. Doing this can create chains across the flash drive preventing the need for rearrangement to insert a file or directory. Of course there would need to be a special "end of chain" value to be stored in a pointer to indicate it is the last in the chain.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10

    Post Edited (Paul Baker) : 5/23/2006 6:47:13 PM GMT
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-05-23 21:29
    Paul..
    A double linked list on the first sector of each file, and a double linked list in each sector for pointers to the correct previpus / next sector...
    Dooable.. and fast... I've coded many double linked lists... and as far as fragmentation... well, that's still either a seq re-write of all the files to remove it... or a shuffle, which, btw, is real simple in a DLL (Double Linked List)... Hmmm... Yes..... very dooable, fast, accurate... and self "defragmenting" almost...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
Sign In or Register to comment.