Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
f011_core.h
Go to the documentation of this file.
1 /* F011 FDC (used by Commodore 65 and MEGA65) emulation.
2  Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
3  Copyright (C)2016-2022 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18 
19 #ifndef XEMU_COMMON_F011_CORE_H_INCLUDED
20 #define XEMU_COMMON_F011_CORE_H_INCLUDED
21 
22 #define FDC_DENY_DISK_ACCESS 0
23 #define FDC_ALLOW_DISK_ACCESS 1
24 #define FDC_DENY_DISK_ACCESS_ONCE 2
25 
26 extern void fdc_write_reg ( int addr, Uint8 data );
27 extern Uint8 fdc_read_reg ( int addr );
28 extern void fdc_init ( Uint8 *cache_set );
29 extern void fdc_set_disk ( int which, int in_have_disk, int in_have_write );
30 extern void fdc_allow_disk_access ( int in );
31 extern int fdc_get_led_state ( int blink_inc );
32 extern int fdc_get_buffer_cpu_address ( void );
33 extern int fdc_get_buffer_disk_address ( void );
34 extern int fdc_get_status_a ( const int which );
35 extern int fdc_get_status_b ( const int which );
36 
37 /* must defined by the user */
38 extern int fdc_cb_rd_sec ( const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector );
39 extern int fdc_cb_wr_sec ( const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector );
40 
41 #ifdef XEMU_SNAPSHOT_SUPPORT
42 #include "xemu/emutools_snapshot.h"
43 extern int fdc_snapshot_load_state ( const struct xemu_snapshot_definition_st *def , struct xemu_snapshot_block_st *block );
44 extern int fdc_snapshot_save_state ( const struct xemu_snapshot_definition_st *def );
45 #endif
46 
47 #endif
fdc_cb_rd_sec
int fdc_cb_rd_sec(const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector)
Definition: commodore_65.c:290
fdc_get_buffer_disk_address
int fdc_get_buffer_disk_address(void)
Definition: f011_core.c:137
fdc_allow_disk_access
void fdc_allow_disk_access(int in)
Definition: f011_core.c:171
addr
int addr
Definition: dma65.c:81
fdc_get_buffer_cpu_address
int fdc_get_buffer_cpu_address(void)
Definition: f011_core.c:143
m65-memcontent-generator.data
data
Definition: m65-memcontent-generator.py:119
Uint8
uint8_t Uint8
Definition: fat32.c:51
block
Uint32 block
Definition: fat32.c:156
fdc_write_reg
void fdc_write_reg(int addr, Uint8 data)
Definition: f011_core.c:277
fdc_get_led_state
int fdc_get_led_state(int blink_inc)
Definition: f011_core.c:161
emutools_snapshot.h
fdc_cb_wr_sec
int fdc_cb_wr_sec(const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector)
Definition: commodore_65.c:296
fdc_set_disk
void fdc_set_disk(int which, int in_have_disk, int in_have_write)
Definition: f011_core.c:177
fdc_get_status_a
int fdc_get_status_a(const int which)
Definition: f011_core.c:149
fdc_init
void fdc_init(Uint8 *cache_set)
Definition: f011_core.c:110
fdc_get_status_b
int fdc_get_status_b(const int which)
Definition: f011_core.c:155
fdc_read_reg
Uint8 fdc_read_reg(int addr)
Definition: f011_core.c:472