X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP cross compilers for open-source hardware Date: Thu, 05 Sep 2013 08:18:23 -0400 Organization: Aioe.org NNTP Server Lines: 61 Message-ID: References: NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes X-Complaints-To: abuse AT aioe DOT org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Bytes: 3679 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from Quoted-Printable to 8bit by delorie.com id r85CU2BV017022 Reply-To: djgpp AT delorie DOT com On Tue, 03 Sep 2013 19:33:05 -0400, Hans-Bernhard Bröker wrote: > On 04.09.2013 00:08, Rod Pemberton wrote: >> It seems DOSBOX is forcing the MOUNTed filesystem to be FAT16 with >> 8.3 names, even if it's a FAT32 filesystem with LFNs and SFNs mounted >> as VFAT in Linux, and even if it's an ext4 filesystem in Linux with >> long file names. > > Actually, the very fact that it mounts (part of) an existing > _filesystem_, instead of a raw block device, is probably enough > to make it impossible for any LFN emulator to work on top of that. > Because that means that the whole directory structure is a simulated > _fake_ that doesn't actually exist. There's just no way an LFN tool > can manipulate the entries of such a fake directory correctly without > cooperation of the emulator that's doing the faking. > > In short: if you're mounting filesystems into a PC emulator, LFN > support is either built directly into that emulator, or it's impossible. > First, the "umsdos" method should work for any filesystem. It just reads (and writes) short filenames and the corresponding long filename from a text file. There is one such file per directory. This file acts as a multi-file database of matching LFN and SFN names, or an alternate set of directory name entries. Of course, those long filenames have to be populated first from the host filesystem's longer names using a custom a utility for the host OS. If DOSBOX allows TSRs and allows the necessary interrupts to be installed, this could work. Second, in DOSBOX, the user has the ability to create files, rename them, create directories, delete files, delete directories, etc. I.e., there is indirect access to the host filesystem's features via DOSBOX's filesystem features. To do those things, the entire directory structure must be populated before being rewritten by the host OS. DOSBOX uses a FAT filesystem for it's emulation. It's likely that this is translated from FAT structures to ext4 structures etc, but it likely maps directly for FAT filesystems. This means it may be possible to indirectly access the "inaccessible" directory elements needed for LFNs on FAT or VFAT. E.g., direct modification of DOSBOX's directory structures for FAT or VFAT filesystems. Obviously, this depends on what functions DOSBOX has implemented, what DOS structures DOSBOX allows access to, and whether or not the structures are copied or passed directly for FAT or VFAT. Or, it might be possible to easily fix DOSBOX's code to optionally support LFN's at the user's request. DOSBOX has a number of '-t' options for cdroms, etc. One could be added for LFNs, e.g., '-t vfat' or '-t lfn'. Rod Pemberton