2013-07-06 04:37:13 +00:00
|
|
|
/*
|
2013-06-11 07:08:15 +00:00
|
|
|
* Apple // emulator for Linux: Defines for Disk ][ emulation
|
|
|
|
*
|
|
|
|
* Copyright 1994 Alexander Jean-Claude Bottema
|
|
|
|
* Copyright 1995 Stephen Lee
|
|
|
|
* Copyright 1997, 1998 Aaron Culliney
|
|
|
|
* Copyright 1998, 1999, 2000 Michael Deutschmann
|
|
|
|
*
|
|
|
|
* This software package is subject to the GNU General Public License
|
2013-07-06 04:37:13 +00:00
|
|
|
* version 2 or later (your choice) as published by the Free Software
|
2013-06-11 07:08:15 +00:00
|
|
|
* Foundation.
|
|
|
|
*
|
2013-07-06 04:37:13 +00:00
|
|
|
* THERE ARE NO WARRANTIES WHATSOEVER.
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef A2_DISK_H
|
2013-12-01 18:57:24 +00:00
|
|
|
#define A2_DISK_H
|
|
|
|
|
|
|
|
#include "common.h"
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2014-11-02 03:02:44 +00:00
|
|
|
struct diskette {
|
2013-06-19 07:07:41 +00:00
|
|
|
char file_name[1024];
|
2014-03-26 05:11:01 +00:00
|
|
|
bool compressed;
|
|
|
|
bool nibblized;
|
|
|
|
bool is_protected;
|
|
|
|
bool phase_change;
|
2013-06-11 07:08:15 +00:00
|
|
|
int sector;
|
|
|
|
long file_size;
|
|
|
|
int phase;
|
2013-07-06 04:37:13 +00:00
|
|
|
int run_byte;
|
2013-06-11 07:08:15 +00:00
|
|
|
FILE *fp;
|
|
|
|
int file_pos;
|
|
|
|
};
|
|
|
|
|
2014-11-02 03:02:44 +00:00
|
|
|
struct drive {
|
2013-06-11 07:08:15 +00:00
|
|
|
int motor;
|
|
|
|
int drive;
|
|
|
|
int ddrw;
|
|
|
|
int disk_byte;
|
|
|
|
int volume;
|
|
|
|
int checksum;
|
|
|
|
int exor_value;
|
|
|
|
unsigned char disk_data[258];
|
|
|
|
struct diskette disk[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct drive disk6;
|
|
|
|
|
2014-11-02 03:02:44 +00:00
|
|
|
void c_init_6(void);
|
2014-09-17 03:40:42 +00:00
|
|
|
const char *c_new_diskette_6(int drive, const char * const file_name, int force);
|
|
|
|
const char *c_eject_6(int drive);
|
2014-03-26 05:11:01 +00:00
|
|
|
void disk_io_initialize(unsigned int slot);
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2014-11-02 03:02:44 +00:00
|
|
|
void disk_read_nop(void),
|
|
|
|
disk_read_phase(void),
|
|
|
|
disk_read_motor_off(void),
|
|
|
|
disk_read_motor_on(void),
|
|
|
|
disk_read_select_a(void),
|
|
|
|
disk_read_select_b(void),
|
|
|
|
disk_read_byte(void),
|
|
|
|
disk_read_latch(void),
|
|
|
|
disk_write_latch(void),
|
|
|
|
disk_read_prepare_in(void),
|
|
|
|
disk_read_prepare_out(void);
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2014-10-12 01:31:19 +00:00
|
|
|
#ifdef TESTING
|
|
|
|
void c_begin_disk_trace_6(const char *read_file, const char *write_file);
|
|
|
|
void c_end_disk_trace_6(void);
|
|
|
|
#endif
|
|
|
|
|
2013-06-11 07:08:15 +00:00
|
|
|
#endif
|