diff options
| author | 2015-12-29 23:12:09 +0000 | |
|---|---|---|
| committer | 2015-12-29 23:12:09 +0000 | |
| commit | e043e2ad413329aeff62b8639e7f8344a53ca4c7 (patch) | |
| tree | cae3e6ae35d0e63445b6bbbb30324d7f5e06418f /src/lib/formats/bbc_dsk.cpp | |
| parent | 3fd8d858374dda6c435d2a6365e1d00b8599031f (diff) | |
| parent | c99150a5f20b2e317ce6584f1b8d7563402fad44 (diff) | |
Merge pull request #534 from Pernod70/master
bbc: added Torch computer and softlist updates
Diffstat (limited to 'src/lib/formats/bbc_dsk.cpp')
| -rw-r--r-- | src/lib/formats/bbc_dsk.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/lib/formats/bbc_dsk.cpp b/src/lib/formats/bbc_dsk.cpp index 193ab435e69..8b39ed17b1f 100644 --- a/src/lib/formats/bbc_dsk.cpp +++ b/src/lib/formats/bbc_dsk.cpp @@ -352,7 +352,55 @@ const bbc_cpm_format::format bbc_cpm_format::formats[] = {} }; + +bbc_cpn_format::bbc_cpn_format() : wd177x_format(formats) +{ +} + +const char *bbc_cpn_format::name() const +{ + return "cpn"; +} + +const char *bbc_cpn_format::description() const +{ + return "Torch CPN disk image"; +} + +const char *bbc_cpn_format::extensions() const +{ + return "dsd"; +} + +int bbc_cpn_format::identify(io_generic *io, UINT32 form_factor) +{ + int type = find_size(io, form_factor); + + if(type != -1) + return 50; + return 0; +} + +int bbc_cpn_format::get_image_offset(const format &f, int head, int track) +{ + if (f.sector_base_id == -1) + return (track * f.head_count + head) * compute_track_size(f); + else + return (f.track_count * head + track) * compute_track_size(f); +} + +const bbc_cpn_format::format bbc_cpn_format::formats[] = +{ + { // 400k 80 track double sided single density (interleaved) - gaps unverified + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 10, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9 }, 40, 10, 10 + }, + {} +}; + + const floppy_format_type FLOPPY_BBC_DFS_FORMAT = &floppy_image_format_creator<bbc_dfs_format>; const floppy_format_type FLOPPY_BBC_ADFS_FORMAT = &floppy_image_format_creator<bbc_adfs_format>; const floppy_format_type FLOPPY_BBC_DOS_FORMAT = &floppy_image_format_creator<bbc_dos_format>; const floppy_format_type FLOPPY_BBC_CPM_FORMAT = &floppy_image_format_creator<bbc_cpm_format>; +const floppy_format_type FLOPPY_BBC_CPN_FORMAT = &floppy_image_format_creator<bbc_cpn_format>; |
