Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions 3B2/3b2_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,20 @@ static const char *att3b2_clock_precalibrate_commands[] = {

MTAB cpu_mod[] = {
#if defined(REV2)
{ UNIT_MSIZE, (1u << 20), NULL, "1M",
{ UNIT_MSIZE, MSIZ_512K, NULL, "512K",
&cpu_set_size, NULL, NULL, "Set Memory to 512K bytes" },
{ UNIT_MSIZE, MSIZ_1M, NULL, "1M",
&cpu_set_size, NULL, NULL, "Set Memory to 1M bytes" },
{ UNIT_MSIZE, (1u << 21), NULL, "2M",
{ UNIT_MSIZE, MSIZ_2M, NULL, "2M",
&cpu_set_size, NULL, NULL, "Set Memory to 2M bytes" },
{ UNIT_MSIZE, (1u << 22), NULL, "4M",
{ UNIT_MSIZE, MSIZ_3M, NULL, "3M",
&cpu_set_size, NULL, NULL, "Set Memory to 3M bytes" },
{ UNIT_MSIZE, MSIZ_4M, NULL, "4M",
&cpu_set_size, NULL, NULL, "Set Memory to 4M bytes" },
#endif
#if defined(REV3)
{ UNIT_MSIZE, (1u << 22), NULL, "4M",
&cpu_set_size, NULL, NULL, "Set Memory to 4M bytes" },
{ UNIT_MSIZE, (1u << 23), NULL, "8M",
&cpu_set_size, NULL, NULL, "Set Memory to 8M bytes" },
{ UNIT_MSIZE, (1u << 24), NULL, "16M",
Expand Down
30 changes: 18 additions & 12 deletions 3B2/3b2_ctc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@
#define DELAY_UNK 1000
#define DELAY_CATCHUP 10000

#define CTC_DIAG_CRC1 0xa4a5752f
#define CTC_DIAG_CRC2 0xd3d20eb3
#define CTC_DIAG_CRC3 0x0f387ce3 /* Used by SVR 2.0.5 */

#define TAPE_DEV 0 /* CTAPE device */
#define XMF_DEV 1 /* XM Floppy device */

#define VTOC_BLOCK 0

static uint32 diag_crc[] = {
0xa4a5752f,
0xd3d20eb3,
0x668e4b3e, /* Used by SVR 3.1 */
0x0f387ce3 /* Used by SVR 2.0.5 */
};

static uint8 int_slot; /* Interrupting card ID */
static uint8 int_subdev; /* Interrupting subdevice */
static t_bool ctc_conf = FALSE; /* Has a CTC card been configured? */
Expand Down Expand Up @@ -299,14 +302,17 @@ static void ctc_cmd(uint8 slot,
/* If the currently running program is a diagnostic program,
* we are expected to write results into memory at address
* 0x200f000 */
if (ctc_crc == CTC_DIAG_CRC1 ||
ctc_crc == CTC_DIAG_CRC2 ||
ctc_crc == CTC_DIAG_CRC3) {
pwrite_h(0x200f000, 0x1, BUS_PER); /* Test success */
pwrite_h(0x200f002, 0x0, BUS_PER); /* Test Number */
pwrite_h(0x200f004, 0x0, BUS_PER); /* Actual */
pwrite_h(0x200f006, 0x0, BUS_PER); /* Expected */
pwrite_b(0x200f008, 0x1, BUS_PER); /* Success flag again */
for (i = 0; i < (sizeof(diag_crc) / sizeof(diag_crc[0])); i++) {
if (ctc_crc == diag_crc[i]) {
sim_debug(TRACE_DBG, &ctc_dev,
"[ctc_cmd] CIO_FCF found CRC==%08x\n", ctc_crc);
pwrite_h(0x200f000, 0x1, BUS_PER); /* Test success */
pwrite_h(0x200f002, 0x0, BUS_PER); /* Test Number */
pwrite_h(0x200f004, 0x0, BUS_PER); /* Actual */
pwrite_h(0x200f006, 0x0, BUS_PER); /* Expected */
pwrite_b(0x200f008, 0x1, BUS_PER); /* Success flag again */
break;
}
}

/* An interesting (?) side-effect of FORCE FUNCTION CALL is
Expand Down
3 changes: 2 additions & 1 deletion 3B2/3b2_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
#define MSIZ_512K 0x80000
#define MSIZ_1M 0x100000
#define MSIZ_2M 0x200000
#define MSIZ_3M 0x300000
#define MSIZ_4M 0x400000
#define MSIZ_8M 0x800000
#define MSIZ_16M 0x1000000
Expand Down Expand Up @@ -146,6 +147,7 @@ extern DEVICE cpu_dev;
extern DEVICE csr_dev;
extern DEVICE ctc_dev;
extern DEVICE dmac_dev;
extern DEVICE ha_dev;
extern DEVICE id_dev;
extern DEVICE if_dev;
extern DEVICE iu_timer_dev;
Expand All @@ -161,7 +163,6 @@ extern DEVICE tto_dev;
extern DEVICE lpt_dev;
#if defined(REV3)
extern DEVICE flt_dev;
extern DEVICE ha_dev;
#endif /* defined(REV3) */

#endif /* _3B2_DEFS_H_ */
Loading
Loading