~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/plus4/plus4bus.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-03-27 13:06:04 UTC
  • mfrom: (4 hoary)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050327130604-zodmv0i60dbbmcik
Tags: 1.16-3
Apply patch from Andreas Jochens <aj@andaco.de> to correct building on
AMD64 and GCC 4.x (closes: #300936)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * plus4bus.c - Generic interface to IO bus functions.
 
3
 *
 
4
 * Written by
 
5
 *  Andreas Boose <viceteam@t-online.de>
 
6
 *
 
7
 * This file is part of VICE, the Versatile Commodore Emulator.
 
8
 * See README for copyright notice.
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
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
 
23
 *  02111-1307  USA.
 
24
 *
 
25
 */
 
26
 
 
27
#include "vice.h"
 
28
 
 
29
#include "iecbus.h"
 
30
#include "machine-bus.h"
 
31
#include "serial.h"
 
32
#include "types.h"
 
33
 
 
34
 
 
35
int machine_bus_lib_directory(unsigned int unit, const char *pattern,
 
36
                              BYTE **buf)
 
37
{
 
38
    return serial_iec_lib_directory(unit, pattern, buf);
 
39
}
 
40
 
 
41
int machine_bus_lib_read_sector(unsigned int unit, unsigned int track,
 
42
                                unsigned int sector, BYTE *buf)
 
43
{
 
44
    return serial_iec_lib_read_sector(unit, track, sector, buf);
 
45
}
 
46
 
 
47
int machine_bus_lib_write_sector(unsigned int unit, unsigned int track,
 
48
                                 unsigned int sector, BYTE *buf)
 
49
{
 
50
    return serial_iec_lib_write_sector(unit, track, sector, buf);
 
51
}
 
52
 
 
53
unsigned int machine_bus_device_fsimage_state_get(unsigned int unit)
 
54
{
 
55
    return serial_device_fsimage_state_get(unit);
 
56
}
 
57
 
 
58
unsigned int machine_bus_device_realdevice_state_get(unsigned int unit)
 
59
{
 
60
    return serial_device_realdevice_state_get(unit);
 
61
}
 
62
 
 
63
void machine_bus_status_truedrive_set(unsigned int enable)
 
64
{
 
65
    iecbus_status_set(IECBUS_STATUS_TRUEDRIVE, 0, enable);
 
66
    serial_trap_truedrive_set(enable);
 
67
}
 
68
 
 
69
void machine_bus_status_drivetype_set(unsigned int unit, unsigned int enable)
 
70
{
 
71
    iecbus_status_set(IECBUS_STATUS_DRIVETYPE, unit, enable);
 
72
}
 
73
 
 
74
void machine_bus_status_virtualdevices_set(unsigned int enable)
 
75
{
 
76
    iecbus_status_set(IECBUS_STATUS_VIRTUALDEVICES, 0, enable);
 
77
}
 
78
 
 
79
void machine_bus_eof_callback_set(void (*func)(void))
 
80
{
 
81
    serial_trap_eof_callback_set(func);
 
82
}
 
83
 
 
84
void machine_bus_attention_callback_set(void (*func)(void))
 
85
{
 
86
    serial_trap_attention_callback_set(func);
 
87
}
 
88
 
 
89
void machine_bus_init_machine(void)
 
90
{
 
91
    iecbus_init();
 
92
}
 
93