Applied a whole slew of patches, getting RAM usage down by a further 10 MB.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handling of the SCSI controllers.
|
||||
*
|
||||
* Version: @(#)scsi.c 1.0.16 2018/03/06
|
||||
* Version: @(#)scsi.c 1.0.17 2018/03/18
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -56,10 +56,10 @@ static volatile
|
||||
mutex_t *scsiMutex;
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
device_t *device;
|
||||
typedef const struct {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const device_t *device;
|
||||
void (*reset)(void *p);
|
||||
} SCSI_CARD;
|
||||
|
||||
@@ -102,7 +102,7 @@ char *scsi_card_getname(int card)
|
||||
}
|
||||
|
||||
|
||||
device_t *scsi_card_getdevice(int card)
|
||||
const device_t *scsi_card_getdevice(int card)
|
||||
{
|
||||
return(scsi_cards[card].device);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* SCSI controller handler header.
|
||||
*
|
||||
* Version: @(#)scsi_h 1.0.13 2018/02/07
|
||||
* Version: @(#)scsi_h 1.0.14 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -298,7 +298,7 @@ extern int scsi_card_current;
|
||||
extern int scsi_card_available(int card);
|
||||
extern char *scsi_card_getname(int card);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern device_t *scsi_card_getdevice(int card);
|
||||
extern const device_t *scsi_card_getdevice(int card);
|
||||
#endif
|
||||
extern int scsi_card_has_config(int card);
|
||||
extern char *scsi_card_get_internal_name(int card);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* made by Adaptec, Inc. These controllers were designed for
|
||||
* the ISA bus.
|
||||
*
|
||||
* Version: @(#)scsi_aha154x.c 1.0.39 2018/03/07
|
||||
* Version: @(#)scsi_aha154x.c 1.0.40 2018/03/18
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Original Buslogic version by SA1988 and Miran Grca.
|
||||
@@ -733,7 +733,7 @@ aha_setnvr(x54x_t *dev)
|
||||
|
||||
/* General initialization routine for all boards. */
|
||||
static void *
|
||||
aha_init(device_t *info)
|
||||
aha_init(const device_t *info)
|
||||
{
|
||||
x54x_t *dev;
|
||||
|
||||
@@ -878,7 +878,7 @@ aha_init(device_t *info)
|
||||
}
|
||||
|
||||
|
||||
static device_config_t aha_154xb_config[] = {
|
||||
static const device_config_t aha_154xb_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x334,
|
||||
{
|
||||
@@ -1009,7 +1009,7 @@ static device_config_t aha_154xb_config[] = {
|
||||
};
|
||||
|
||||
|
||||
static device_config_t aha_154x_config[] = {
|
||||
static const device_config_t aha_154x_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x334,
|
||||
{
|
||||
@@ -1108,7 +1108,7 @@ static device_config_t aha_154x_config[] = {
|
||||
};
|
||||
|
||||
|
||||
device_t aha1540b_device = {
|
||||
const device_t aha1540b_device = {
|
||||
"Adaptec AHA-1540B",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
AHA_154xB,
|
||||
@@ -1117,7 +1117,7 @@ device_t aha1540b_device = {
|
||||
aha_154xb_config
|
||||
};
|
||||
|
||||
device_t aha1542c_device = {
|
||||
const device_t aha1542c_device = {
|
||||
"Adaptec AHA-1542C",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
AHA_154xC,
|
||||
@@ -1126,7 +1126,7 @@ device_t aha1542c_device = {
|
||||
aha_154x_config
|
||||
};
|
||||
|
||||
device_t aha1542cf_device = {
|
||||
const device_t aha1542cf_device = {
|
||||
"Adaptec AHA-1542CF",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
AHA_154xCF,
|
||||
@@ -1135,7 +1135,7 @@ device_t aha1542cf_device = {
|
||||
aha_154x_config
|
||||
};
|
||||
|
||||
device_t aha1640_device = {
|
||||
const device_t aha1640_device = {
|
||||
"Adaptec AHA-1640",
|
||||
DEVICE_MCA,
|
||||
AHA_1640,
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# define SCSI_AHA154X_H
|
||||
|
||||
|
||||
extern device_t aha1540b_device;
|
||||
extern device_t aha1542c_device;
|
||||
extern device_t aha1542cf_device;
|
||||
extern device_t aha1640_device;
|
||||
extern const device_t aha1540b_device;
|
||||
extern const device_t aha1542c_device;
|
||||
extern const device_t aha1542cf_device;
|
||||
extern const device_t aha1640_device;
|
||||
|
||||
extern void aha_device_reset(void *p);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* 1 - BT-545S ISA;
|
||||
* 2 - BT-958D PCI
|
||||
*
|
||||
* Version: @(#)scsi_buslogic.c 1.0.35 2018/03/07
|
||||
* Version: @(#)scsi_buslogic.c 1.0.36 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -1446,7 +1446,7 @@ BuslogicDeviceReset(void *p)
|
||||
|
||||
|
||||
static void *
|
||||
buslogic_init(device_t *info)
|
||||
buslogic_init(const device_t *info)
|
||||
{
|
||||
x54x_t *dev;
|
||||
wchar_t *bios_rom_name;
|
||||
@@ -1660,7 +1660,7 @@ buslogic_init(device_t *info)
|
||||
}
|
||||
|
||||
|
||||
static device_config_t BT_ISA_Config[] = {
|
||||
static const device_config_t BT_ISA_Config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x334,
|
||||
{
|
||||
@@ -1756,7 +1756,7 @@ static device_config_t BT_ISA_Config[] = {
|
||||
};
|
||||
|
||||
|
||||
static device_config_t BT958D_Config[] = {
|
||||
static const device_config_t BT958D_Config[] = {
|
||||
{
|
||||
"bios", "Enable BIOS", CONFIG_BINARY, "", 0
|
||||
},
|
||||
@@ -1766,7 +1766,7 @@ static device_config_t BT958D_Config[] = {
|
||||
};
|
||||
|
||||
|
||||
device_t buslogic_device = {
|
||||
const device_t buslogic_device = {
|
||||
"Buslogic BT-542BH ISA",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
CHIP_BUSLOGIC_ISA_542,
|
||||
@@ -1775,7 +1775,7 @@ device_t buslogic_device = {
|
||||
BT_ISA_Config
|
||||
};
|
||||
|
||||
device_t buslogic_545s_device = {
|
||||
const device_t buslogic_545s_device = {
|
||||
"Buslogic BT-545S ISA",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
CHIP_BUSLOGIC_ISA,
|
||||
@@ -1784,7 +1784,7 @@ device_t buslogic_545s_device = {
|
||||
BT_ISA_Config
|
||||
};
|
||||
|
||||
device_t buslogic_640a_device = {
|
||||
const device_t buslogic_640a_device = {
|
||||
"Buslogic BT-640A MCA",
|
||||
DEVICE_MCA,
|
||||
CHIP_BUSLOGIC_MCA,
|
||||
@@ -1793,7 +1793,7 @@ device_t buslogic_640a_device = {
|
||||
NULL
|
||||
};
|
||||
|
||||
device_t buslogic_445s_device = {
|
||||
const device_t buslogic_445s_device = {
|
||||
"Buslogic BT-445S ISA",
|
||||
DEVICE_VLB,
|
||||
CHIP_BUSLOGIC_VLB,
|
||||
@@ -1802,7 +1802,7 @@ device_t buslogic_445s_device = {
|
||||
BT_ISA_Config
|
||||
};
|
||||
|
||||
device_t buslogic_pci_device = {
|
||||
const device_t buslogic_pci_device = {
|
||||
"Buslogic BT-958D PCI",
|
||||
DEVICE_PCI,
|
||||
CHIP_BUSLOGIC_PCI,
|
||||
|
||||
@@ -7,24 +7,24 @@
|
||||
* Emulation of BusLogic BT-542B ISA and BT-958D PCI SCSI
|
||||
* controllers.
|
||||
*
|
||||
* Version: @(#)scsi_buslogic.h 1.0.2 2017/10/14
|
||||
* Version: @(#)scsi_buslogic.h 1.0.3 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_BUSLOGIC_H
|
||||
# define SCSI_BUSLOGIC_H
|
||||
|
||||
|
||||
extern device_t buslogic_device;
|
||||
extern device_t buslogic_545s_device;
|
||||
extern device_t buslogic_640a_device;
|
||||
extern device_t buslogic_445s_device;
|
||||
extern device_t buslogic_pci_device;
|
||||
extern const device_t buslogic_device;
|
||||
extern const device_t buslogic_545s_device;
|
||||
extern const device_t buslogic_640a_device;
|
||||
extern const device_t buslogic_445s_device;
|
||||
extern const device_t buslogic_pci_device;
|
||||
|
||||
extern void BuslogicDeviceReset(void *p);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Emulation of SCSI fixed and removable disks.
|
||||
*
|
||||
* Version: @(#)scsi_disk.c 1.0.17 2018/03/07
|
||||
* Version: @(#)scsi_disk.c 1.0.18 2018/03/18
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
@@ -78,7 +78,7 @@ uint8_t scsi_hard_disks[16][8] = {
|
||||
|
||||
|
||||
/* Table of all SCSI commands and their flags, needed for the new disc change / not ready handler. */
|
||||
uint8_t scsi_hd_command_flags[0x100] = {
|
||||
const uint8_t scsi_hd_command_flags[0x100] = {
|
||||
IMPLEMENTED | CHECK_READY | NONDATA, /* 0x00 */
|
||||
IMPLEMENTED | ALLOW_UA | NONDATA | SCSI_ONLY, /* 0x01 */
|
||||
0,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Implementation of the NCR 5380 series of SCSI Host Adapters
|
||||
* made by NCR. These controllers were designed for the ISA bus.
|
||||
*
|
||||
* Version: @(#)scsi_ncr5380.c 1.0.11 2018/03/07
|
||||
* Version: @(#)scsi_ncr5380.c 1.0.12 2018/03/18
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
@@ -825,7 +825,7 @@ scsiat_out(uint16_t port, uint8_t val, void *priv)
|
||||
|
||||
|
||||
static void *
|
||||
ncr_init(device_t *info)
|
||||
ncr_init(const device_t *info)
|
||||
{
|
||||
char temp[128];
|
||||
ncr_t *scsi;
|
||||
@@ -948,7 +948,7 @@ scsiat_available(void)
|
||||
}
|
||||
|
||||
|
||||
static device_config_t scsiat_config[] = {
|
||||
static const device_config_t scsiat_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0310,
|
||||
{
|
||||
@@ -1045,7 +1045,7 @@ static device_config_t scsiat_config[] = {
|
||||
};
|
||||
|
||||
|
||||
device_t scsi_lcs6821n_device =
|
||||
const device_t scsi_lcs6821n_device =
|
||||
{
|
||||
"Longshine LCS-6821N",
|
||||
DEVICE_ISA,
|
||||
@@ -1056,7 +1056,7 @@ device_t scsi_lcs6821n_device =
|
||||
NULL
|
||||
};
|
||||
|
||||
device_t scsi_rt1000b_device =
|
||||
const device_t scsi_rt1000b_device =
|
||||
{
|
||||
"Ranco RT1000B",
|
||||
DEVICE_ISA,
|
||||
@@ -1067,7 +1067,7 @@ device_t scsi_rt1000b_device =
|
||||
NULL
|
||||
};
|
||||
|
||||
device_t scsi_t130b_device =
|
||||
const device_t scsi_t130b_device =
|
||||
{
|
||||
"Trantor T130B",
|
||||
DEVICE_ISA,
|
||||
@@ -1078,7 +1078,7 @@ device_t scsi_t130b_device =
|
||||
NULL
|
||||
};
|
||||
|
||||
device_t scsi_scsiat_device =
|
||||
const device_t scsi_scsiat_device =
|
||||
{
|
||||
"Sumo SCSI-AT",
|
||||
DEVICE_ISA,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* made by NCR. These controllers were designed for
|
||||
* the ISA bus.
|
||||
*
|
||||
* Version: @(#)scsi_ncr5380.c 1.0.1 2017/12/16
|
||||
* Version: @(#)scsi_ncr5380.c 1.0.2 2018/03/18
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
@@ -18,16 +18,16 @@
|
||||
*
|
||||
* Copyright 2017-2018 Sarah Walker.
|
||||
* Copyright 2017-2018 TheCollector1995.
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef SCSI_NCR5380_H
|
||||
# define SCSI_NCR5380_H
|
||||
|
||||
|
||||
extern device_t scsi_lcs6821n_device;
|
||||
extern device_t scsi_rt1000b_device;
|
||||
extern device_t scsi_t130b_device;
|
||||
extern device_t scsi_scsiat_device;
|
||||
extern const device_t scsi_lcs6821n_device;
|
||||
extern const device_t scsi_rt1000b_device;
|
||||
extern const device_t scsi_t130b_device;
|
||||
extern const device_t scsi_scsiat_device;
|
||||
|
||||
|
||||
#endif /*SCSI_NCR5380_H*/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* NCR and later Symbios and LSI. This controller was designed
|
||||
* for the PCI bus.
|
||||
*
|
||||
* Version: @(#)scsi_ncr53c810.c 1.0.9 2018/03/10
|
||||
* Version: @(#)scsi_ncr53c810.c 1.0.10 2018/03/18
|
||||
*
|
||||
* Authors: Paul Brook (QEMU)
|
||||
* Artyom Tarasenko (QEMU)
|
||||
@@ -2134,7 +2134,7 @@ ncr53c810_pci_write(int func, int addr, uint8_t val, void *p)
|
||||
|
||||
|
||||
static void *
|
||||
ncr53c810_init(device_t *info)
|
||||
ncr53c810_init(const device_t *info)
|
||||
{
|
||||
ncr53c810_t *dev;
|
||||
|
||||
@@ -2171,7 +2171,7 @@ ncr53c810_close(void *priv)
|
||||
}
|
||||
|
||||
|
||||
device_t ncr53c810_pci_device =
|
||||
const device_t ncr53c810_pci_device =
|
||||
{
|
||||
"NCR 53c810 (SCSI)",
|
||||
DEVICE_PCI,
|
||||
|
||||
@@ -10,22 +10,22 @@
|
||||
* NCR and later Symbios and LSI. This controller was designed
|
||||
* for the PCI bus.
|
||||
*
|
||||
* Version: @(#)scsi_ncr53c810.c 1.0.0 2017/12/10
|
||||
* Version: @(#)scsi_ncr53c810.c 1.0.1 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Paul Brook (QEMU),
|
||||
* Artyom Tarasenko (QEMU),
|
||||
*
|
||||
* Copyright 2006-2017 Paul Brook.
|
||||
* Copyright 2009-2017 Artyom Tarasenko.
|
||||
* Copyright 2017 Miran Grca.
|
||||
* Copyright 2006-2018 Paul Brook.
|
||||
* Copyright 2009-2018 Artyom Tarasenko.
|
||||
* Copyright 2017,2018 Miran Grca.
|
||||
*/
|
||||
#ifndef SCSI_NCR5C3810_H
|
||||
# define SCSI_NCR53C810_H
|
||||
|
||||
|
||||
extern device_t ncr53c810_pci_device;
|
||||
extern const device_t ncr53c810_pci_device;
|
||||
|
||||
|
||||
#endif /*SCSI_NCR53C810_H*/
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* series of SCSI Host Adapters made by Mylex.
|
||||
* These controllers were designed for various buses.
|
||||
*
|
||||
* Version: @(#)scsi_x54x.c 1.0.19 2018/03/09
|
||||
* Version: @(#)scsi_x54x.c 1.0.20 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -1891,7 +1891,7 @@ x54x_mem_disable(x54x_t *dev)
|
||||
|
||||
/* General initialization routine for all boards. */
|
||||
void *
|
||||
x54x_init(device_t *info)
|
||||
x54x_init(const device_t *info)
|
||||
{
|
||||
x54x_t *dev;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* of SCSI Host Adapters made by Mylex.
|
||||
* These controllers were designed for various buses.
|
||||
*
|
||||
* Version: @(#)scsi_x54x.h 1.0.5 2018/03/07
|
||||
* Version: @(#)scsi_x54x.h 1.0.6 2018/03/18
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -501,7 +501,7 @@ extern void x54x_mem_init(x54x_t *dev, uint32_t addr);
|
||||
extern void x54x_mem_enable(x54x_t *dev);
|
||||
extern void x54x_mem_set_addr(x54x_t *dev, uint32_t base);
|
||||
extern void x54x_mem_disable(x54x_t *dev);
|
||||
extern void *x54x_init(device_t *info);
|
||||
extern void *x54x_init(const device_t *info);
|
||||
extern void x54x_close(void *priv);
|
||||
extern void x54x_device_reset(void *priv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user