12 #define MAX_PROGRAM_STORAGE_WORDS 129
16 memset(
ge, 0,
sizeof(*
ge));
51 if (program == NULL && size != 0)
58 memcpy(
ge->
mem, program, size);
106 case 0x00: name =
"- Display sequence";
break;
107 case 0x08: name =
"- Forcing sequence";
break;
109 case 0x65: name =
"- Beta Phase";
break;
110 case 0x80: name =
"- Initialitiation";
break;
112 case 0xE3: name =
"- Alpha Phase";
break;
113 case 0xF0: name =
"- Interruption";
break;
123 #define X(name) case name : return #name ;
135 "SO: %02x SA: %02x PO: %04x RO: %04x BO: %04x FO: %04x - "
136 "V1: %04x V2: %04x V3: %04x V4: %04x - "
137 "L1: %04x L2: %04x L3 : %04x\n",
147 "SO: %02x SA: %02x PO: %04x RO: %04x BO: %04x FO: %04x - "
148 "NO: %02x NI: %02x - "
149 "FA: %02x FI: %02x - "
150 "V1: %04x V2: %04x V3: %04x V4: %04x - "
151 "L1: %04x L2: %04x L3 : %04x\n",
268 ge_log(
LOG_FUTURE,
" papa: %d, norm: %d, scr: %d ==> %d\n", is_papa, is_norm, is_scr,
ge->
RIA0 && (is_papa || !(is_norm || is_scr)));
270 if (
ge->
RIA0 && (is_papa || !(is_norm || is_scr)))
int ge_deinit(struct ge *ge)
Deinitialize the emulator.
void ge_load_1(struct ge *ge)
Emulate the press of the "load 1" button in the console.
void ge_print_registers_nonverbose(struct ge *ge)
#define MAX_PROGRAM_STORAGE_WORDS
static void ge_print_well_known_states(uint8_t state)
void ge_clear(struct ge *ge)
Emulate the press of the "clear" button in the console.
int ge_run_cycle(struct ge *ge)
Run all GE "mastri" clock periods until next clock cycle.
void ge_clock_increment(struct ge *ge)
uint8_t ge_clock_is_first(struct ge *ge)
void ge_load_2(struct ge *ge)
Emulate the press of the "load 2" button in the console.
uint8_t ge_clock_is_last(struct ge *ge)
void ge_init(struct ge *ge)
Initialize the emulator.
int ge_run_pulse(struct ge *ge)
Run a single pulse (i.e. a single GE "mastri" clock periods)
void fsn_last_clock(struct ge *ge)
Commit the future state.
void ge_print_registers_verbose(struct ge *ge)
void ge_load(struct ge *ge)
Emulate the press of the "load" button in the console.
int ge_load_program(struct ge *ge, uint8_t *program, uint8_t size)
Copy a program at the start of memory.
const char * ge_clock_name(enum clock c)
The clock period name name.
void connectors_first_clock(struct ge *ge)
void ge_start(struct ge *ge)
Emulate the press of the "start" button in the console.
void pulse(struct ge *ge)
static uint16_t NI_knot(struct ge *ge)
NI Knot.
static uint16_t NO_knot(struct ge *ge)
Knot driven by P0, V1, V2, V4, L1, R1, V3 and L3.
void ge_log(ge_log_type type, const char *format,...)
Log message.
uint8_t ge_log_enabled(ge_log_type type)
Check if a log type is enabled.
@ LOG_REGS_V
Register trace per pulse.
@ LOG_ERR
Emulator unrecoverable condition.
@ LOG_FUTURE
Future state network debug.
@ LOG_REGS
Register trace per cycle.
@ LOG_READER
Integrated Reader.
void msl_run_state(struct ge *ge, struct msl_timing_state *state)
Runs a machine state.
struct msl_timing_state * msl_get_state(uint8_t SO)
Gets timing state␐␐␐␐␐␐␐␐␐.
int ge_peri_on_pulses(struct ge *ge)
int ge_peri_deinit(struct ge *ge)
int ge_peri_on_clock(struct ge *ge)
uint16_t RICI
Disables next status.
uint16_t PAPA
Step By Step execution.
The entire state of the emulated system, including registers, memory, peripherals and timings.
uint8_t ALAM
Operator Call.
uint8_t ALOI
Load connector selection.
uint8_t AINI
Program Loading.
struct ge_connector ST4
The I/O interface for the ST4 connector.
uint8_t ALTO
Stops internal cycles.
uint8_t ffFA
Special conditions register 2.
uint16_t rPO
Program addresser.
uint8_t future_state
Future state.
uint8_t PODI
Slow delay line.
enum ge_console_rotary register_selector
The current state of the console register rotary switch.
uint8_t RIA0
Synchronous CPU Cycle Request.
uint8_t RIA2
Synchronous Channel 2 Cycle Request.
uint16_t rV1
Addresser for the first operand.
uint8_t rSO
Main sequencer.
uint16_t rRO
Multipurpose 8+1 bit register.
struct ge_console_switches console_switches
The current state of the console switches.
struct ge_connector ST3
The I/O interface for the ST3 connector.
uint8_t rL2
Auxiliary register.
uint8_t ffFI
Special conditions register 1.
uint8_t RC00
Asynchronous CPU Cycle Request.
uint16_t rBO
Default operator.
uint8_t RC01
Asynchronous Channel 1 Cycle Request.
uint8_t mem[MEM_SIZE]
The memory of the emulated system.
uint16_t rV4
Addresser for external instructions using channel 2.
uint16_t rL1
Length of the operand.
uint8_t rSA
Future state configuration.
uint16_t rV2
Addresser for the second operand.
uint8_t RC02
Asynchronous Channel 2 Cycle Request.
uint8_t ADIR
Disable Step By Step.
uint8_t rSI
Peripheral unit sequencer.
uint8_t RC03
Asynchronous Channel 3 Cycle Request.
uint8_t ACIC
Recycle delay line.
uint16_t rL3
Length of operands involving channel 3.
uint16_t rV3
Addresser for external instructions using channel 3.
uint8_t rFO
Current function code.