mirror of
https://github.com/simh/simh.git
synced 2026-04-18 00:48:13 +00:00
ISYS8010, ISYS8020: Latest update
This commit is contained in:
@@ -39,22 +39,27 @@ void put_mbyte(uint16 addr, uint8 val);
|
||||
void put_mword(uint16 addr, uint16 val);
|
||||
t_stat SBC_reset (DEVICE *dptr);
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern uint8 i8255_C[4]; //port C byte I/O
|
||||
|
||||
/* external function prototypes */
|
||||
|
||||
extern t_stat i8080_reset (DEVICE *dptr); /* reset the 8080 emulator */
|
||||
extern uint8 multibus_get_mbyte(uint16 addr);
|
||||
extern void multibus_put_mbyte(uint16 addr, uint8 val);
|
||||
extern t_stat i8080_reset (DEVICE *dptr); /* reset the 8080 emulator */
|
||||
extern int32 i8251_devnum;
|
||||
extern t_stat i8251_reset (DEVICE *dptr, uint16 base);
|
||||
extern int32 i8255_devnum;
|
||||
extern t_stat i8255_reset (DEVICE *dptr, uint16 base);
|
||||
extern int32 i8259_devnum;
|
||||
extern t_stat i8259_reset (DEVICE *dptr, uint16 base);
|
||||
extern uint8 EPROM_get_mbyte(uint16 addr);
|
||||
extern UNIT EPROM_unit;
|
||||
extern t_stat EPROM_reset (DEVICE *dptr, uint16 size);
|
||||
extern uint8 RAM_get_mbyte(uint16 addr);
|
||||
extern void RAM_put_mbyte(uint16 addr, uint8 val);
|
||||
extern UNIT i8255_unit;
|
||||
extern UNIT EPROM_unit;
|
||||
extern UNIT RAM_unit;
|
||||
extern t_stat i8255_reset (DEVICE *dptr, uint16 base, uint8 devnum);
|
||||
extern t_stat i8251_reset (DEVICE *dptr, uint16 base, uint8 devnum);
|
||||
extern t_stat i8259_reset (DEVICE *dptr, uint16 base, uint8 devnum);
|
||||
extern t_stat pata_reset (DEVICE *dptr, uint16 base);
|
||||
extern t_stat EPROM_reset (DEVICE *dptr, uint16 size);
|
||||
extern t_stat RAM_reset (DEVICE *dptr, uint16 base, uint16 size);
|
||||
|
||||
/* CPU reset routine
|
||||
@@ -64,10 +69,10 @@ t_stat SBC_reset (DEVICE *dptr)
|
||||
{
|
||||
sim_printf("Initializing iSBC-80/20\n");
|
||||
i8080_reset(NULL);
|
||||
i8259_reset(NULL, I8259_BASE, 0);
|
||||
i8255_reset(NULL, I8255_BASE_0, 0);
|
||||
i8255_reset(NULL, I8255_BASE_1, 1);
|
||||
i8251_reset(NULL, I8251_BASE, 0);
|
||||
i8251_reset(NULL, I8251_BASE);
|
||||
i8255_reset(NULL, I8255_BASE_0);
|
||||
i8255_reset(NULL, I8255_BASE_1);
|
||||
i8259_reset(NULL, I8259_BASE);
|
||||
EPROM_reset(NULL, ROM_SIZE);
|
||||
RAM_reset(NULL, RAM_BASE, RAM_SIZE);
|
||||
return SCPE_OK;
|
||||
@@ -78,13 +83,13 @@ t_stat SBC_reset (DEVICE *dptr)
|
||||
uint8 get_mbyte(uint16 addr)
|
||||
{
|
||||
/* if local EPROM handle it */
|
||||
if ((i8255_unit.u5 & 0x01) && /* EPROM enabled? */
|
||||
(addr >= EPROM_unit.u3) && (addr < (EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||
return EPROM_get_mbyte(addr);
|
||||
if ((ROM_DISABLE && (i8255_C[0] & 0x20)) || (ROM_DISABLE == 0)) { /* EPROM enabled */
|
||||
if ((addr >= EPROM_unit.u3) && (addr < (EPROM_unit.u3 + EPROM_unit.capac)))
|
||||
return EPROM_get_mbyte(addr);
|
||||
} /* if local RAM handle it */
|
||||
if ((i8255_unit.u5 & 0x02) && /* local RAM enabled? */
|
||||
(addr >= RAM_unit.u3) && (addr < (RAM_unit.u3 + RAM_unit.capac))) {
|
||||
return RAM_get_mbyte(addr);
|
||||
if ((RAM_DISABLE && (i8255_C[0] & 0x20)) || (RAM_DISABLE == 0)) { /* RAM enabled */
|
||||
if ((addr >= RAM_unit.u3) && (addr < (RAM_unit.u3 + RAM_unit.capac)))
|
||||
return RAM_get_mbyte(addr);
|
||||
} /* otherwise, try the multibus */
|
||||
return multibus_get_mbyte(addr);
|
||||
}
|
||||
@@ -105,15 +110,17 @@ uint16 get_mword(uint16 addr)
|
||||
void put_mbyte(uint16 addr, uint8 val)
|
||||
{
|
||||
/* if local EPROM handle it */
|
||||
if ((i8255_unit.u5 & 0x01) && /* EPROM enabled? */
|
||||
(addr >= EPROM_unit.u3) && (addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||
sim_printf("Write to R/O memory address %04X - ignored\n", addr);
|
||||
return;
|
||||
if ((ROM_DISABLE && (i8255_C[0] & 0x20)) || (ROM_DISABLE == 0)) { /* EPROM enabled */
|
||||
if ((addr >= EPROM_unit.u3) && (addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||
sim_printf("Write to R/O memory address %04X - ignored\n", addr);
|
||||
return;
|
||||
}
|
||||
} /* if local RAM handle it */
|
||||
if ((i8255_unit.u5 & 0x02) && /* local RAM enabled? */
|
||||
(addr >= RAM_unit.u3) && (addr <= (RAM_unit.u3 + RAM_unit.capac))) {
|
||||
RAM_put_mbyte(addr, val);
|
||||
return;
|
||||
if ((RAM_DISABLE && (i8255_C[0] & 0x20)) || (RAM_DISABLE == 0)) { /* RAM enabled */
|
||||
if ((addr >= RAM_unit.u3) && (addr <= (RAM_unit.u3 + RAM_unit.capac))) {
|
||||
RAM_put_mbyte(addr, val);
|
||||
return;
|
||||
}
|
||||
} /* otherwise, try the multibus */
|
||||
multibus_put_mbyte(addr, val);
|
||||
}
|
||||
@@ -37,7 +37,8 @@ extern DEVICE i8255_dev;
|
||||
extern DEVICE EPROM_dev;
|
||||
extern DEVICE RAM_dev;
|
||||
extern DEVICE multibus_dev;
|
||||
extern DEVICE isbc208_dev;
|
||||
extern DEVICE isbc201_dev;
|
||||
extern DEVICE isbc202_dev;
|
||||
extern DEVICE isbc064_dev;
|
||||
|
||||
/* SCP data structures
|
||||
@@ -64,7 +65,8 @@ DEVICE *sim_devices[] = {
|
||||
&i8255_dev,
|
||||
&multibus_dev,
|
||||
&isbc064_dev,
|
||||
&isbc208_dev,
|
||||
&isbc201_dev,
|
||||
&isbc202_dev,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@@ -30,39 +30,60 @@
|
||||
#include <ctype.h>
|
||||
#include "sim_defs.h" /* simulator defns */
|
||||
|
||||
/* set the base I/O address for the 8259 */
|
||||
#define I8259_BASE 0xD8
|
||||
#define I8259_NUM 1
|
||||
#define SET_XACK(VAL) (xack = VAL)
|
||||
|
||||
//chip definitions for the iSBC-80/20
|
||||
/* set the base I/O address for the 8251 */
|
||||
#define I8251_BASE 0xEC
|
||||
#define I8251_NUM 1
|
||||
|
||||
/* set the base I/O address for the 8255 */
|
||||
#define I8255_BASE_0 0xE4
|
||||
#define I8255_BASE_1 0xE8
|
||||
#define I8255_NUM 2
|
||||
|
||||
/* set the base I/O address for the 8251 */
|
||||
#define I8251_BASE 0xEC
|
||||
#define I8251_NUM 1
|
||||
/* set the base I/O address for the 8259 */
|
||||
#define I8259_BASE 0xD8
|
||||
#define I8259_NUM 1
|
||||
|
||||
/* set the base and size for the EPROM on the iSBC 80/20 */
|
||||
#define ROM_BASE 0x0000
|
||||
#define ROM_SIZE 0x1000
|
||||
#define ROM_DISABLE 1
|
||||
|
||||
/* set the base and size for the RAM on the iSBC 80/20 */
|
||||
#define RAM_BASE 0x3C00
|
||||
#define RAM_SIZE 0x0400
|
||||
#define RAM_DISABLE 1
|
||||
|
||||
/* set INTR for CPU */
|
||||
#define INTR INT_1
|
||||
|
||||
//board definitions for the multibus
|
||||
/* set the base I/O address for the iSBC 201 */
|
||||
#define SBC201_BASE 0x78
|
||||
#define SBC201_INT INT_1
|
||||
#define SBC201_NUM 0
|
||||
|
||||
/* set the base I/O address for the iSBC 202 */
|
||||
#define SBC202_BASE 0x78
|
||||
#define SBC202_INT INT_1
|
||||
#define SBC202_NUM 1
|
||||
|
||||
/* set the base I/O address for the iSBC 208 */
|
||||
#define SBC208_BASE 0x40
|
||||
|
||||
/* configure interrupt request line */
|
||||
#define SBC208_INT INT_1
|
||||
#define SBC208_NUM 0
|
||||
|
||||
/* set the base for the zx-200a disk controller */
|
||||
#define ZX200A_BASE_DD 0x78
|
||||
#define ZX200A_BASE_SD 0x88
|
||||
#define ZX200A_NUM 0
|
||||
|
||||
/* set the base and size for the iSBC 064 */
|
||||
#define SBC064_BASE 0x0000
|
||||
#define SBC064_SIZE 0x10000
|
||||
#define SBC064_NUM 1
|
||||
|
||||
/* multibus interrupt definitions */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user