ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Namespaces | Macros
fdc.cpp File Reference
#include "fdc.h"
#include "fdcconst.h"
#include <fstream>

Namespaces

 cpcx
 Namespace for all CPC components.
 

Macros

#define LOAD_RESULT_WITH_STATUS
 
#define LOAD_RESULT_WITH_CHRN
 

Macro Definition Documentation

#define LOAD_RESULT_WITH_CHRN
Value:
mResult[RES_C] = \
mCommand[CMD_C]; /* load result with current CHRN values */ \
mResult[RES_H] = mCommand[CMD_H]; \
mResult[RES_R] = mCommand[CMD_R]; \
mResult[RES_N] = mCommand[CMD_N];
#define CMD_N
Definition: fdcconst.h:53
#define CMD_R
Definition: fdcconst.h:52
#define RES_N
Definition: fdcconst.h:65
#define CMD_C
Definition: fdcconst.h:50
#define RES_H
Definition: fdcconst.h:63
#define RES_R
Definition: fdcconst.h:64
#define CMD_H
Definition: fdcconst.h:51
#define RES_C
Definition: fdcconst.h:62

Referenced by Fdc::cmd_read(), Fdc::cmd_scan(), Fdc::cmd_write(), Fdc::Fdc(), Fdc::read(), Fdc::read_data(), Fdc::readID(), Fdc::readtrk(), Fdc::scan(), Fdc::write(), and Fdc::writeID().

#define LOAD_RESULT_WITH_STATUS
Value:
mResult[RES_ST0] |= 0x40; /* AT */ \
mResult[RES_ST1] |= 0x80; /* End of Cylinder */ \
if (mCommand[CMD_CODE] != 0x42) \
{/* continue only if not a read track command */ \
if ((mResult[RES_ST1] & 0x7f) || (mResult[RES_ST2] & 0x7f)) \
{ /* any 'error bits' set? */ \
mResult[RES_ST1] &= 0x7f; /* mask out End of Cylinder */ \
if ((mResult[RES_ST1] & 0x20) || (mResult[RES_ST2] & 0x20)) \
{ /* DE and/or DD? */ \
mResult[RES_ST2] &= 0xbf; /* mask out Control Mark */ \
} \
else if (mResult[RES_ST2] & 0x40) \
{ /* Control Mark? */ \
mResult[RES_ST0] &= 0x3f; /* mask out AT */ \
mResult[RES_ST1] &= 0x7f; /* mask out End of Cylinder */ \
} \
} \
}
#define RES_ST0
Definition: fdcconst.h:59
#define CMD_CODE
Definition: fdcconst.h:48
#define RES_ST2
Definition: fdcconst.h:61
#define RES_ST1
Definition: fdcconst.h:60

Referenced by Fdc::cmd_read(), Fdc::cmd_scan(), and Fdc::read_data().