Floppy fixes to handle TD0 and IMD images with some kinds of copy protection, fixes eg. F-19 Stealth Fighter from 1988.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* VARCem Virtual ARchaeological Computer EMulator.
|
||||
* An emulator of (mostly) x86-based PC systems and devices,
|
||||
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||
* spanning the era between 1981 and 1995.
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the VARCem Project.
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of the raw sector-based floppy image format,
|
||||
* as well as the Japanese FDI, CopyQM, and FDF formats.
|
||||
@@ -13,33 +13,15 @@
|
||||
* re-merged with the other files. Much of it is generic to
|
||||
* all formats.
|
||||
*
|
||||
* Version: @(#)fdd_img.c 1.0.9 2018/10/18
|
||||
* Version: @(#)fdd_img.c 1.0.10 2018/12/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2018,2019 Fred N. van Kempen.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
@@ -53,6 +35,7 @@
|
||||
#include "../config.h"
|
||||
#include "../plat.h"
|
||||
#include "fdd.h"
|
||||
#include "fdd_86f.h"
|
||||
#include "fdd_img.h"
|
||||
#include "fdc.h"
|
||||
|
||||
@@ -554,7 +537,7 @@ img_seek(int drive, int track)
|
||||
id[3] = dev->sector_size;
|
||||
dev->sector_pos_side[side][sr] = side;
|
||||
dev->sector_pos[side][sr] = (sr - 1) * ssize;
|
||||
current_pos = d86f_prepare_sector(drive, side, current_pos, id, &dev->track_data[side][(sr - 1) * ssize], ssize, dev->gap2_size, dev->gap3_size, 0, 0);
|
||||
current_pos = d86f_prepare_sector(drive, side, current_pos, id, &dev->track_data[side][(sr - 1) * ssize], ssize, dev->gap2_size, dev->gap3_size, 0);
|
||||
|
||||
if (sector == 0)
|
||||
d86f_initialize_last_sector_id(drive, id[0], id[1], id[2], id[3]);
|
||||
@@ -599,11 +582,11 @@ img_seek(int drive, int track)
|
||||
|
||||
if (is_t0) {
|
||||
id[3] = 2;
|
||||
current_pos = d86f_prepare_sector(drive, side, current_pos, id, &dev->track_data[buf_side][buf_pos], ssize, dev->gap2_size, xdf_gap3_sizes[current_xdft][!is_t0], 0, 0);
|
||||
current_pos = d86f_prepare_sector(drive, side, current_pos, id, &dev->track_data[buf_side][buf_pos], ssize, dev->gap2_size, xdf_gap3_sizes[current_xdft][!is_t0], 0);
|
||||
} else {
|
||||
id[3] = id[2] & 7;
|
||||
ssize = (128 << id[3]);
|
||||
current_pos = d86f_prepare_sector(drive, side, xdf_trackx_spos[current_xdft][array_sector], id, &dev->track_data[buf_side][buf_pos], ssize, dev->gap2_size, xdf_gap3_sizes[current_xdft][!is_t0], 0, 0);
|
||||
current_pos = d86f_prepare_sector(drive, side, xdf_trackx_spos[current_xdft][array_sector], id, &dev->track_data[buf_side][buf_pos], ssize, dev->gap2_size, xdf_gap3_sizes[current_xdft][!is_t0], 0);
|
||||
}
|
||||
|
||||
if (sector == 0)
|
||||
|
||||
Reference in New Issue
Block a user