GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
Data Structures | Macros | Enumerations | Functions
disk.c File Reference
#include "disk.h"
#include "ge.h"
#include "connector34.h"
#include "log.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  disk_ctx
 

Macros

#define SECTOR_BYTES   64
 
#define DEFAULT_SECTORS   64
 

Enumerations

enum  disk_order { DISK_ORD_SEEK = 0x10 , DISK_ORD_READ = 0x40 , DISK_ORD_WRITE = 0x42 , DISK_ORD_FORMAT = 0x60 }
 

Functions

static int disk_claims (void *opaque, struct std_unitname un)
 
static std_reaction disk_command (struct ge *ge, void *opaque, struct std_unitname un, uint8_t order)
 
static std_reaction disk_transfer (struct ge *ge, void *opaque, struct std_unitname un, int dir, uint8_t *buf, uint16_t *len, uint16_t cap)
 
int disk_register (struct ge *ge, const char *image_path, uint8_t connector, uint8_t unit)
 

Macro Definition Documentation

◆ DEFAULT_SECTORS

#define DEFAULT_SECTORS   64

Definition at line 27 of file disk.c.

◆ SECTOR_BYTES

#define SECTOR_BYTES   64

Definition at line 26 of file disk.c.

Enumeration Type Documentation

◆ disk_order

enum disk_order
Enumerator
DISK_ORD_SEEK 
DISK_ORD_READ 
DISK_ORD_WRITE 
DISK_ORD_FORMAT 

Definition at line 30 of file disk.c.

Function Documentation

◆ disk_claims()

static int disk_claims ( void *  opaque,
struct std_unitname  un 
)
static

Definition at line 47 of file disk.c.

◆ disk_command()

static std_reaction disk_command ( struct ge ge,
void *  opaque,
struct std_unitname  un,
uint8_t  order 
)
static

Definition at line 53 of file disk.c.

◆ disk_register()

int disk_register ( struct ge ge,
const char *  image_path,
uint8_t  connector,
uint8_t  unit 
)

Definition at line 105 of file disk.c.

◆ disk_transfer()

static std_reaction disk_transfer ( struct ge ge,
void *  opaque,
struct std_unitname  un,
int  dir,
uint8_t *  buf,
uint16_t *  len,
uint16_t  cap 
)
static

Definition at line 74 of file disk.c.