GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
Data Structures | Enumerations | Functions | Variables
sat_batches.c File Reference
#include "sat_batches.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cap.h"
#include "transcode.h"

Go to the source code of this file.

Data Structures

struct  sat_source
 
struct  sat_batch_def
 
struct  sat_image_patch
 

Enumerations

enum  sat_source_op { SAT_SRC_AS_IS = 0 , SAT_SRC_TRIM_TITLE_SUMMARY , SAT_SRC_SERIAL_LOADER_PLUS_BODY }
 

Functions

static int row8_loader_card (const struct cap_deck *deck)
 
static int append_card_range (struct cap_deck *out, const struct cap_deck *src, int first, int last_inclusive)
 
static int append_source (struct cap_deck *out, const char *path, enum sat_source_op op)
 
static const struct sat_batch_defsat_batch_def_find (const char *id)
 
static void sat_apply_image_patches (const struct sat_batch_def *def, unsigned char *image)
 
static void sat_note (char *note, size_t note_sz, const struct sat_batch_def *def)
 
int sat_batch_count (void)
 
const struct sat_batch_infosat_batch_info_at (int idx)
 
const struct sat_batch_infosat_batch_find (const char *id)
 
int sat_batch_prepare_image (const char *root, const char *id, unsigned char *image, unsigned *lo, unsigned *hi, uint16_t *entry, char *note, size_t note_sz)
 
int sat_batch_prepare_deck (const char *root, const char *id, const char *out_path, char *note, size_t note_sz)
 

Variables

static const struct sat_source src_cpu_functional []
 
static const struct sat_source src_reader_a []
 
static const struct sat_source src_printer_mech []
 
static const struct sat_image_patch printer_mech_center_card []
 
static const struct sat_source src_control_program []
 
static const struct sat_source src_ls600_controller []
 
static const struct sat_source src_ls600_transcoder []
 
static const struct sat_source src_ls600_doe []
 
static const struct sat_batch_def sat_batches []
 

Enumeration Type Documentation

◆ sat_source_op

Enumerator
SAT_SRC_AS_IS 
SAT_SRC_TRIM_TITLE_SUMMARY 
SAT_SRC_SERIAL_LOADER_PLUS_BODY 

Definition at line 10 of file sat_batches.c.

Function Documentation

◆ append_card_range()

static int append_card_range ( struct cap_deck out,
const struct cap_deck src,
int  first,
int  last_inclusive 
)
static

Definition at line 153 of file sat_batches.c.

◆ append_source()

static int append_source ( struct cap_deck out,
const char *  path,
enum sat_source_op  op 
)
static

Definition at line 167 of file sat_batches.c.

◆ row8_loader_card()

static int row8_loader_card ( const struct cap_deck deck)
static

Definition at line 140 of file sat_batches.c.

◆ sat_apply_image_patches()

static void sat_apply_image_patches ( const struct sat_batch_def def,
unsigned char *  image 
)
static

Definition at line 215 of file sat_batches.c.

◆ sat_batch_count()

int sat_batch_count ( void  )

Definition at line 236 of file sat_batches.c.

◆ sat_batch_def_find()

static const struct sat_batch_def * sat_batch_def_find ( const char *  id)
static

Definition at line 204 of file sat_batches.c.

◆ sat_batch_find()

const struct sat_batch_info * sat_batch_find ( const char *  id)

Definition at line 248 of file sat_batches.c.

◆ sat_batch_info_at()

const struct sat_batch_info * sat_batch_info_at ( int  idx)

Definition at line 241 of file sat_batches.c.

◆ sat_batch_prepare_deck()

int sat_batch_prepare_deck ( const char *  root,
const char *  id,
const char *  out_path,
char *  note,
size_t  note_sz 
)

Definition at line 279 of file sat_batches.c.

◆ sat_batch_prepare_image()

int sat_batch_prepare_image ( const char *  root,
const char *  id,
unsigned char *  image,
unsigned *  lo,
unsigned *  hi,
uint16_t *  entry,
char *  note,
size_t  note_sz 
)

Definition at line 254 of file sat_batches.c.

◆ sat_note()

static void sat_note ( char *  note,
size_t  note_sz,
const struct sat_batch_def def 
)
static

Definition at line 229 of file sat_batches.c.

Variable Documentation

◆ printer_mech_center_card

const struct sat_image_patch printer_mech_center_card[]
static
Initial value:
= {
{ 0x0670, 0x01 },
{ 0x0671, 0x01 },
{ 0x0673, 0x01 },
{ 0x0674, 0x01 },
{ 0x0675, 0x00 },
}

Definition at line 61 of file sat_batches.c.

◆ sat_batches

const struct sat_batch_def sat_batches[]
static

Definition at line 88 of file sat_batches.c.

◆ src_control_program

const struct sat_source src_control_program[]
static
Initial value:
= {
{ "control-program-cr.cap", SAT_SRC_SERIAL_LOADER_PLUS_BODY },
}
@ SAT_SRC_SERIAL_LOADER_PLUS_BODY
Definition sat_batches.c:13

Definition at line 69 of file sat_batches.c.

◆ src_cpu_functional

const struct sat_source src_cpu_functional[]
static
Initial value:
= {
{ "funktionalcpu.cap", SAT_SRC_AS_IS },
}
@ SAT_SRC_AS_IS
Definition sat_batches.c:11

Definition at line 33 of file sat_batches.c.

◆ src_ls600_controller

const struct sat_source src_ls600_controller[]
static
Initial value:
= {
{ "sat-ls600.cap", SAT_SRC_SERIAL_LOADER_PLUS_BODY },
{ "ls600-controller-test.cap", SAT_SRC_TRIM_TITLE_SUMMARY },
}
@ SAT_SRC_TRIM_TITLE_SUMMARY
Definition sat_batches.c:12

Definition at line 73 of file sat_batches.c.

◆ src_ls600_doe

const struct sat_source src_ls600_doe[]
static
Initial value:
= {
{ "sat-ls600.cap", SAT_SRC_SERIAL_LOADER_PLUS_BODY },
{ "ls600-doe.cap", SAT_SRC_TRIM_TITLE_SUMMARY },
}

Definition at line 83 of file sat_batches.c.

◆ src_ls600_transcoder

const struct sat_source src_ls600_transcoder[]
static
Initial value:
= {
{ "sat-ls600.cap", SAT_SRC_SERIAL_LOADER_PLUS_BODY },
{ "ls600-transcoder-test.cap", SAT_SRC_TRIM_TITLE_SUMMARY },
}

Definition at line 78 of file sat_batches.c.

◆ src_printer_mech

const struct sat_source src_printer_mech[]
static
Initial value:
= {
{ "printermechanicaltest.cap", SAT_SRC_AS_IS },
}

Definition at line 41 of file sat_batches.c.

◆ src_reader_a

const struct sat_source src_reader_a[]
static
Initial value:
= {
{ "reading-test-chain-01a.cap", SAT_SRC_AS_IS },
}

Definition at line 37 of file sat_batches.c.