29#define C34_XFER_MAX 4096
88 uint8_t top = (nb >> 6) & 3;
89 un.
connector = (top == 0) ? 3 : (top == 1) ? 4 : (top == 2) ? 2 : 1;
103 if (PC131(
ge))
return &
ge->
ST3;
104 if (PC141(
ge))
return &
ge->
ST4;
113 for (; d; d = d->
next)
152 ge_log(
LOG_PERI,
"connector34: end-of-operation interrupt raised\n");
164 if (d->tick) d->tick(
ge, d->ctx);
166 if (d->tick) d->tick(
ge, d->ctx);
170 if (
ge->
rSO == 0xc8) {
217 if (!c->
cur || !conn)
284 uint8_t b = c->
buf[c->
pos++];
285 int end = (c->
pos >= c->
len);
305 c = calloc(1,
sizeof(*c));
318 if (!c || !dev || (connector != 3 && connector != 4))
320 if (connector == 4) {
328 dev->
name ? dev->
name :
"?", connector);
static struct std_unitname decode_name(uint8_t nb)
void connector34_deliver_order(struct ge *ge, struct ge_connector *conn)
int connector34_init(struct ge *ge)
int connector34_attach(struct ge *ge, struct ge_std_device *dev, uint8_t connector)
static void apply_reaction(struct ge *ge, std_reaction r)
static int connector34_deinit(struct ge *ge, void *opaque)
struct std_unitname connector34_decode(struct ge *ge)
static struct ge_std_device * find_device(struct connector34_core *c, struct std_unitname un)
static int connector34_on_clock(struct ge *ge, void *opaque)
static struct ge_connector * selected_connector(struct ge *ge)
void connector34_raise_interrupt(struct ge *ge)
void connector34_set_busy(struct ge *ge, unsigned ticks)
int ge_register_peri(struct ge *ge, struct ge_peri *p)
void ge_log(ge_log_type type, const char *format,...)
Log message.
@ LOG_PERI
Peripherals IO.
void connector_clear_sending(struct ge_connector *conn)
void connector_setup_to_send(struct ge *ge, struct ge_connector *conn, uint8_t data, uint8_t end)
struct ge_std_device * dev3
struct ge_std_device * dev4
struct ge_std_device * cur
uint8_t buf[C34_XFER_MAX]
int(* deinit)(struct ge *, void *)
int(* on_clock)(struct ge *, void *)
int(* claims)(void *ctx, struct std_unitname un)
struct ge_std_device * next
std_reaction(* command)(struct ge *, void *ctx, struct std_unitname un, uint8_t order)
std_reaction(* transfer)(struct ge *, void *ctx, struct std_unitname un, int dir, uint8_t *buf, uint16_t *len, uint16_t cap)
The entire state of the emulated system, including registers, memory, peripherals and timings.
void * std_core
Shared core for Standard-GE-100 controllers on connectors 3/4 (disk/tape).
struct ge_connector ST4
The I/O interface for the ST4 connector.
uint8_t inject_chan1_status
Channel-1 peripheral status override for error injection.
uint16_t rV1
Addresser for the first operand.
uint8_t rSO
Main sequencer.
struct ge_connector ST3
The I/O interface for the ST3 connector.
uint8_t RC00
Asynchronous CPU Cycle Request.
uint8_t RASI
Channel 1 in transfer.