Donate Share

AdvanceMAME

Code

Programming Languages: C, C++, Assembly

License: GNU General Public License (GPL)

Repositories

browse code, statistics, last commit on 2009-01-26 cvs -d:pserver:anonymous@advancemame.cvs.sourceforge.net:/cvsroot/advancemame login

cvs -z3 -d:pserver:anonymous@advancemame.cvs.sourceforge.net:/cvsroot/advancemame co -P modulename

Show:

What's happening?

  • makebootfat: Allow creation of smaller partitions

    This supersedes the "make partitions end on a cylinder boundary" patch that I submitted previously. The change is that, if you have a disk that is large enough to require FAT32, but you have only specified a FAT16 boot sector image, then I want makebootfat to partition only a portion of the disk, and format it as FAT16. I have implemented a similar case for FAT12, but I have done no testing...

    2009-11-12 20:20:24 UTC by graham_knap

  • makebootfat: configure wrapper for Cygwin

    I have Cygwin on my laptop and didn't want to install mingw. Fortunately, Cygwin ships the mingw libraries, so getting makebootfat to build on Cygwin wasn't all that difficult. Tested with Cygwin current as of early November 2009, autoconf-2.64, gcc-3.4.4.

    2009-11-10 13:25:30 UTC by graham_knap

  • makebootfat: Improved algorithm for choosing disk format

    I wanted to be able to invoke "makebootfat" specifying both "-2" and "-3", and have it use FAT16 where possible (i.e. USB sticks up to 2GB) or FAT32 otherwise. This patch reworks the code that determines the FAT type and cluster size.

    2009-11-10 13:22:47 UTC by graham_knap

  • makebootfat: Make partitions end at cylinder boundary

    Some operating systems, partitioning programs, and PC BIOSes use the end CHS values for a partition to determine the disk geometry. This only works if the partition ends at a cylinder boundary. This patch implements that change. Because this wastes some disk space, I also added code to recalculate the disk geometry in a way that (usually) wastes slightly less space than CHS=*/255/63.

    2009-11-10 13:20:14 UTC by graham_knap

  • makebootfat: use LBA partition type codes

    FAT partitions that extend beyond cylinder 1024 should be marked as LBA in the partition table. This at least helps to make FreeDOS happy. I have seen no ill effects from using the LBA type codes on small partitions.

    2009-11-10 13:15:34 UTC by graham_knap

  • Followup: RE: Partition table trouble

    For my 4GB stick with geometry 1018/122/63, FreeDOS kernel 2039 gives the following warnings: WARNING: using suspect partition Pri:1 FS 0c: with calculated values 0-1-32 instead of 0-1-1 WARNING: using suspect partition Pri:1 FS 0c: with calculated values 15281-14-28 instead of 1017-121-63 I spent a bit of time looking at the source code...

    2009-11-09 17:40:52 UTC by graham_knap

  • Followup: RE: Partition table trouble

    Here's the patch to main() in case anyone else wants to play with it. if (zip_compatibility && h->geometry.size geometry.sectors = 32; /* value required by ZIP-Drive */ h->geometry.heads = 64; /* value required by ZIP-Drive */ part_entry = 3; /* ZIP-Drive requires to...

    2009-11-06 21:17:57 UTC by graham_knap

  • Followup: RE: Partition table trouble

    It looks fine to me: geometry 1018/122/63 start CHS 0/1/1, LBA 63 end CHS 1017/121/63, size 7824285 I don't see a problem. Oh well, time to call it a day.

    2009-11-06 21:15:16 UTC by graham_knap

  • Followup: RE: Partition table trouble

    Well, this makes sfdisk happy. FreeDOS wants to see partition type 0xc instead of 0xb, presumably because the partition is larger than 2GB. This would be trivial to fix in part_setup(), something like: part->entries[entry].type = (fat_size < 4194304 ? 0xb : 0xc); but I'm not entirely sure of where that limit should actually be; my guess is 4194304 sectors = 2GiB. FreeDOS is still...

    2009-11-06 21:03:32 UTC by graham_knap

  • Followup: RE: Partition table trouble

    I think I've got it working on cygwin; here's a configure.windows script that seems to work. -- \#!/bin/bash export CFLAGS="-O2 -Wall -march=i586 -fomit-frame-pointer -mno-cygwin" export CPPFLAGS="-D\_\_WIN32__ -I/usr/include/mingw" export LDFLAGS="-s -mno-cygwin" export LIBS="-lsetupapi" ./configure --build=\`./config.guess` $@.

    2009-11-06 20:33:31 UTC by graham_knap

Our Numbers