Skip to content

Commit ed615a9

Browse files
authored
formats/ap2_dsk.cpp: add write support for the D13 format (#14214)
* formats/ap2_dsk.cpp: make a2_{13,16}sect_format inherit from a common base class Also, replace hardcoded sector counts by constants and/or variables. There is not much point in the `m_nsect` variable right now, but it'll become more useful in a future commit. * formats/ap2_dsk.cpp: refactor a2_16sect_format::save * extract fragments that would be different for the 13-sector format into separate functions; * extract repeated expressions into variables; * merge `pos` and `wrap` into a struct; For simplicity of implementation, this makes a minor behavior change: when the current sector is of the wrong DOS version, we now start searching for the next sector at the position after the address postamble, rather than after the data preamble (IOW, we rewind the current position, which we didn't do before). This shouldn't make much difference in practice. * formats/ap2_dsk.cpp: add write support for the D13 format * formats/ap2_dsk.cpp: group methods by class
1 parent 37408e7 commit ed615a9

File tree

2 files changed

+382
-249
lines changed

2 files changed

+382
-249
lines changed

0 commit comments

Comments
 (0)