Skip to content

Commit 60a8a2d

Browse files
pscomarkpizz
authored andcommitted
AltairZ80: Fixed device descriptions for all devices.
1 parent 5fc2207 commit 60a8a2d

26 files changed

+195
-49
lines changed

AltairZ80/altairz80_cpu.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ static t_stat sim_instr_mmu(void);
180180
static uint32 GetBYTE(register uint32 Addr);
181181
static void PutWORD(register uint32 Addr, const register uint32 Value);
182182
static void PutBYTE(register uint32 Addr, const register uint32 Value);
183+
static const char* cpu_description(DEVICE *dptr);
183184
void out(const uint32 Port, const uint32 Value);
184185
uint32 in(const uint32 Port);
185186
void altairz80_init(void);
@@ -447,6 +448,10 @@ REG cpu_reg[] = {
447448
{ NULL }
448449
};
449450

451+
static const char* cpu_description(DEVICE *dptr) {
452+
return "Central Processing Unit";
453+
}
454+
450455
static MTAB cpu_mod[] = {
451456
{ MTAB_XTD | MTAB_VDV, CHIP_TYPE_8080, NULL, "8080", &cpu_set_chiptype,
452457
NULL, NULL, "Chooses 8080 CPU"},
@@ -544,7 +549,7 @@ DEVICE cpu_dev = {
544549
&cpu_ex, &cpu_dep, &cpu_reset,
545550
NULL, NULL, NULL,
546551
NULL, DEV_DEBUG, 0,
547-
cpu_dt, NULL, NULL
552+
cpu_dt, NULL, NULL, NULL, NULL, NULL, &cpu_description
548553
};
549554

550555
/* This is the I/O configuration table. There are 255 possible

AltairZ80/altairz80_dsk.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ int32 dsk12(const int32 port, const int32 io, const int32 data);
164164
static t_stat dsk_boot(int32 unitno, DEVICE *dptr);
165165
static t_stat dsk_reset(DEVICE *dptr);
166166
static t_stat dsk_attach(UNIT *uptr, char *cptr);
167+
static const char* dsk_description(DEVICE *dptr);
167168

168169
extern UNIT cpu_unit;
169170
extern uint32 PCX;
@@ -333,7 +334,11 @@ static REG dsk_reg[] = {
333334
{ NULL }
334335
};
335336

336-
#define DSK_NAME "Altair Floppy Disk DSK"
337+
#define DSK_NAME "Altair Floppy Disk"
338+
339+
static const char* dsk_description(DEVICE *dptr) {
340+
return DSK_NAME;
341+
}
337342

338343
static MTAB dsk_mod[] = {
339344
{ UNIT_DSK_WLK, 0, "WRTENB", "WRTENB", NULL, NULL, NULL,
@@ -361,7 +366,7 @@ DEVICE dsk_dev = {
361366
NULL, NULL, &dsk_reset,
362367
&dsk_boot, &dsk_attach, NULL,
363368
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
364-
dsk_dt, NULL, DSK_NAME
369+
dsk_dt, NULL, NULL, NULL, NULL, NULL, &dsk_description
365370
};
366371

367372
static char* selectInOut(const int32 io) {

AltairZ80/altairz80_hdsk.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ extern int32 find_unit_index(UNIT *uptr);
8686

8787
static t_stat hdsk_boot(int32 unitno, DEVICE *dptr);
8888
int32 hdsk_io(const int32 port, const int32 io, const int32 data);
89+
static const char* hdsk_description(DEVICE *dptr);
8990

9091
static int32 hdskLastCommand = HDSK_NONE;
9192
static int32 hdskCommandPosition = 0;
@@ -331,7 +332,11 @@ static REG hdsk_reg[] = {
331332
{ NULL }
332333
};
333334

334-
#define HDSK_NAME "Hard Disk HDSK"
335+
#define HDSK_NAME "Hard Disk"
336+
337+
static const char* hdsk_description(DEVICE *dptr) {
338+
return HDSK_NAME;
339+
}
335340

336341
static MTAB hdsk_mod[] = {
337342
{ MTAB_XTD|MTAB_VDV, 0, "IOBASE", "IOBASE",
@@ -361,7 +366,7 @@ DEVICE hdsk_dev = {
361366
NULL, NULL, &hdsk_reset,
362367
&hdsk_boot, &hdsk_attach, &hdsk_detach,
363368
&hdsk_info_data, (DEV_DISABLE | DEV_DEBUG), 0,
364-
hdsk_dt, NULL, "Hard Disk HDSK"
369+
hdsk_dt, NULL, NULL, NULL, NULL, NULL, &hdsk_description
365370
};
366371

367372
/* Reset routine */

AltairZ80/altairz80_mhdsk.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static t_stat dsk_reset(DEVICE *dptr);
165165
static char* cmdTranslate(const int32 cmd);
166166
extern uint32 sim_map_resource(uint32 baseaddr, uint32 size, uint32 resource_type,
167167
int32 (*routine)(const int32, const int32, const int32), uint8 unmap);
168+
static const char* mhdsk_description(DEVICE *dptr);
168169

169170
/* 88DSK Standard I/O Data Structures */
170171

@@ -178,7 +179,11 @@ static UNIT dsk_unit[] = {
178179
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, HDSK_CAPACITY) },
179180
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, HDSK_CAPACITY) }};
180181

181-
#define MHDSK_NAME "MITS Hard Disk MHDSK"
182+
#define MHDSK_NAME "MITS Hard Disk"
183+
184+
static const char* mhdsk_description(DEVICE *dptr) {
185+
return MHDSK_NAME;
186+
}
182187

183188
static MTAB dsk_mod[] = {
184189
{ UNIT_DSK_WLK, 0, "WRTENB", "WRTENB", NULL, NULL, NULL,
@@ -202,7 +207,7 @@ DEVICE mhdsk_dev = {
202207
NULL, NULL, &dsk_reset,
203208
&mhdsk_boot, NULL, NULL,
204209
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
205-
mhdsk_dt, NULL, MHDSK_NAME
210+
mhdsk_dt, NULL, NULL, NULL, NULL, NULL, &mhdsk_description
206211
};
207212

208213
static int32 bootrom_mhdsk[BOOTROM_SIZE_MHDSK] = {

AltairZ80/altairz80_net.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static t_stat net_svc (UNIT *uptr);
4747
static t_stat set_net (UNIT *uptr, int32 value, char *cptr, void *desc);
4848
int32 netStatus (const int32 port, const int32 io, const int32 data);
4949
int32 netData (const int32 port, const int32 io, const int32 data);
50+
static const char* net_description(DEVICE *dptr);
5051

5152
extern uint32 sim_map_resource(uint32 baseaddr, uint32 size, uint32 resource_type,
5253
int32 (*routine)(const int32, const int32, const int32), uint8 unmap);
@@ -88,6 +89,10 @@ static REG net_reg[] = {
8889
{ NULL }
8990
};
9091

92+
static const char* net_description(DEVICE *dptr) {
93+
return "Network";
94+
}
95+
9196
static MTAB net_mod[] = {
9297
{ UNIT_SERVER, 0, "CLIENT", "CLIENT", &set_net, NULL, NULL,
9398
"Sets machine to client mode"}, /* machine is a client */
@@ -111,7 +116,7 @@ DEVICE net_dev = {
111116
NULL, NULL, &net_reset,
112117
NULL, &net_attach, &net_detach,
113118
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
114-
net_dt, NULL, "Network NET"
119+
net_dt, NULL, NULL, NULL, NULL, NULL, &net_description
115120
};
116121

117122
static t_stat set_net(UNIT *uptr, int32 value, char *cptr, void *desc) {

AltairZ80/altairz80_sio.c

+24-4
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ static t_stat sio_dev_set_interruptoff(UNIT *uptr, int32 value, char *cptr, void
140140
static t_stat sio_svc(UNIT *uptr);
141141
static t_stat simh_dev_reset(DEVICE *dptr);
142142
static t_stat simh_svc(UNIT *uptr);
143+
static const char* sio_description(DEVICE *dptr);
144+
static const char* simh_description(DEVICE *dptr);
145+
static const char* ptr_description(DEVICE *dptr);
146+
static const char* ptp_description(DEVICE *dptr);
143147
static void mapAltairPorts(void);
144148
int32 nulldev (const int32 port, const int32 io, const int32 data);
145149
int32 sr_dev (const int32 port, const int32 io, const int32 data);
@@ -347,13 +351,17 @@ static MTAB sio_mod[] = {
347351
{ 0 }
348352
};
349353

354+
static const char* sio_description(DEVICE *dptr) {
355+
return "Serial Input Output";
356+
}
357+
350358
DEVICE sio_dev = {
351359
"SIO", &sio_unit, sio_reg, sio_mod,
352360
1, 10, 31, 1, 8, 8,
353361
NULL, NULL, &sio_reset,
354362
NULL, &sio_attach, &sio_detach,
355363
NULL, DEV_DEBUG | DEV_MUX, 0,
356-
generic_dt, NULL, "Serial Input Output SIO"
364+
generic_dt, NULL, NULL, NULL, NULL, NULL, &sio_description
357365
};
358366

359367
static MTAB ptpptr_mod[] = {
@@ -369,26 +377,34 @@ static REG ptr_reg[] = {
369377
{ NULL }
370378
};
371379

380+
static const char* ptr_description(DEVICE *dptr) {
381+
return "Paper Tape Reader";
382+
}
383+
372384
DEVICE ptr_dev = {
373385
"PTR", &ptr_unit, ptr_reg, ptpptr_mod,
374386
1, 10, 31, 1, 8, 8,
375387
NULL, NULL, &ptr_reset,
376388
NULL, NULL, NULL,
377389
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
378-
generic_dt, NULL, "Paper Tape Reader PTR"
390+
generic_dt, NULL, NULL, NULL, NULL, NULL, &ptr_description
379391
};
380392

381393
static UNIT ptp_unit = {
382394
UDATA (NULL, UNIT_ATTABLE, 0)
383395
};
384396

397+
static const char* ptp_description(DEVICE *dptr) {
398+
return "Paper Tape Puncher";
399+
}
400+
385401
DEVICE ptp_dev = {
386402
"PTP", &ptp_unit, NULL, ptpptr_mod,
387403
1, 10, 31, 1, 8, 8,
388404
NULL, NULL, &ptp_reset,
389405
NULL, NULL, NULL,
390406
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
391-
generic_dt, NULL, "Paper Tape Puncher PTP"
407+
generic_dt, NULL, NULL, NULL, NULL, NULL, &ptp_description
392408
};
393409

394410
/* Synthetic device SIMH for communication
@@ -465,13 +481,17 @@ static MTAB simh_mod[] = {
465481
{ 0 }
466482
};
467483

484+
const char* simh_description(DEVICE *dptr) {
485+
return "Pseudo Device";
486+
}
487+
468488
DEVICE simh_device = {
469489
"SIMH", &simh_unit, simh_reg, simh_mod,
470490
1, 10, 31, 1, 16, 4,
471491
NULL, NULL, &simh_dev_reset,
472492
NULL, NULL, NULL,
473493
NULL, (DEV_DISABLE | DEV_DEBUG), 0,
474-
generic_dt, NULL, "Pseudo Device SIMH"
494+
generic_dt, NULL, NULL, NULL, NULL, NULL, &simh_description
475495
};
476496

477497
static void resetSIOWarningFlags(void) {

AltairZ80/flashwriter2.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ static t_stat fw2_detach(UNIT *uptr);
8080
static uint8 FW2_Read(const uint32 Addr);
8181
static uint8 FW2_Write(const uint32 Addr, uint8 cData);
8282
static t_stat get_base_address(char *cptr, uint32 *baseaddr);
83+
static const char* fw2_description(DEVICE *dptr);
8384

8485
static UNIT fw2_unit[] = {
8586
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, FW2_CAPACITY) },
@@ -88,7 +89,11 @@ static UNIT fw2_unit[] = {
8889
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, FW2_CAPACITY) }
8990
};
9091

91-
#define FWII_NAME "Vector Graphic Flashwriter 2 FWII"
92+
#define FWII_NAME "Vector Graphic Flashwriter 2"
93+
94+
static const char* fw2_description(DEVICE *dptr) {
95+
return FWII_NAME;
96+
}
9297

9398
static MTAB fw2_mod[] = {
9499
/* quiet, no warning messages */
@@ -106,7 +111,7 @@ DEVICE fw2_dev = {
106111
NULL, NULL, NULL,
107112
NULL, &fw2_attach, &fw2_detach,
108113
NULL, (DEV_DISABLE | DEV_DIS), 0,
109-
NULL, NULL, FWII_NAME
114+
NULL, NULL, NULL, NULL, NULL, NULL, &fw2_description
110115
};
111116

112117
/* Attach routine */

AltairZ80/i8272.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static void raise_i8272_interrupt(void);
176176
static int32 i8272dev(const int32 port, const int32 io, const int32 data);
177177
static t_stat i8272_reset(DEVICE *dptr);
178178
int32 find_unit_index (UNIT *uptr);
179+
static const char* i8272_description(DEVICE *dptr);
179180

180181
I8272_INFO i8272_info_data = { { 0x0, 0, 0xC0, 2 } };
181182
I8272_INFO *i8272_info = &i8272_info_data;
@@ -189,7 +190,11 @@ static UNIT i8272_unit[] = {
189190
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, I8272_CAPACITY) }
190191
};
191192

192-
#define I8272_NAME "Intel/NEC(765) FDC Core I8272"
193+
#define I8272_NAME "Intel/NEC(765) FDC Core"
194+
195+
static const char* i8272_description(DEVICE *dptr) {
196+
return I8272_NAME;
197+
}
193198

194199
static MTAB i8272_mod[] = {
195200
{ MTAB_XTD|MTAB_VDV, 0, "IOBASE", "IOBASE",
@@ -223,7 +228,7 @@ DEVICE i8272_dev = {
223228
NULL, NULL, &i8272_reset,
224229
NULL, &i8272_attach, &i8272_detach,
225230
&i8272_info_data, (DEV_DISABLE | DEV_DIS | DEV_DEBUG), ERROR_MSG,
226-
i8272_dt, NULL, I8272_NAME
231+
i8272_dt, NULL, NULL, NULL, NULL, NULL, &i8272_description
227232
};
228233

229234
static uint8 I8272_Setup_Cmd(uint8 fdc_cmd);

AltairZ80/mfdc.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ extern uint32 sim_map_resource(uint32 baseaddr, uint32 size, uint32 resource_typ
7474
extern int32 find_unit_index(UNIT *uptr);
7575

7676
static void MFDC_Command(uint8 cData);
77+
static const char* mfdc_description(DEVICE *dptr);
7778

7879
#define MFDC_MAX_DRIVES 4
7980
#define JUMPER_W9 1 /* Not Installed (0) = 2MHz, Installed (1) = 4MHz. */
@@ -149,7 +150,11 @@ static REG mfdc_reg[] = {
149150
{ NULL }
150151
};
151152

152-
#define MDSK_NAME "Micropolis FD Control MDSK"
153+
#define MDSK_NAME "Micropolis FD Control"
154+
155+
static const char* mfdc_description(DEVICE *dptr) {
156+
return MDSK_NAME;
157+
}
153158

154159
static MTAB mfdc_mod[] = {
155160
{ MTAB_XTD|MTAB_VDV, 0, "MEMBASE", "MEMBASE",
@@ -184,7 +189,7 @@ DEVICE mfdc_dev = {
184189
NULL, NULL, &mfdc_reset,
185190
NULL, &mfdc_attach, &mfdc_detach,
186191
&mfdc_info_data, (DEV_DISABLE | DEV_DIS | DEV_DEBUG), 0,
187-
mfdc_dt, NULL, MDSK_NAME
192+
mfdc_dt, NULL, NULL, NULL, NULL, NULL, &mfdc_description
188193
};
189194

190195
/* Micropolis FD Control Boot ROM

AltairZ80/n8vem.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static int32 n8vem_pio1a = 0x00; /* 8255 PIO1A IN Port */
103103
static int32 n8vem_pio1b = 0x00; /* 8255 PIO1B OUT Port */
104104
static int32 n8vem_pio1c = 0x00; /* 8255 PIO1C IN Port */
105105
static int32 n8vem_pio1ctrl = 0x00; /* 8255 PIO1 Control Port */
106+
static const char* n8vem_description(DEVICE *dptr);
106107

107108
#define N8VEM_ROM_SIZE (1024 * 1024)
108109
#define N8VEM_RAM_SIZE (512 * 1024)
@@ -133,7 +134,11 @@ static REG n8vem_reg[] = {
133134
{ NULL }
134135
};
135136

136-
#define N8VEM_NAME "Single-Board Computer N8VEM"
137+
#define N8VEM_NAME "Single-Board Computer"
138+
139+
static const char* n8vem_description(DEVICE *dptr) {
140+
return N8VEM_NAME;
141+
}
137142

138143
static MTAB n8vem_mod[] = {
139144
{ MTAB_XTD|MTAB_VDV, 0, "MEMBASE", "MEMBASE", &set_membase, &show_membase,
@@ -158,7 +163,7 @@ DEVICE n8vem_dev = {
158163
NULL, NULL, &n8vem_reset,
159164
&n8vem_boot, &n8vem_attach, &n8vem_detach,
160165
&n8vem_info_data, (DEV_DISABLE | DEV_DIS | DEV_DEBUG), 0,
161-
n8vem_dt, NULL, "Single-Board Computer N8VEM"
166+
n8vem_dt, NULL, NULL, NULL, NULL, NULL, &n8vem_description
162167
};
163168

164169
/* Reset routine */

AltairZ80/s100_64fdc.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static int32 cromfdc_control(const int32 port, const int32 io, const int32 data)
112112
static int32 cromfdc_banksel(const int32 port, const int32 io, const int32 data);
113113
static int32 cromfdcrom(const int32 port, const int32 io, const int32 data);
114114
static int32 ccs2810_uart_status(const int32 port, const int32 io, const int32 data);
115+
static const char* cromfdc_description(DEVICE *dptr);
115116

116117
static int32 dipswitch = 0; /* 5-position DIP switch on 64FDC card */
117118
static int32 bootstrap = 0; /* 0 for RDOS 2.52, 1 for RDOS 3.12. */
@@ -229,7 +230,11 @@ static REG cromfdc_reg[] = {
229230
{ NULL }
230231
};
231232

232-
#define CROMFDC_NAME "Cromemco 4/16/64 FDC CROMFDC"
233+
#define CROMFDC_NAME "Cromemco 4/16/64 FDC"
234+
235+
static const char* cromfdc_description(DEVICE *dptr) {
236+
return CROMFDC_NAME;
237+
}
233238

234239
static MTAB cromfdc_mod[] = {
235240
{ MTAB_XTD|MTAB_VDV, 0, "MEMBASE", "MEMBASE",
@@ -259,7 +264,7 @@ DEVICE cromfdc_dev = {
259264
NULL, NULL, &cromfdc_reset,
260265
&cromfdc_boot, &wd179x_attach, &wd179x_detach,
261266
&cromfdc_info_data, (DEV_DISABLE | DEV_DIS | DEV_DEBUG), 0,
262-
cromfdc_dt, NULL, CROMFDC_NAME
267+
cromfdc_dt, NULL, NULL, NULL, NULL, NULL, &cromfdc_description
263268
};
264269

265270
/* This is the CROMFDC RDOS-II ROM.

0 commit comments

Comments
 (0)