5
* Andreas Boose <viceteam@t-online.de>
7
* This file is part of VICE, the Versatile Commodore Emulator.
8
* See README for copyright notice.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
33
#include "iec128dcr.h"
36
#include "machine-drive.h"
40
int machine_drive_resources_init(void)
42
return drive_resources_type_init(DRIVE_TYPE_1541)
43
| iec_drive_resources_init() | iec128dcr_drive_resources_init()
44
| ieee_drive_resources_init();
47
void machine_drive_resources_shutdown(void)
49
iec_drive_resources_shutdown();
50
iec128dcr_drive_resources_shutdown();
51
ieee_drive_resources_shutdown();
54
int machine_drive_cmdline_options_init(void)
56
return iec_drive_cmdline_options_init()
57
| iec128dcr_drive_cmdline_options_init()
58
| ieee_drive_cmdline_options_init();
61
void machine_drive_init(struct drive_context_s *drv)
64
iec128dcr_drive_init(drv);
65
iecieee_drive_init(drv);
69
void machine_drive_shutdown(struct drive_context_s *drv)
71
iec_drive_shutdown(drv);
72
iec128dcr_drive_shutdown(drv);
73
iecieee_drive_shutdown(drv);
74
ieee_drive_shutdown(drv);
77
void machine_drive_reset(struct drive_context_s *drv)
80
iec128dcr_drive_reset(drv);
81
iecieee_drive_reset(drv);
82
ieee_drive_reset(drv);
85
void machine_drive_mem_init(struct drive_context_s *drv, unsigned int type)
87
iec_drive_mem_init(drv, type);
88
iec128dcr_drive_mem_init(drv, type);
89
ieee_drive_mem_init(drv, type);
92
void machine_drive_setup_context(struct drive_context_s *drv)
94
iec_drive_setup_context(drv);
95
iec128dcr_drive_setup_context(drv);
96
iecieee_drive_setup_context(drv);
97
ieee_drive_setup_context(drv);
100
void machine_drive_idling_method(unsigned int dnr)
102
iec_drive_idling_method(dnr);
105
void machine_drive_vsync_hook(void)
107
iec_drive_vsync_hook();
110
void machine_drive_rom_load(void)
112
iec_drive_rom_load();
113
iec128dcr_drive_rom_load();
114
ieee_drive_rom_load();
117
void machine_drive_rom_setup_image(unsigned int dnr)
119
iec_drive_rom_setup_image(dnr);
120
iec128dcr_drive_rom_setup_image(dnr);
121
ieee_drive_rom_setup_image(dnr);
124
int machine_drive_rom_read(unsigned int type, WORD addr, BYTE *data)
126
if (iec_drive_rom_read(type, addr, data) == 0)
128
if (iec128dcr_drive_rom_read(type, addr, data) == 0)
130
if (ieee_drive_rom_read(type, addr, data) == 0)
136
int machine_drive_rom_check_loaded(unsigned int type)
138
if (iec_drive_rom_check_loaded(type) == 0)
140
if (iec128dcr_drive_rom_check_loaded(type) == 0)
142
if (ieee_drive_rom_check_loaded(type) == 0)
148
void machine_drive_rom_do_checksum(unsigned int dnr)
150
iec_drive_rom_do_checksum(dnr);
151
ieee_drive_rom_do_checksum(dnr);
154
int machine_drive_snapshot_read(struct drive_context_s *ctxptr,
155
struct snapshot_s *s)
157
if (iec_drive_snapshot_read(ctxptr, s) < 0)
159
if (iecieee_drive_snapshot_read(ctxptr, s) < 0)
161
if (ieee_drive_snapshot_read(ctxptr, s) < 0)
167
int machine_drive_snapshot_write(struct drive_context_s *ctxptr,
168
struct snapshot_s *s)
170
if (iec_drive_snapshot_write(ctxptr, s) < 0)
172
if (iecieee_drive_snapshot_write(ctxptr, s) < 0)
174
if (ieee_drive_snapshot_write(ctxptr, s) < 0)
180
int machine_drive_image_attach(struct disk_image_s *image, unsigned int unit)
182
return iec_drive_image_attach(image, unit)
183
& ieee_drive_image_attach(image, unit);
186
int machine_drive_image_detach(struct disk_image_s *image, unsigned int unit)
188
return iec_drive_image_detach(image, unit)
189
& ieee_drive_image_detach(image, unit);
192
void machine_drive_port_default(struct drive_context_s *drv)
194
iec_drive_port_default(drv);
197
void machine_drive_flush(void)
199
drive_gcr_data_writeback_all();
202
void machine_drive_stub(void)