Changes in emu/fdd.c [9b204fa:8967dbc] in buchla-emu
Legend:
- Unmodified
- Added
- Removed
-
emu/fdd.c
r9b204fa r8967dbc 44 44 #define COM_WR_SEC 0xa2 45 45 #define COM_INT 0xd0 46 #define COM_WR_TRA_WP 0xf0 47 #define COM_WR_TRA 0xf2 46 #define COM_WR_TRA 0xf0 48 47 49 48 #define COM_LAT_CYC 5 … … 99 98 return "COM_WR_SEC"; 100 99 101 case COM_WR_TRA_WP:102 return "COM_WR_TRA_WP";103 104 100 case COM_WR_TRA: 105 101 return "COM_WR_TRA"; … … 144 140 { 145 141 ver("fdd init"); 146 inf(" reading disk image file %s", disk);142 inf("loading disk image file %s", disk); 147 143 148 144 SDL_RWops *ops = SDL_RWFromFile(disk, "rb"); 149 145 150 146 if (ops == NULL) { 151 fail("error while opening disk image file %s for reading", disk);147 fail("error while opening disk image file %s", disk); 152 148 } 153 149 … … 170 166 { 171 167 ver("fdd quit"); 172 inf("writing disk image file %s", disk);173 174 SDL_RWops *ops = SDL_RWFromFile(disk, "wb");175 176 if (ops == NULL) {177 fail("error while opening disk image file %s for writing", disk);178 }179 180 size_t stored = 0;181 182 while (stored < SZ_DISK) {183 size_t n_wr = SDL_RWwrite(ops, image + stored, 1, SZ_DISK - stored);184 185 if (n_wr == 0) {186 fail("error while writing disk image file %s", disk);187 }188 189 stored += n_wr;190 }191 192 SDL_RWclose(ops);193 168 } 194 169 … … 363 338 364 339 case COM_WR_TRA: 365 case COM_WR_TRA_WP:366 340 state.tra_0 = false; 367 341 fail("format not yet supported");
Note:
See TracChangeset
for help on using the changeset viewer.