Applied a whole slew of patches, getting RAM usage down by a further 10 MB.

This commit is contained in:
OBattler
2018-03-19 01:02:04 +01:00
parent b6c393cc91
commit b1efb99ed6
222 changed files with 9538 additions and 9980 deletions

View File

@@ -1,23 +1,40 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
*
* This file is part of the 86Box distribution.
* This file is part of the VARCem Project.
*
* Implementation of the generic device interface to handle
* all devices attached to the emulator.
* Definitions for the device handler.
*
* Version: @(#)device.h 1.0.8 2018/02/18
* Version: @(#)device.h 1.0.3 2018/03/15
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the:
*
* Free Software Foundation, Inc.
* 59 Temple Place - Suite 330
* Boston, MA 02111-1307
* USA.
*/
#ifndef EMU_DEVICE_H
# define EMU_DEVICE_H
@@ -81,7 +98,7 @@ typedef struct _device_ {
uint32_t flags; /* system flags */
uint32_t local; /* flags local to device */
void *(*init)(struct _device_ *);
void *(*init)(const struct _device_ *);
void (*close)(void *p);
void (*reset)(void *p);
int (*available)(/*void*/);
@@ -89,7 +106,7 @@ typedef struct _device_ {
void (*force_redraw)(void *p);
void (*add_status_info)(char *s, int max_len, void *p);
device_config_t *config;
const device_config_t *config;
} device_t;
@@ -98,12 +115,12 @@ extern "C" {
#endif
extern void device_init(void);
extern void *device_add(device_t *d);
extern void device_add_ex(device_t *d, void *priv);
extern void *device_add(const device_t *d);
extern void device_add_ex(const device_t *d, void *priv);
extern void device_close_all(void);
extern void device_reset_all(void);
extern void *device_get_priv(device_t *d);
extern int device_available(device_t *d);
extern void *device_get_priv(const device_t *d);
extern int device_available(const device_t *d);
extern void device_speed_changed(void);
extern void device_force_redraw(void);
extern void device_add_status_info(char *s, int max_len);
@@ -118,7 +135,7 @@ extern void device_set_config_hex16(char *s, int val);
extern void device_set_config_hex20(char *s, int val);
extern void device_set_config_mac(char *s, int val);
extern char *device_get_config_string(char *name);
extern int device_is_valid(device_t *device, int machine_flags);
extern int device_is_valid(const device_t *device, int machine_flags);
extern int machine_get_config_int(char *s);
extern char *machine_get_config_string(char *s);