You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments