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/i430hx.c
26
src/i430hx.c
@@ -8,25 +8,26 @@
|
||||
*
|
||||
* Implementation of the Intel 430HX PCISet chip.
|
||||
*
|
||||
* Version: @(#)i430hx.c 1.0.0 2017/05/30
|
||||
* Version: @(#)i430hx.c 1.0.1 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 "i430hx.h"
|
||||
|
||||
static uint8_t card_i430hx[256];
|
||||
|
||||
|
||||
static void i430hx_map(uint32_t addr, uint32_t size, int state)
|
||||
{
|
||||
switch (state & 3)
|
||||
@@ -47,7 +48,8 @@ static void i430hx_map(uint32_t addr, uint32_t size, int state)
|
||||
flushmmucache_nopc();
|
||||
}
|
||||
|
||||
void i430hx_write(int func, int addr, uint8_t val, void *priv)
|
||||
|
||||
static void i430hx_write(int func, int addr, uint8_t val, void *priv)
|
||||
{
|
||||
if (func)
|
||||
return;
|
||||
@@ -126,7 +128,8 @@ void i430hx_write(int func, int addr, uint8_t val, void *priv)
|
||||
card_i430hx[addr] = val;
|
||||
}
|
||||
|
||||
uint8_t i430hx_read(int func, int addr, void *priv)
|
||||
|
||||
static uint8_t i430hx_read(int func, int addr, void *priv)
|
||||
{
|
||||
if (func)
|
||||
return 0xff;
|
||||
@@ -134,7 +137,8 @@ uint8_t i430hx_read(int func, int addr, void *priv)
|
||||
return card_i430hx[addr];
|
||||
}
|
||||
|
||||
void i430hx_reset(void)
|
||||
|
||||
static void i430hx_reset(void)
|
||||
{
|
||||
memset(card_i430hx, 0, 256);
|
||||
card_i430hx[0x00] = 0x86; card_i430hx[0x01] = 0x80; /*Intel*/
|
||||
@@ -156,12 +160,14 @@ void i430hx_reset(void)
|
||||
card_i430hx[0x72] = 0x02;
|
||||
}
|
||||
|
||||
void i430hx_pci_reset(void)
|
||||
|
||||
static void i430hx_pci_reset(void)
|
||||
{
|
||||
i430hx_write(0, 0x59, 0x00, NULL);
|
||||
}
|
||||
|
||||
void i430hx_init()
|
||||
|
||||
void i430hx_init(void)
|
||||
{
|
||||
pci_add_specific(0, i430hx_read, i430hx_write, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user