Changeset c5b6c90 in buchla-emu for emu/mkdisk.c
- Timestamp:
- 07/31/2017 05:01:38 PM (7 years ago)
- Branches:
- master
- Children:
- 1489228
- Parents:
- 1efc42c
- git-author:
- Thomas Lopatic <thomas@…> (07/31/2017 05:01:32 PM)
- git-committer:
- Thomas Lopatic <thomas@…> (07/31/2017 05:01:38 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/mkdisk.c
r1efc42c rc5b6c90 30 30 #define N_CYL 80 31 31 #define N_SID 2 32 #define N_SEC 1832 #define N_SEC 9 33 33 #define SZ_SEC 512 34 34 35 #define N_SEC_CLU 1 35 #define N_SEC_CLU 2 36 #define SZ_CLU (SZ_SEC * N_SEC_CLU) 36 37 37 38 #define N_BOOT_SEC 1 38 #define N_FAT_SEC 939 #define N_ROOT_SEC 1439 #define N_FAT_SEC 3 40 #define N_ROOT_SEC 7 40 41 41 42 #define N_FAT 2 … … 142 143 off = put_sec_16(0, off, N_CYL * N_SID * N_SEC); 143 144 144 // media descriptor (floppy disk, 1.44M)145 off = put_sec_8(0, off, 0xf 0);145 // media descriptor (floppy disk, 720k) 146 off = put_sec_8(0, off, 0xf9); 146 147 147 148 // sectors per FAT (9 * 512 / 3 * 2 = 3072) … … 165 166 int32_t ent = 0; 166 167 167 ent = put_fat_12(sec, ent, 0xff 0);168 ent = put_fat_12(sec, ent, 0xff9); 168 169 ent = put_fat_12(sec, ent, 0xfff); 169 170 170 int32_t n_ sec = (sz_midas + SZ_SEC - 1) / SZ_SEC;171 172 for (int32_t i = 0; i < n_ sec- 1; ++i) {171 int32_t n_clu = (sz_midas + SZ_CLU - 1) / SZ_CLU; 172 173 for (int32_t i = 0; i < n_clu - 1; ++i) { 173 174 ent = put_fat_12(sec, ent, ent + 1); 174 175 }
Note:
See TracChangeset
for help on using the changeset viewer.