|
Post by Jim Brain on Jan 10, 2008 17:55:08 GMT -5
I know it's been a long time, but I am returning attention to this project, so I thought I'd make a pseudo-blog about it here, just to note what I am working on.
The project had been on hiatus due to other hobbies and a dread of implementing FAT write routines (reading is easy, if there are issues, nothing is ruined. writing is a commitment). And, writing files in FAT16/32 with Long file names is a serious exercise.
Currently, just opening a file for writing is a 234 line function, and I still need to add the code to add a new sector/cluster to the dir if all entries are full on the current sectors. But, it's a pretty small function, so I should have that done tonight.
Doing so will require creating a function to find a free FAT cluster and updating FAT, so I can reuse that when I write sectors.
On a whim, I last night hooked an IDE drive and a CF card up the interface, and they both worked at the same time.
On the bad side, I realized I need a RTC for the interface, and I am out of pins... I need at least 1 SEL line, so I need to go digging for it.
|
|
|
Post by Jim Brain on Jan 14, 2008 16:37:25 GMT -5
Update:
When I started the project, no one had FAT16/32 routines that offered LFN support and many only allowed one open file, or were write only. So, I started rolling my own. Then, I got busy, and had trouble grokking the LFN rules, so the project progressed very slowly.
Last week, I spent a lot of time getting the LFN entries created correctly on the CF card. Of course, I still had the actual FAT-entry work and such to do.
Then, I happened online and found FatFS, available since 2006, which has all the pieces I don't have, and lacks only LFN support.
sd2iec also uses it.
So, I went to work, now that I understand how LFNs work, adding the code to FatFs to do LFNs.
Done.
TO save development time, since FAT routines have nothing to do with uControllers, I moved my development over to the PC for the moment. I images a CF card as a raw data file, and retargeted my FAT16/32 routines to mess with the img file. That sped up development a lot.
I am finishing up the more esoteric functions in FatFs right now. I am also looking if I can borrow from the sd2iec project codebase, as I would rather add my multi-partition/CMD path handling code to that effort than re-invent everything they have (I covet the D64 code, for example, as that is in my plans).
Of course, the multi-partition code is not of major interest to sd2iec, as that is RAM limited, but I have more RAM in my design, and it's not much bigger. But, one codebase with two developers is better than 2 codebases with 1 developer each.
Jim
|
|
|
Post by Jeff Ledger on Jan 14, 2008 16:44:58 GMT -5
sd2iec? Would that be this? (http://snowcat.de/mmc2iec/) Published schematic? Glad to see you continuing work on this project Jim! This is one of my personal favorites. (Although I still think I was the only one besides Jim to build one of these by hand.. ) Jeff
|
|
|
Post by Jim Brain on Jan 18, 2008 13:54:13 GMT -5
Yes, it would. I am looking at the code now to see if I can merge my stuff and the stuff in sd2iec into one project.
I have Fat Long File Name reading and writing done. Now, it's on to the merge and the feature list.
Jim
|
|
|
Post by Jim Brain on Jan 28, 2008 18:31:08 GMT -5
I modified the main codebase to support FatFs-LFN and am now working on merging my code and sd2iec.
Jim
|
|
|
Post by Unseen on Jan 29, 2008 6:37:03 GMT -5
sd2iec? Would that be this? (http://snowcat.de/mmc2iec/) Published schematic? There is no sd2iec-specific schematic because it is using the same hardware as Lars Pontoppidan's MMC2IEC. There will be a version for an improved board in the future (the original MMC2IEC hardware has problems when many devices are connected to the bus and fixing that will require incompatible changes in the software - the brainstorming about this is still ongoing at forum64.de), but as long as I can fit more features in an ATmega32 I'll release MMC2IEC-compatible binaries.
|
|
|
Post by Jim Brain on Jan 31, 2008 0:44:16 GMT -5
Tonight, I've gotten Unseen's sd2iec code working on uIEC, with LFN directory listings working. Load is still not working, but I just started digging into the code.
The good news is that my work is also enabling LFN on sd2iec.
Many thanks to Unseen for helping with the integration of the new FatFs-LFN codebase into sd2iec.
Jim
|
|
|
Post by Jim Brain on Feb 17, 2008 17:42:14 GMT -5
Good news:
LFN support is merged into sd2iec, and uIEC build is merged as well. All that I need to do now is add multi-partition support back in and get JDOS working with my HW setup.
Close to finishing... Yay! And, I figured out how to address drives larger that 137GB, in case anyone wants to do that....
|
|
|
Post by Jim Brain on Mar 19, 2008 0:35:17 GMT -5
I sent multi-drive patches to Unseen last week, and they are merged (after he fixed a bunch of bugs). It took a few days to clean up the patches to make them more elegant, and reorganize some arrays and such. But, multi-drive support is merged into mainline now. Multiple partition code and a C version of JiffyDOS routines are merged into the mainline tree, as are some Fat cleanup and optimizations.
Code is looking very nice and very robust. Unseen is definitely doing the bulk of the work, as part of the firmware updates for sd2iec, but I do get the benefit, as he keeps the uIEC config up to date.
Since multiple partition and multiple drive code is in place, much of the work now is in adding support for more CMD commands, adding more error handling, and cleaning up code.
Jim
|
|
|
Post by Jim Brain on Mar 26, 2008 22:40:13 GMT -5
Unseen coded up ATA/IDE partition support in FatFs last week, which now means that sd2iec/uIEC partitions can be any Primary FAT or Extended FAT partition on the disk.
For my part, I cleaned up some of the FAT Multiple partition defines, and implemented partition directories. I also added support for LFN dir header names.
Unseen is implementing .?00 file support at present. That should make things interesting.
I'm whittling down the list of CMD HD commands and trying to see which can be easily implemented.
Jim
|
|
|
Post by Jim Brain on Apr 1, 2008 22:48:25 GMT -5
Partition directories can now accept wildcards. JiffyDOS now works, although only minimally tested (Unseen wrote a C version of the routines for uIEC to operate).
I fixed some bugs in the ATA support (reinitializing the drive for each partition scan) and cleaned up some code in there.
I believe I am still having trouble with dual IDE drive support, so I'll work on that, but then I think the code will be ready for a cut.
Jim
|
|
|
Post by Jim Brain on May 1, 2008 20:34:09 GMT -5
- JiffyDOS support has been improved and fixed for NTSC operation. Unseen reworked the ASM code so uIEC could use the same codebase as sd2iec in this area.
- You can now move forwards and backwards in disk swap lists
- You can set the system to save files using P00/S00/R00/U00 files or use PRG/SEQ/USR/REL extensions. In both cases, extensions are stripped in directory listings.
- Support for CMD-style long directory listings and "before" and "after" date/time matching
- You can set device to "sleep" where it will ignore the IEC bus.
I'm still fighting support for some CF cards, but I have not had as much time to look into that. Jim
|
|
|
Post by Jim Brain on Aug 3, 2008 22:45:21 GMT -5
Sorry for the delay, but I've been busy. uIEC ebuted at the CCCC EXPO, and I sold a good number of units there. During the EXPO and up till now, here is the score: - Support for multiple partitions
- Support for multiple drives
- firmware can be updated by simply copying new firmware to the first partition and resetting the unit
- All CF cards init correctly now.
- REL file support
- CF card insertion is detected and handled (uIEC is re-initialized)
- copy command is implemented
Although not in any units yet, I have some additional items in the firmware: - "Soft" real time clock support. If you set the time and date on powerup, the system will date and time stamp any files saved.
- Time and Data CMD commands to set time and date and read it
- Ability to turn on or off the IDE channels at runtime
I'm sold out of the first batch of boards, and trying to get the final units soldered and delivered. I'm also designing a new revision of the board.
|
|
|
Post by Jim Brain on Oct 5, 2008 20:37:14 GMT -5
Soft real time clock support is now in the firmware Time and date CMD commands work.
Still working on the ability to turn on or off IDE channels at runtime.
IDE+CF boards are available now.
Jim
|
|
|
Post by vk4akp on Oct 21, 2008 9:27:08 GMT -5
IDE+SDHC+Ethernet Boards available soon??¿? .-.-.
|
|