Hi
Sorry for the delay. That's exactly the problem, it works for maps up
to 128M but not higher than that.
I had a little explore in the source code and found the tantalising
"gives 128M will try more later" comment, and naively tried a larger
number of cylinders. Tried 0x200 but that didn't work. Reading the
code below that bit I realise now it might not be so easy :-)
I'm happy to do some more experimentation / testing patches etc if you
can give me some things to try.
Could you try the attached patch please. If it works it should take it
up to 512M.
If you need more than that there will have to be some experimentation to
find out what is implemented. Actual devices ignore all this as far as I
know.
..Steve
Index: src/uk/me/parabola/imgfmt/sys/ImgHeader.java
===================================================================
--- src/uk/me/parabola/imgfmt/sys/ImgHeader.java (revision 1751)
+++ src/uk/me/parabola/imgfmt/sys/ImgHeader.java (revision )
@@ -155,7 +155,7 @@
header.putShort(OFF_SECTORS, (short) sectors);
int heads = 0x20; // 0x20 appears to be max
header.putShort(OFF_HEADS, (short) heads);
- int cylinders = 0x100; // gives 128M will try more later
+ int cylinders = 0x400; // gives 512M
header.putShort(OFF_CYLINDERS, (short) cylinders);
header.putShort(OFF_HEADS2, (short) heads);
header.putShort(OFF_SECTORS2, (short) sectors);
@@ -177,7 +177,7 @@
header.put(OFF_START_CYLINDER, (byte) 0);
header.put(OFF_SYSTEM_TYPE, (byte) 0);
header.put(OFF_END_HEAD, (byte) (heads - 1));
- header.put(OFF_END_SECTOR, (byte) sectors);
+ header.put(OFF_END_SECTOR, (byte) (sectors + (((cylinders-1) & 0x300) >> 2)));
header.put(OFF_END_CYLINDER, (byte) (cylinders - 1));
header.putInt(OFF_REL_SECTORS, 0);
header.putInt(OFF_NUMBER_OF_SECTORS, (blocks * (1 << (exp - 9))));
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev