1
/*********************************************************************
7
*********************************************************************/
9
#include "formats/atarist_dsk.h"
10
#include "formats/basicdsk.h"
22
/***************************************************************************
24
***************************************************************************/
28
/***************************************************************************
30
***************************************************************************/
32
/*-------------------------------------------------
33
FLOPPY_IDENTIFY( atarist_st_identify )
34
-------------------------------------------------*/
36
static FLOPPY_IDENTIFY( atarist_st_identify )
40
return FLOPPY_ERROR_SUCCESS;
43
/*-------------------------------------------------
44
FLOPPY_CONSTRUCT( atarist_st_construct )
45
-------------------------------------------------*/
47
static FLOPPY_CONSTRUCT( atarist_st_construct )
52
UINT8 bootsector[512];
54
floppy_image_read(floppy, bootsector, 0, 512);
55
sectors = bootsector[0x18];
56
heads = bootsector[0x1a];
57
tracks = (bootsector[0x13] | (bootsector[0x14] << 8)) / sectors / heads;
59
struct basicdsk_geometry geometry;
60
memset(&geometry, 0, sizeof(geometry));
62
geometry.heads = heads;
63
geometry.first_sector_id = 1;
64
geometry.sector_length = 512;
65
geometry.tracks = tracks;
66
geometry.sectors = sectors;
68
if (LOG) LOG_FORMATS("ST Heads %u Tracks %u Sectors %u\n", heads, tracks, sectors);
70
return basicdsk_construct(floppy, &geometry);
73
/*-------------------------------------------------
74
FLOPPY_CONSTRUCT(atarist_dsk_construct)
75
-------------------------------------------------*/
77
FLOPPY_OPTIONS_START( atarist )
78
FLOPPY_OPTION( atarist, "st", "Atari ST floppy disk image", atarist_st_identify, atarist_st_construct, NULL, NULL )
79
/* FLOPPY_OPTION( atarist, "stt", "Atari ST floppy disk image", atarist_stt_identify, atarist_stt_construct, NULL, NULL )
80
FLOPPY_OPTION( atarist, "msa", "Atari ST floppy disk image", atarist_msa_identify, atarist_msa_construct, NULL, NULL )
81
FLOPPY_OPTION( atarist, "dim", "Atari ST floppy disk image", atarist_dim_identify, atarist_dim_construct, NULL, NULL )*/