MonsterCommit(tm) with typo-fixes, void-ness fixes, correct CaPs for directories, etc. No real code changes.
This commit is contained in:
19
src/sio.c
19
src/sio.c
@@ -6,16 +6,14 @@
|
||||
*
|
||||
* Emulation of Intel System I/O PCI chip.
|
||||
*
|
||||
* Version: @(#)sio.c 1.0.1 2017/06/02
|
||||
* Version: @(#)sio.c 1.0.2 2017/08/23
|
||||
*
|
||||
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "ibm.h"
|
||||
#include "cdrom.h"
|
||||
#include "disc.h"
|
||||
@@ -26,11 +24,12 @@
|
||||
#include "io.h"
|
||||
#include "mem.h"
|
||||
#include "pci.h"
|
||||
|
||||
#include "sio.h"
|
||||
|
||||
|
||||
static uint8_t card_sio[256];
|
||||
|
||||
|
||||
void sio_write(int func, int addr, uint8_t val, void *priv)
|
||||
{
|
||||
if (func > 0)
|
||||
@@ -120,6 +119,7 @@ void sio_write(int func, int addr, uint8_t val, void *priv)
|
||||
card_sio[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
uint8_t sio_read(int func, int addr, void *priv)
|
||||
{
|
||||
if (func > 0)
|
||||
@@ -128,13 +128,16 @@ uint8_t sio_read(int func, int addr, void *priv)
|
||||
return card_sio[addr];
|
||||
}
|
||||
|
||||
|
||||
static int trc_reg = 0;
|
||||
|
||||
|
||||
uint8_t trc_read(uint16_t port, void *priv)
|
||||
{
|
||||
return trc_reg & 0xfb;
|
||||
}
|
||||
|
||||
|
||||
void trc_reset(uint8_t val)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -175,6 +178,7 @@ void trc_reset(uint8_t val)
|
||||
resetx86();
|
||||
}
|
||||
|
||||
|
||||
void trc_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
pclog("TRC Write: %02X\n", val);
|
||||
@@ -185,6 +189,7 @@ void trc_write(uint16_t port, uint8_t val, void *priv)
|
||||
trc_reg = val & 0xfd;
|
||||
}
|
||||
|
||||
|
||||
void trc_init(void)
|
||||
{
|
||||
trc_reg = 0;
|
||||
@@ -192,6 +197,7 @@ void trc_init(void)
|
||||
io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
void sio_reset(void)
|
||||
{
|
||||
memset(card_sio, 0, 256);
|
||||
@@ -216,6 +222,7 @@ void sio_reset(void)
|
||||
card_sio[0xa8] = 0x0f;
|
||||
}
|
||||
|
||||
|
||||
void sio_init(int card, int pci_a, int pci_b, int pci_c, int pci_d)
|
||||
{
|
||||
pci_add_specific(card, sio_read, sio_write, NULL);
|
||||
|
||||
Reference in New Issue
Block a user