diff options
author | 2021-01-09 21:41:19 +0100 | |
---|---|---|
committer | 2021-01-09 21:42:29 +0100 | |
commit | 23af0ace46f4ac4c1b916f5dcba5ee82b7eff361 (patch) | |
tree | 9e152ea70cb0f60315ffb4d9b5a8c38ee0b58d06 /src/lib/formats/ap2_dsk.cpp | |
parent | 31390d3f3e1fd4ad4631115b1f1a2c68f419179d (diff) |
Provide the variants to the floppy formats
Diffstat (limited to 'src/lib/formats/ap2_dsk.cpp')
-rw-r--r-- | src/lib/formats/ap2_dsk.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp index 9e71303ece5..89776eb52f1 100644 --- a/src/lib/formats/ap2_dsk.cpp +++ b/src/lib/formats/ap2_dsk.cpp @@ -559,7 +559,7 @@ bool a2_16sect_format::supports_save() const return true; } -int a2_16sect_format::identify(io_generic *io, uint32_t form_factor) +int a2_16sect_format::identify(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants) { uint64_t size = io_generic_size(io); //uint32_t expected_size = 35 * 16 * 256; @@ -604,7 +604,7 @@ const floppy_image_format_t::desc_e a2_16sect_format::mac_gcr[] = { { END }, }; -bool a2_16sect_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) +bool a2_16sect_format::load(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) { uint64_t size = io_generic_size(io); @@ -768,7 +768,7 @@ void a2_16sect_format::update_chk(const uint8_t *data, int size, uint32_t &chk) //#define VERBOSE_SAVE -bool a2_16sect_format::save(io_generic *io, floppy_image *image) +bool a2_16sect_format::save(io_generic *io, const std::vector<uint32_t> &variants, floppy_image *image) { int g_tracks, g_heads; int visualgrid[16][APPLE2_TRACK_COUNT]; // visualizer grid, cleared/initialized below @@ -1046,7 +1046,7 @@ bool a2_rwts18_format::supports_save() const return true; } -int a2_rwts18_format::identify(io_generic *io, uint32_t form_factor) +int a2_rwts18_format::identify(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants) { uint64_t size = io_generic_size(io); uint32_t expected_size = APPLE2_TRACK_COUNT * 16 * 256; @@ -1084,7 +1084,7 @@ const floppy_image_format_t::desc_e a2_rwts18_format::mac_gcr[] = { }; -bool a2_rwts18_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) +bool a2_rwts18_format::load(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) { /* TODO: rewrite me properly uint8_t sector_data[(256)*16]; @@ -1133,7 +1133,7 @@ void a2_rwts18_format::update_chk(const uint8_t *data, int size, uint32_t &chk) { } -bool a2_rwts18_format::save(io_generic *io, floppy_image *image) +bool a2_rwts18_format::save(io_generic *io, const std::vector<uint32_t> &variants, floppy_image *image) { int g_tracks, g_heads; int visualgrid[18][APPLE2_TRACK_COUNT]; // visualizer grid, cleared/initialized below @@ -1562,7 +1562,7 @@ bool a2_edd_format::supports_save() const return false; } -int a2_edd_format::identify(io_generic *io, uint32_t form_factor) +int a2_edd_format::identify(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants) { return ((io_generic_size(io) == 2244608) || (io_generic_size(io) == 2310144)) ? 50 : 0; } @@ -1572,7 +1572,7 @@ uint8_t a2_edd_format::pick(const uint8_t *data, int pos) return ((data[pos>>3] << 8) | data[(pos>>3)+1]) >> (8-(pos & 7)); } -bool a2_edd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) +bool a2_edd_format::load(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) { uint8_t *img; uint8_t nibble[16384], stream[16384]; @@ -1686,7 +1686,7 @@ bool a2_woz_format::supports_save() const const uint8_t a2_woz_format::signature[8] = { 0x57, 0x4f, 0x5a, 0x31, 0xff, 0x0a, 0x0d, 0x0a }; const uint8_t a2_woz_format::signature2[8] = { 0x57, 0x4f, 0x5a, 0x32, 0xff, 0x0a, 0x0d, 0x0a }; -int a2_woz_format::identify(io_generic *io, uint32_t form_factor) +int a2_woz_format::identify(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants) { uint8_t header[8]; io_generic_read(io, header, 0, 8); @@ -1695,7 +1695,7 @@ int a2_woz_format::identify(io_generic *io, uint32_t form_factor) return 0; } -bool a2_woz_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) +bool a2_woz_format::load(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) { std::vector<uint8_t> img(io_generic_size(io)); io_generic_read(io, &img[0], 0, img.size()); |