Removed all model-based one-line header files and moved their info to model.h. Added static to handler functions where needed.
This commit is contained in:
26
src/i430vx.c
26
src/i430vx.c
@@ -8,25 +8,26 @@
|
||||
*
|
||||
* Implementation of the Intel 430VX PCISet chip.
|
||||
*
|
||||
* Version: @(#)i430vx.c 1.0.1 2017/06/02
|
||||
* Version: @(#)i430vx.c 1.0.2 2017/06/17
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "ibm.h"
|
||||
#include "cpu/cpu.h"
|
||||
#include "io.h"
|
||||
#include "mem.h"
|
||||
#include "pci.h"
|
||||
#include "device.h"
|
||||
#include "model.h"
|
||||
|
||||
#include "i430vx.h"
|
||||
|
||||
static uint8_t card_i430vx[256];
|
||||
|
||||
|
||||
static void i430vx_map(uint32_t addr, uint32_t size, int state)
|
||||
{
|
||||
switch (state & 3)
|
||||
@@ -47,7 +48,8 @@ static void i430vx_map(uint32_t addr, uint32_t size, int state)
|
||||
flushmmucache_nopc();
|
||||
}
|
||||
|
||||
void i430vx_write(int func, int addr, uint8_t val, void *priv)
|
||||
|
||||
static void i430vx_write(int func, int addr, uint8_t val, void *priv)
|
||||
{
|
||||
if (func)
|
||||
return;
|
||||
@@ -129,7 +131,8 @@ void i430vx_write(int func, int addr, uint8_t val, void *priv)
|
||||
card_i430vx[addr] = val;
|
||||
}
|
||||
|
||||
uint8_t i430vx_read(int func, int addr, void *priv)
|
||||
|
||||
static uint8_t i430vx_read(int func, int addr, void *priv)
|
||||
{
|
||||
if (func)
|
||||
return 0xff;
|
||||
@@ -137,7 +140,8 @@ uint8_t i430vx_read(int func, int addr, void *priv)
|
||||
return card_i430vx[addr];
|
||||
}
|
||||
|
||||
void i430vx_reset(void)
|
||||
|
||||
static void i430vx_reset(void)
|
||||
{
|
||||
memset(card_i430vx, 0, 256);
|
||||
card_i430vx[0x00] = 0x86; card_i430vx[0x01] = 0x80; /*Intel*/
|
||||
@@ -159,12 +163,14 @@ void i430vx_reset(void)
|
||||
card_i430vx[0x78] = 0x23;
|
||||
}
|
||||
|
||||
void i430vx_pci_reset(void)
|
||||
|
||||
static void i430vx_pci_reset(void)
|
||||
{
|
||||
i430vx_write(0, 0x59, 0x00, NULL);
|
||||
}
|
||||
|
||||
void i430vx_init()
|
||||
|
||||
void i430vx_init(void)
|
||||
{
|
||||
pci_add_specific(0, i430vx_read, i430vx_write, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user