mirror of
https://github.com/Spritetm/minimacplus.git
synced 2024-06-02 00:41:44 +00:00
28 lines
680 B
C
28 lines
680 B
C
|
#include <stdint.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
|
||
|
static const char* const regNamesR[]={
|
||
|
"CURSCSIDATA","INITIATORCMD", "MODE", "TARGETCMD", "CURSCSISTATUS",
|
||
|
"BUSANDSTATUS", "INPUTDATA", "RESETPARINT"
|
||
|
};
|
||
|
|
||
|
static const char* const regNamesW[]={
|
||
|
"OUTDATA","INITIATORCMD", "MODE", "TARGETCMD", "SELECTENA",
|
||
|
"STARTDMASEND", "STARTDMATARRECV", "STARTDMAINITRECV"
|
||
|
};
|
||
|
|
||
|
|
||
|
unsigned int ncrRead(unsigned int addr, unsigned int dack) {
|
||
|
unsigned int ret=0;
|
||
|
|
||
|
printf("SCSI: read %s val %x (dack %d)\n", regNamesR[addr], ret, dack);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
|
||
|
void ncrWrite(unsigned int addr, unsigned int dack, unsigned int val) {
|
||
|
|
||
|
printf("SCSI: write %s val %x (dack %d)\n", regNamesW[addr], val, dack);
|
||
|
}
|