{"action":"created","issue":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/100","labels_url":"https://api.github.com/repos/stsp/dosemu2/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/stsp/dosemu2/issues/100/comments","events_url":"https://api.github.com/repos/stsp/dosemu2/issues/100/events","html_url":"https://github.com/stsp/dosemu2/pull/100","id":116321840,"number":100,"title":"MS-DOS 3.3 fatfs boot patches","user":{"login":"andrewbird","id":220835,"avatar_url":"https://avatars.githubusercontent.com/u/220835?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewbird","html_url":"https://github.com/andrewbird","followers_url":"https://api.github.com/users/andrewbird/followers","following_url":"https://api.github.com/users/andrewbird/following{/other_user}","gists_url":"https://api.github.com/users/andrewbird/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewbird/subscriptions","organizations_url":"https://api.github.com/users/andrewbird/orgs","repos_url":"https://api.github.com/users/andrewbird/repos","events_url":"https://api.github.com/users/andrewbird/events{/privacy}","received_events_url":"https://api.github.com/users/andrewbird/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-11T12:07:16Z","updated_at":"2015-11-11T18:48:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/stsp/dosemu2/pulls/100","html_url":"https://github.com/stsp/dosemu2/pull/100","diff_url":"https://github.com/stsp/dosemu2/pull/100.diff","patch_url":"https://github.com/stsp/dosemu2/pull/100.patch"},"body":"This series of patches [fixes #49] allow MS-DOS 3.3 to boot on both FAT12 and FAT16 filesystems generated by hdimage directory. For them to be operational the missing part is that somehow the filesystem size must be constrained to be recognisable by MS-DOS 3.3. For testing I patched disks.c\r\nas follows:\r\n\r\nFor FAT16\r\n```C\r\ndiff --git a/src/base/misc/disks.c b/src/base/misc/disks.c\r\nindex ef0baa2..1961b10 100644\r\n--- a/src/base/misc/disks.c\r\n+++ b/src/base/misc/disks.c\r\n@@ -512,9 +512,9 @@ void dir_auto(struct disk *dp)\r\n    * We emulate an entire disk with 1 partition starting at t/h/s 0/1/1.\r\n    * You are free to change the geometry (e.g. to change the partition size).\r\n    */\r\n-    dp->sectors = 63;\r\n-    dp->heads = 255;\r\n-    dp->tracks = 255;\r\n+    dp->sectors = 17;\r\n+    dp->heads = 4;\r\n+    dp->tracks = 605;\r\n     dp->start = dp->sectors;\r\n   }\r\n```\r\n\r\nFor FAT12\r\n```C\r\ndiff --git a/src/base/misc/disks.c b/src/base/misc/disks.c\r\nindex ef0baa2..1961b10 100644\r\n--- a/src/base/misc/disks.c\r\n+++ b/src/base/misc/disks.c\r\n@@ -512,9 +512,9 @@ void dir_auto(struct disk *dp)\r\n    * We emulate an entire disk with 1 partition starting at t/h/s 0/1/1.\r\n    * You are free to change the geometry (e.g. to change the partition size).\r\n    */\r\n-    dp->sectors = 63;\r\n-    dp->heads = 255;\r\n-    dp->tracks = 255;\r\n+    dp->sectors = 17;\r\n+    dp->heads = 4;\r\n+    dp->tracks = 306;\r\n     dp->start = dp->sectors;\r\n   }\r\n```\r\n\r\nWithout the disk size constraint, MS-DOS 3.3 will not boot. A proper config option or other solution for the selection of a smaller disk for these cases should be created.\r\n\r\nTested with MS-DOS 3.3 | result\r\n-------------------------- | ----\r\nFAT12 with boot.blk | OK\r\nFAT12 without boot.blk | OK\r\nFAT16 with boot.blk |OK\r\nFAT16 without boot.blk | OK\r\n\r\nTested with PC-DOS 3.3 | result\r\n-------------------------- | ----\r\nFAT12 without boot.blk | OK\r\nFAT16 without boot.blk | OK\r\n"},"comment":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/comments/155874720","html_url":"https://github.com/stsp/dosemu2/pull/100#issuecomment-155874720","issue_url":"https://api.github.com/repos/stsp/dosemu2/issues/100","id":155874720,"user":{"login":"andrewbird","id":220835,"avatar_url":"https://avatars.githubusercontent.com/u/220835?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewbird","html_url":"https://github.com/andrewbird","followers_url":"https://api.github.com/users/andrewbird/followers","following_url":"https://api.github.com/users/andrewbird/following{/other_user}","gists_url":"https://api.github.com/users/andrewbird/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewbird/subscriptions","organizations_url":"https://api.github.com/users/andrewbird/orgs","repos_url":"https://api.github.com/users/andrewbird/repos","events_url":"https://api.github.com/users/andrewbird/events{/privacy}","received_events_url":"https://api.github.com/users/andrewbird/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T18:48:17Z","updated_at":"2015-11-11T18:48:17Z","body":"It depends upon the provenance of the DOS.\r\nThe NEC branded one does have it, but the pure MS-DOS 3.30 from pcjr does not.\r\n\r\n$ strings drive_z-ms-dos-3.3/io.sys | grep Version\r\n$ strings drive_z-ms-dos-3.3-nec/io.sys | grep Version\r\nNEC IO.SYS for MS-DOS (R)  Version 3.30\r\n\r\n\r\n"}}