Vastly overhauled the UI, there's now a completely new Settings dialog as well as a status bar with disk activity icons and removable drive menus;
Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process; Applied all mainline PCem commits; Added SCSI hard disk emulation; Commented out all unfinished machines and graphics cards; Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995); Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995); Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995); Added Microsoft/Logitech Bus Mouse emulation (patch from waltje); Overhauled the makefiles (patch from waltje); Added the Adaptec AHA-1542CF SCSI controller (patch from waltje); Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje); Added an ISABugger debugging device (patch from waltje); Added sanity checks to the Direct3D code.
This commit is contained in:
25
src/rom.c
25
src/rom.c
@@ -3,10 +3,12 @@
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "ibm.h"
|
||||
#include "mem.h"
|
||||
#include "rom.h"
|
||||
|
||||
|
||||
FILE *romfopen(char *fn, char *mode)
|
||||
{
|
||||
char s[512];
|
||||
@@ -16,6 +18,7 @@ FILE *romfopen(char *fn, char *mode)
|
||||
return fopen(s, mode);
|
||||
}
|
||||
|
||||
|
||||
int rom_present(char *fn)
|
||||
{
|
||||
FILE *f;
|
||||
@@ -33,25 +36,40 @@ int rom_present(char *fn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static uint8_t rom_read(uint32_t addr, void *p)
|
||||
{
|
||||
rom_t *rom = (rom_t *)p;
|
||||
// pclog("rom_read : %08x %08x %02x\n", addr, rom->mask, rom->rom[addr & rom->mask]);
|
||||
#ifdef ROM_TRACE
|
||||
if (rom->mapping.base==ROM_TRACE)
|
||||
pclog("ROM: read byte from BIOS at %06lX\n", addr);
|
||||
#endif
|
||||
return rom->rom[addr & rom->mask];
|
||||
}
|
||||
|
||||
|
||||
uint16_t rom_readw(uint32_t addr, void *p)
|
||||
{
|
||||
rom_t *rom = (rom_t *)p;
|
||||
// pclog("rom_readw: %08x %08x %04x\n", addr, rom->mask, *(uint16_t *)&rom->rom[addr & rom->mask]);
|
||||
#ifdef ROM_TRACE
|
||||
if (rom->mapping.base==ROM_TRACE)
|
||||
pclog("ROM: read word from BIOS at %06lX\n", addr);
|
||||
#endif
|
||||
return *(uint16_t *)&rom->rom[addr & rom->mask];
|
||||
}
|
||||
|
||||
|
||||
uint32_t rom_readl(uint32_t addr, void *p)
|
||||
{
|
||||
rom_t *rom = (rom_t *)p;
|
||||
// pclog("rom_readl: %08x %08x %08x\n", addr, rom->mask, *(uint32_t *)&rom->rom[addr & rom->mask]);
|
||||
#ifdef ROM_TRACE
|
||||
if (rom->mapping.base==ROM_TRACE)
|
||||
pclog("ROM: read long from BIOS at %06lX\n", addr);
|
||||
#endif
|
||||
return *(uint32_t *)&rom->rom[addr & rom->mask];
|
||||
}
|
||||
|
||||
|
||||
int rom_init(rom_t *rom, char *fn, uint32_t address, int size, int mask, int file_offset, uint32_t flags)
|
||||
{
|
||||
FILE *f = romfopen(fn, "rb");
|
||||
@@ -82,6 +100,7 @@ int rom_init(rom_t *rom, char *fn, uint32_t address, int size, int mask, int fil
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int rom_init_interleaved(rom_t *rom, char *fn_low, char *fn_high, uint32_t address, int size, int mask, int file_offset, uint32_t flags)
|
||||
{
|
||||
FILE *f_low = romfopen(fn_low, "rb");
|
||||
|
||||
Reference in New Issue
Block a user