PIC rewrite, proper SMRAM API, complete SiS 471 rewrite and addition of 40x, 460, and 461, changes to mem.c/h, disabled Voodoo memory dumping on exit, bumped SDL Hardware scale quality to 2, bumped IDE/ATAPI drives to ATA-6, finally bumped emulator version to 3.0, redid the bus type ID's to allow for planned ATAPI hard disks, made SST flash set its high mappings to the correct address if the CPU is 16-bit, and added the SiS 401 AMI 486 Clone, AOpen Vi15G, and the Soyo 4SA2 (486 with SiS 496/497 that can boot from CD-ROM), assorted 286+ protected mode fixes (for slightly more accuracy), and fixes to 808x emulation (MS Word 1.0 and 1.10 for DOS now work correctly from floppy).
2020-10-14 23:15:01 +02:00
|
|
|
/*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the 86Box distribution.
|
|
|
|
|
*
|
|
|
|
|
* Definitions for the SMRAM interface.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2016-2020 Miran Grca.
|
|
|
|
|
*/
|
|
|
|
|
#ifndef EMU_SMRAM_H
|
|
|
|
|
# define EMU_SMRAM_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _smram_
|
|
|
|
|
{
|
|
|
|
|
struct _smram_ *prev, *next;
|
|
|
|
|
|
|
|
|
|
mem_mapping_t mapping;
|
|
|
|
|
|
|
|
|
|
uint32_t host_base, ram_base,
|
|
|
|
|
size,
|
|
|
|
|
old_host_base, old_size;
|
|
|
|
|
} smram_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Make a backup copy of host_base and size of all the SMRAM structs, needed so that if
|
|
|
|
|
the SMRAM mappings change while in SMM, they will be recalculated on return. */
|
|
|
|
|
extern void smram_backup_all(void);
|
|
|
|
|
/* Recalculate any mappings, including the backup if returning from SMM. */
|
|
|
|
|
extern void smram_recalc_all(int ret);
|
|
|
|
|
/* Delete a SMRAM mapping. */
|
|
|
|
|
extern void smram_del(smram_t *smr);
|
|
|
|
|
/* Add a SMRAM mapping. */
|
|
|
|
|
extern smram_t *smram_add(void);
|
|
|
|
|
/* Set memory state in the specified model (normal or SMM) according to the specified flags. */
|
|
|
|
|
extern void smram_map(int smm, uint32_t addr, uint32_t size, int is_smram);
|
|
|
|
|
/* Disable a specific SMRAM mapping. */
|
|
|
|
|
extern void smram_disable(smram_t *smr);
|
|
|
|
|
/* Disable all SMRAM mappings. */
|
|
|
|
|
extern void smram_disable_all(void);
|
|
|
|
|
/* Enable SMRAM mappings according to flags for both normal and SMM modes. */
|
|
|
|
|
extern void smram_enable(smram_t *smr, uint32_t host_base, uint32_t ram_base, uint32_t size,
|
|
|
|
|
int flags_normal, int flags_smm);
|
|
|
|
|
/* Checks if a SMRAM mapping is enabled or not. */
|
|
|
|
|
extern int smram_enabled(smram_t *smr);
|
|
|
|
|
/* Changes the SMRAM state. */
|
|
|
|
|
extern void smram_state_change(smram_t *smr, int smm, int flags);
|
2021-10-09 17:37:09 +02:00
|
|
|
/* Enables or disables the use of a separate SMRAM for addresses below A0000. */
|
|
|
|
|
extern void smram_set_separate_smram(uint8_t set);
|
PIC rewrite, proper SMRAM API, complete SiS 471 rewrite and addition of 40x, 460, and 461, changes to mem.c/h, disabled Voodoo memory dumping on exit, bumped SDL Hardware scale quality to 2, bumped IDE/ATAPI drives to ATA-6, finally bumped emulator version to 3.0, redid the bus type ID's to allow for planned ATAPI hard disks, made SST flash set its high mappings to the correct address if the CPU is 16-bit, and added the SiS 401 AMI 486 Clone, AOpen Vi15G, and the Soyo 4SA2 (486 with SiS 496/497 that can boot from CD-ROM), assorted 286+ protected mode fixes (for slightly more accuracy), and fixes to 808x emulation (MS Word 1.0 and 1.10 for DOS now work correctly from floppy).
2020-10-14 23:15:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /*EMU_SMRAM_H*/
|