Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions
d81access.c File Reference
#include "xemu/emutools.h"
#include "xemu/d81access.h"
#include "xemu/emutools_files.h"
#include <sys/types.h>
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
Include dependency graph for d81access.c:

Go to the source code of this file.

Macros

#define D64_SIZE   174848
 
#define D71_SIZE   349696
 
#define D65_SIZE   2785280
 
#define IS_RO(p)   (!!((p) & D81ACCESS_RO))
 
#define IS_RW(p)   (!((p) & D81ACCESS_RO))
 
#define HAS_DISK(p)   (((p)&& 0xFF) != D81ACCESS_EMPTY)
 
#define IS_AUTOCLOSE(p)   (!!((p) & D81ACCESS_AUTOCLOSE))
 

Functions

void d81access_init (void)
 
int d81access_get_mode (int which)
 
void d81access_close (int which)
 
void d81access_close_all (void)
 
void d81access_attach_fd (int which, int fd, off_t offset, int mode)
 
int d81access_attach_fsobj (int which, const char *fn, int mode)
 
int d81access_read_sect (const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector, const int sector_size)
 
int d81access_write_sect (const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector, const int sector_size)
 
Uint8d81access_create_image (Uint8 *img, const char *diskname, const int name_from_fn)
 
int d81access_create_image_file (const char *fn, const char *diskname, const int do_overwrite, const char *cry)
 

Macro Definition Documentation

◆ D64_SIZE

#define D64_SIZE   174848

Definition at line 46 of file d81access.c.

◆ D65_SIZE

#define D65_SIZE   2785280

Definition at line 48 of file d81access.c.

◆ D71_SIZE

#define D71_SIZE   349696

Definition at line 47 of file d81access.c.

◆ HAS_DISK

#define HAS_DISK (   p)    (((p)&& 0xFF) != D81ACCESS_EMPTY)

Definition at line 52 of file d81access.c.

◆ IS_AUTOCLOSE

#define IS_AUTOCLOSE (   p)    (!!((p) & D81ACCESS_AUTOCLOSE))

Definition at line 53 of file d81access.c.

◆ IS_RO

#define IS_RO (   p)    (!!((p) & D81ACCESS_RO))

Definition at line 50 of file d81access.c.

◆ IS_RW

#define IS_RW (   p)    (!((p) & D81ACCESS_RO))

Definition at line 51 of file d81access.c.

Function Documentation

◆ d81access_attach_fd()

void d81access_attach_fd ( int  which,
int  fd,
off_t  offset,
int  mode 
)

Definition at line 145 of file d81access.c.

◆ d81access_attach_fsobj()

int d81access_attach_fsobj ( int  which,
const char *  fn,
int  mode 
)

Definition at line 173 of file d81access.c.

◆ d81access_close()

void d81access_close ( int  which)

Definition at line 78 of file d81access.c.

Here is the caller graph for this function:

◆ d81access_close_all()

void d81access_close_all ( void  )

Definition at line 100 of file d81access.c.

Here is the call graph for this function:

◆ d81access_create_image()

Uint8* d81access_create_image ( Uint8 img,
const char *  diskname,
const int  name_from_fn 
)

Definition at line 604 of file d81access.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ d81access_create_image_file()

int d81access_create_image_file ( const char *  fn,
const char *  diskname,
const int  do_overwrite,
const char *  cry 
)

Definition at line 701 of file d81access.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ d81access_get_mode()

int d81access_get_mode ( int  which)

Definition at line 72 of file d81access.c.

◆ d81access_init()

void d81access_init ( void  )

Definition at line 56 of file d81access.c.

◆ d81access_read_sect()

int d81access_read_sect ( const int  which,
Uint8 buffer,
const Uint8  side,
const Uint8  track,
const Uint8  sector,
const int  sector_size 
)

Definition at line 539 of file d81access.c.

◆ d81access_write_sect()

int d81access_write_sect ( const int  which,
Uint8 buffer,
const Uint8  side,
const Uint8  track,
const Uint8  sector,
const int  sector_size 
)

Definition at line 572 of file d81access.c.

Variable Documentation

◆ dir

DIR* dir

Definition at line 32 of file d81access.c.

◆ fd

int fd

Definition at line 31 of file d81access.c.

◆ image_size

int image_size

Definition at line 35 of file d81access.c.

◆ mode

int mode

Definition at line 34 of file d81access.c.

◆ prg_blk_last_size

int prg_blk_last_size

Definition at line 41 of file d81access.c.

◆ prg_blk_size

int prg_blk_size

Definition at line 40 of file d81access.c.

◆ prg_size

int prg_size

Definition at line 39 of file d81access.c.

◆ start_at

off_t start_at

Definition at line 33 of file d81access.c.