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:
21
src/ps1.c
21
src/ps1.c
@@ -2,25 +2,30 @@
|
||||
see COPYING for more details
|
||||
*/
|
||||
#include "ibm.h"
|
||||
#include "cpu/cpu.h"
|
||||
#include "io.h"
|
||||
#include "mem.h"
|
||||
#include "ps1.h"
|
||||
#include "rom.h"
|
||||
#include "device.h"
|
||||
#include "model.h"
|
||||
#include "lpt.h"
|
||||
#include "serial.h"
|
||||
|
||||
|
||||
static rom_t ps1_high_rom;
|
||||
static uint8_t ps1_92, ps1_94, ps1_102, ps1_103, ps1_104, ps1_105, ps1_190;
|
||||
static int ps1_e0_addr;
|
||||
static uint8_t ps1_e0_regs[256];
|
||||
|
||||
|
||||
static struct
|
||||
{
|
||||
uint8_t status, int_status;
|
||||
uint8_t attention, ctrl;
|
||||
} ps1_hd;
|
||||
|
||||
uint8_t ps1_read(uint16_t port, void *p)
|
||||
|
||||
static uint8_t ps1_read(uint16_t port, void *p)
|
||||
{
|
||||
uint8_t temp;
|
||||
|
||||
@@ -59,7 +64,8 @@ uint8_t ps1_read(uint16_t port, void *p)
|
||||
return temp;
|
||||
}
|
||||
|
||||
void ps1_write(uint16_t port, uint8_t val, void *p)
|
||||
|
||||
static void ps1_write(uint16_t port, uint8_t val, void *p)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@@ -120,7 +126,8 @@ void ps1_write(uint16_t port, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
void ps1mb_init()
|
||||
|
||||
void ps1mb_init(void)
|
||||
{
|
||||
io_sethandler(0x0091, 0x0001, ps1_read, NULL, NULL, ps1_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0092, 0x0001, ps1_read, NULL, NULL, ps1_write, NULL, NULL, NULL);
|
||||
@@ -207,7 +214,7 @@ static uint8_t ps1_m2121_read(uint16_t port, void *p)
|
||||
return temp;
|
||||
}
|
||||
|
||||
static void ps1_m2121_recalc_memory()
|
||||
static void ps1_m2121_recalc_memory(void)
|
||||
{
|
||||
/*Enable first 512kb*/
|
||||
mem_set_mem_state(0x00000, 0x80000, (ps1_e0_regs[0] & 0x01) ? (MEM_READ_INTERNAL | MEM_WRITE_INTERNAL) : (MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL));
|
||||
@@ -277,7 +284,7 @@ void ps1_m2121_write(uint16_t port, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
void ps1mb_m2121_init()
|
||||
void ps1mb_m2121_init(void)
|
||||
{
|
||||
io_sethandler(0x0091, 0x0001, ps1_m2121_read, NULL, NULL, ps1_m2121_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0092, 0x0001, ps1_m2121_read, NULL, NULL, ps1_m2121_write, NULL, NULL, NULL);
|
||||
@@ -300,7 +307,7 @@ void ps1mb_m2121_init()
|
||||
mem_remap_top_384k();
|
||||
}
|
||||
|
||||
void ps1mb_m2133_init()
|
||||
void ps1mb_m2133_init(void)
|
||||
{
|
||||
io_sethandler(0x0091, 0x0001, ps1_m2121_read, NULL, NULL, ps1_m2121_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0092, 0x0001, ps1_m2121_read, NULL, NULL, ps1_m2121_write, NULL, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user