1
0
mirror of https://github.com/simh/simh.git synced 2026-04-25 03:34:34 +00:00

AltairZ80: Improved resource mapping diagnostics.

This commit is contained in:
Peter Schorn
2020-05-27 10:30:47 +02:00
parent b9297e185f
commit f8a1e56637
30 changed files with 339 additions and 413 deletions

View File

@@ -52,7 +52,7 @@
extern int32 sio0s(const int32 port, const int32 io, const int32 data);
extern int32 sio0d(const int32 port, const int32 io, const int32 data);
extern uint32 sim_map_resource(uint32 baseaddr, uint32 size, uint32 resource_type,
int32 (*routine)(const int32, const int32, const int32), uint8 unmap);
int32 (*routine)(const int32, const int32, const int32), const char* name, uint8 unmap);
static char ansibuf[32];
@@ -145,17 +145,17 @@ static t_stat fw2_attach(UNIT *uptr, CONST char *cptr)
fw2_info[i]->uptr = uptr;
fw2_info[i]->uptr->u3 = baseaddr;
if(sim_map_resource(baseaddr, FW2_CAPACITY, RESOURCE_TYPE_MEMORY, &fw2dev, FALSE) != 0) {
if(sim_map_resource(baseaddr, FW2_CAPACITY, RESOURCE_TYPE_MEMORY, &fw2dev, "fw2dev", FALSE) != 0) {
sim_printf("%s: error mapping MEM resource at 0x%04x\n", __FUNCTION__, baseaddr);
return SCPE_ARG;
}
if(sim_map_resource(0x00, 1, RESOURCE_TYPE_IO, &sio0s, FALSE) != 0) {
if(sim_map_resource(0x00, 1, RESOURCE_TYPE_IO, &sio0s, "sio0s", FALSE) != 0) {
sim_printf("%s: error mapping I/O resource at 0x%04x\n", __FUNCTION__, 0x00);
return SCPE_ARG;
}
if(sim_map_resource(0x01, 1, RESOURCE_TYPE_IO, &sio0d, FALSE) != 0) {
if(sim_map_resource(0x01, 1, RESOURCE_TYPE_IO, &sio0d, "sio0d", FALSE) != 0) {
sim_printf("%s: error mapping I/O resource at 0x%04x\n", __FUNCTION__, 0x01);
return SCPE_ARG;
}
@@ -187,9 +187,9 @@ static t_stat fw2_detach(UNIT *uptr)
return SCPE_ARG;
/* Disconnect FlashWriter2: unmap memory and I/O resources */
sim_map_resource(fw2_info[i]->uptr->u3, FW2_CAPACITY, RESOURCE_TYPE_MEMORY, &fw2dev, TRUE);
sim_map_resource(0x00, 1, RESOURCE_TYPE_IO, &sio0s, TRUE);
sim_map_resource(0x01, 1, RESOURCE_TYPE_IO, &sio0d, TRUE);
sim_map_resource(fw2_info[i]->uptr->u3, FW2_CAPACITY, RESOURCE_TYPE_MEMORY, &fw2dev, "fw2dev", TRUE);
sim_map_resource(0x00, 1, RESOURCE_TYPE_IO, &sio0s, "sio0s", TRUE);
sim_map_resource(0x01, 1, RESOURCE_TYPE_IO, &sio0d, "sio0d", TRUE);
if(fw2_info[i]) {
free(fw2_info[i]);