Gert van der Knokke
/
C1541III
C1541-III mbed edition
Embed:
(wiki syntax)
Show/hide line numbers
main.h
00001 #ifndef _MAIN_H_INCLUDED 00002 #define _MAIN_H_INCLUDED 00003 00004 /*constants*/ 00005 #define MAX_NUMBER_OF_DOS_BUFFERS 5 /*the maximum numbers of available buffers within this device*/ 00006 00007 /*structures*/ 00008 struct DOS_buffer_struct 00009 { 00010 unsigned char buffer_in_use; /*this flag indicates wether the buffer is allready in use*/ 00011 unsigned char buffer[256]; /*the buffer capable of holding a complete block*/ 00012 }; 00013 00014 struct DOS_channel_struct 00015 { 00016 unsigned char channel_in_use; /*this flag indicates wether this channel is allready in use*/ 00017 unsigned char next_action; /*this holds the next action (if nothing interupts it) for this channel*/ 00018 unsigned char filename[17]; /*the actual filename, as it is stored on the disk*/ 00019 unsigned char filetype; /*filetype can be sequential, program, user, etc.*/ 00020 unsigned char RW; /*file read or write*/ 00021 unsigned char track; /*the current track position on the disk regarding this file*/ 00022 unsigned char sector; /*the current sector position on the disk regarding this file*/ 00023 unsigned char buffer_pointer; /*the current byte position within the block specified by track and sector on the disk regarding this file*/ 00024 unsigned char used_buffer; /*this register holds the value of the connected buffer (if required)*/ 00025 unsigned char status; /*the current status of this file entry in the sa_DOS_buffer*/ 00026 }; 00027 00028 /*variables*/ 00029 extern unsigned char RAM_buffer[256]; /*this is the buffer capable of holding one 256 byte block, a memory area to which the user or the 1541-III can write/read data to/from*/ 00030 //extern unsigned char BAM_buffer[162]; /*this buffer holds the Block Allocation Map, required for when we want to write to the D64 (max 40 tracks)*/ 00031 extern unsigned char block_buffer[512]; /*this buffers the data 'as read from' or 'to be written to' the card*/ 00032 extern struct DOS_buffer_struct DOS_buffer[MAX_NUMBER_OF_DOS_BUFFERS]; /*this array of structs holds the information about the currently used buffers*/ 00033 extern struct DOS_channel_struct DOS_channel[16]; /*this array of structs holds this information about the currently used channels*/ 00034 00035 extern unsigned char Card_CID(void); 00036 extern unsigned char Card_CSD(void); 00037 00038 /*routines*/ 00039 /*--------*/ 00040 // void delay_10uS(unsigned long delay); 00041 00042 //void CLRWDT(); 00043 00044 #endif
Generated on Tue Jul 26 2022 04:14:07 by 1.7.2