ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
d64.c File Reference
#include "d64.h"

Go to the source code of this file.

Functions

int d64_get_free_sectors (D64Handle *_handle)
void d64_set_dos_version (D64Handle *_handle, D64DosVersion _version)
 Set the DOS version for the given disk image.
void d64_set_disk_name (D64Handle *_handle, unsigned char *_disk_name)
 Set the disk name for the given disk image.
void d64_set_disk_id (D64Handle *_handle, D64DiskId _disk_id)
 Set the disk id for the given disk image.
void d64_set_dos_type (D64Handle *_handle, unsigned char *_dos_type)
 Set the DOS Type for the given disk image.
D64Handled64_create (D64Format _format)
 Create a new D64 disk image.
int d64_write_file (D64Handle *_handle, unsigned char *_filename, D64FileType _type, unsigned char *_buffer, int _size)
 Write a block of memory on a file on the D64 disk image.
void d64_free (D64Handle *_handle)
 Free the disk image resources.
void d64_output (D64Handle *_handle, unsigned char *_filename)

Variables

D64DosVersion versionByFormat []
unsigned char dosTypeByFormat [][3]
int D64SectorsPerTrack []
int D64OffsetPerTrack []

Function Documentation

◆ d64_create()

D64Handle * d64_create ( D64Format _format)

Create a new D64 disk image.

Parameters
_formatFormat of the disk image
Returns
D64Handle* Handle of the disk image

Definition at line 779 of file d64.c.

◆ d64_free()

void d64_free ( D64Handle * _handle)

Free the disk image resources.

Parameters
_handleHandle to disk image

Definition at line 924 of file d64.c.

◆ d64_get_free_sectors()

int d64_get_free_sectors ( D64Handle * _handle)

Definition at line 290 of file d64.c.

◆ d64_output()

void d64_output ( D64Handle * _handle,
unsigned char * _filename )

Definition at line 932 of file d64.c.

◆ d64_set_disk_id()

void d64_set_disk_id ( D64Handle * _handle,
D64DiskId _disk_id )

Set the disk id for the given disk image.

Parameters
_handleHandle of the disk image
_disk_idDISK ID

Definition at line 740 of file d64.c.

◆ d64_set_disk_name()

void d64_set_disk_name ( D64Handle * _handle,
unsigned char * _disk_name )

Set the disk name for the given disk image.

Parameters
_handleHandle of the disk image
_disk_nameName of the disk

Definition at line 714 of file d64.c.

◆ d64_set_dos_type()

void d64_set_dos_type ( D64Handle * _handle,
unsigned char * _dos_type )

Set the DOS Type for the given disk image.

Parameters
_handleHandle of the disk image
_dos_typeDOS Type

Definition at line 763 of file d64.c.

◆ d64_set_dos_version()

void d64_set_dos_version ( D64Handle * _handle,
D64DosVersion _version )

Set the DOS version for the given disk image.

Parameters
_handleHandle of the disk image
_versionVersion to set

Definition at line 698 of file d64.c.

◆ d64_write_file()

int d64_write_file ( D64Handle * _handle,
unsigned char * _filename,
D64FileType _type,
unsigned char * _buffer,
int _size )

Write a block of memory on a file on the D64 disk image.

Parameters
_handleHandle to the disk image
_filenameName of the file to write
_typeType of the file to write
_bufferBuffer to write
_sizeSize to write (in bytes)

Definition at line 802 of file d64.c.

Variable Documentation

◆ D64OffsetPerTrack

int D64OffsetPerTrack[]
Initial value:
= {
0x00000, 0x01500, 0x02A00, 0x03F00, 0x05400, 0x06900, 0x07E00, 0x09300,
0x0A800, 0x0BD00, 0x0D200, 0x0E700, 0x0FC00, 0x11100, 0x12600, 0x13B00,
0x15000, 0x16500, 0x17800, 0x18B00, 0x19E00, 0x1B100, 0x1C400, 0x1D700,
0x1EA00, 0x1FC00, 0x20E00, 0x22000, 0x23200, 0x24400, 0x25600, 0x26700,
0x27800, 0x28900, 0x29A00, 0x2AB00, 0x2BC00, 0x2CD00, 0x2DE00, 0x2EF00,
0x30000, 0x31100
}

Definition at line 84 of file d64.c.

◆ D64SectorsPerTrack

int D64SectorsPerTrack[]
Initial value:
= {
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
19, 19, 19, 19, 19, 19, 19,
18, 18, 18, 18, 18, 18,
17, 17, 17, 17, 17,
17, 17, 17, 17, 17,
17, 17
}

Definition at line 68 of file d64.c.

◆ dosTypeByFormat

unsigned char dosTypeByFormat[][3]
Initial value:
= {
"2A",
"2A",
"2A",
"2A",
"4A",
"2A",
"2A",
"2A",
"2P",
"2A",
"2P"
}

Definition at line 53 of file d64.c.

◆ versionByFormat

D64DosVersion versionByFormat[]
Initial value:
= {
0x41,
0x41,
0x41,
0x41,
0x41,
0x41,
0x41,
0x41,
0x50,
0x41,
0x50
}

Definition at line 38 of file d64.c.