AltairZ80: Clean up of source code formatting
This commit is contained in:
parent
4428d49b08
commit
8077d4de38
9 changed files with 61 additions and 57 deletions
|
@ -1205,10 +1205,14 @@ long disasm (unsigned char *data, char *output, int segsize, long offset)
|
||||||
case 0x64: segover = "fs"; break;
|
case 0x64: segover = "fs"; break;
|
||||||
case 0x65: segover = "gs"; break;
|
case 0x65: segover = "gs"; break;
|
||||||
}
|
}
|
||||||
} else if (*data == 0x66)
|
} else if (*data == 0x66) {
|
||||||
osize = 48 - segsize, data++;
|
osize = 48 - segsize;
|
||||||
else if (*data == 0x67)
|
data++;
|
||||||
asize = 48 - segsize, data++;
|
}
|
||||||
|
else if (*data == 0x67) {
|
||||||
|
asize = 48 - segsize;
|
||||||
|
data++;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ static int DoDiskOperation(desc_t *dsc, uint8 val)
|
||||||
case READ_SEC:
|
case READ_SEC:
|
||||||
addr = (dsc->track * SPT) + dsc->sector - 1;
|
addr = (dsc->track * SPT) + dsc->sector - 1;
|
||||||
if (sim_fseek(cpx, addr * SEC_SZ, SEEK_SET) == 0) {
|
if (sim_fseek(cpx, addr * SEC_SZ, SEEK_SET) == 0) {
|
||||||
rtn = sim_fread(blanksec, 1, SEC_SZ, cpx);
|
rtn = sim_fread(blanksec, 1, SEC_SZ, cpx);
|
||||||
if ((rtn != SEC_SZ) && (current_disk_flags & UNIT_DSK_VERBOSE) &&
|
if ((rtn != SEC_SZ) && (current_disk_flags & UNIT_DSK_VERBOSE) &&
|
||||||
(warnAttached[current_disk] < warnLevelDSK)) {
|
(warnAttached[current_disk] < warnLevelDSK)) {
|
||||||
warnAttached[current_disk]++;
|
warnAttached[current_disk]++;
|
||||||
|
@ -284,11 +284,11 @@ static int DoDiskOperation(desc_t *dsc, uint8 val)
|
||||||
case WRITE_SEC:
|
case WRITE_SEC:
|
||||||
addr = (dsc->track * SPT) + dsc->sector - 1;
|
addr = (dsc->track * SPT) + dsc->sector - 1;
|
||||||
if (sim_fseek(cpx, addr * SEC_SZ, SEEK_SET) == 0) {
|
if (sim_fseek(cpx, addr * SEC_SZ, SEEK_SET) == 0) {
|
||||||
addr = dsc->addr_l + (dsc->addr_h << 8); /* no assumption on endianness */
|
addr = dsc->addr_l + (dsc->addr_h << 8); /* no assumption on endianness */
|
||||||
for (kt = 0; kt < SEC_SZ; kt++) {
|
for (kt = 0; kt < SEC_SZ; kt++) {
|
||||||
blanksec[kt] = GetBYTEWrapper(addr++);
|
blanksec[kt] = GetBYTEWrapper(addr++);
|
||||||
}
|
}
|
||||||
sim_fwrite(blanksec, 1, SEC_SZ, cpx);
|
sim_fwrite(blanksec, 1, SEC_SZ, cpx);
|
||||||
} else {
|
} else {
|
||||||
if ((current_disk_flags & UNIT_DSK_VERBOSE) &&
|
if ((current_disk_flags & UNIT_DSK_VERBOSE) &&
|
||||||
(warnAttached[current_disk] < warnLevelDSK)) {
|
(warnAttached[current_disk] < warnLevelDSK)) {
|
||||||
|
|
|
@ -306,41 +306,41 @@ static int32 hdc1001dev(const int32 port, const int32 io, const int32 data)
|
||||||
#define HDC1001_OP_HEAD 0x02
|
#define HDC1001_OP_HEAD 0x02
|
||||||
#define HDC1001_OP_SECTOR 0x03
|
#define HDC1001_OP_SECTOR 0x03
|
||||||
|
|
||||||
#define HDC1001_CMD_NULL 0x00
|
#define HDC1001_CMD_NULL 0x00
|
||||||
#define HDC1001_CMD_READ_DATA 0x01
|
#define HDC1001_CMD_READ_DATA 0x01
|
||||||
#define HDC1001_CMD_WRITE_DATA 0x02
|
#define HDC1001_CMD_WRITE_DATA 0x02
|
||||||
#define HDC1001_CMD_WRITE_HEADER 0x03
|
#define HDC1001_CMD_WRITE_HEADER 0x03
|
||||||
#define HDC1001_CMD_READ_HEADER 0x04
|
#define HDC1001_CMD_READ_HEADER 0x04
|
||||||
|
|
||||||
#define HDC1001_STATUS_BUSY 0
|
#define HDC1001_STATUS_BUSY 0
|
||||||
#define HDC1001_STATUS_RANGE 1
|
#define HDC1001_STATUS_RANGE 1
|
||||||
#define HDC1001_STATUS_NOT_READY 2
|
#define HDC1001_STATUS_NOT_READY 2
|
||||||
#define HDC1001_STATUS_TIMEOUT 3
|
#define HDC1001_STATUS_TIMEOUT 3
|
||||||
#define HDC1001_STATUS_DAT_CRC 4
|
#define HDC1001_STATUS_DAT_CRC 4
|
||||||
#define HDC1001_STATUS_WR_FAULT 5
|
#define HDC1001_STATUS_WR_FAULT 5
|
||||||
#define HDC1001_STATUS_OVERRUN 6
|
#define HDC1001_STATUS_OVERRUN 6
|
||||||
#define HDC1001_STATUS_HDR_CRC 7
|
#define HDC1001_STATUS_HDR_CRC 7
|
||||||
#define HDC1001_STATUS_MAP_FULL 8
|
#define HDC1001_STATUS_MAP_FULL 8
|
||||||
#define HDC1001_STATUS_COMPLETE 0xFF /* Complete with No Error */
|
#define HDC1001_STATUS_COMPLETE 0xFF /* Complete with No Error */
|
||||||
|
|
||||||
#define HDC1001_CODE_NOOP 0x00
|
#define HDC1001_CODE_NOOP 0x00
|
||||||
#define HDC1001_CODE_VERSION 0x01
|
#define HDC1001_CODE_VERSION 0x01
|
||||||
#define HDC1001_CODE_GLOBAL 0x02
|
#define HDC1001_CODE_GLOBAL 0x02
|
||||||
#define HDC1001_CODE_SPECIFY 0x03
|
#define HDC1001_CODE_SPECIFY 0x03
|
||||||
#define HDC1001_CODE_SET_MAP 0x04
|
#define HDC1001_CODE_SET_MAP 0x04
|
||||||
#define HDC1001_CODE_HOME 0x05
|
#define HDC1001_CODE_HOME 0x05
|
||||||
#define HDC1001_CODE_SEEK 0x06
|
#define HDC1001_CODE_SEEK 0x06
|
||||||
#define HDC1001_CODE_READ_HDR 0x07
|
#define HDC1001_CODE_READ_HDR 0x07
|
||||||
#define HDC1001_CODE_READWRITE 0x08
|
#define HDC1001_CODE_READWRITE 0x08
|
||||||
#define HDC1001_CODE_RELOCATE 0x09
|
#define HDC1001_CODE_RELOCATE 0x09
|
||||||
#define HDC1001_CODE_FORMAT 0x0A
|
#define HDC1001_CODE_FORMAT 0x0A
|
||||||
#define HDC1001_CODE_FORMAT_BAD 0x0B
|
#define HDC1001_CODE_FORMAT_BAD 0x0B
|
||||||
#define HDC1001_CODE_STATUS 0x0C
|
#define HDC1001_CODE_STATUS 0x0C
|
||||||
#define HDC1001_CODE_SELECT 0x0D
|
#define HDC1001_CODE_SELECT 0x0D
|
||||||
#define HDC1001_CODE_EXAMINE 0x0E
|
#define HDC1001_CODE_EXAMINE 0x0E
|
||||||
#define HDC1001_CODE_MODIFY 0x0F
|
#define HDC1001_CODE_MODIFY 0x0F
|
||||||
|
|
||||||
#define HDC1001_IOPB_LEN 16
|
#define HDC1001_IOPB_LEN 16
|
||||||
|
|
||||||
#define TF_DATA 0
|
#define TF_DATA 0
|
||||||
#define TF_ERROR 1
|
#define TF_ERROR 1
|
||||||
|
|
|
@ -232,7 +232,7 @@ static t_stat vfdhd_attach(UNIT *uptr, CONST char *cptr)
|
||||||
t_stat r;
|
t_stat r;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
|
|
||||||
r = attach_unit(uptr, cptr); /* attach unit */
|
r = attach_unit(uptr, cptr); /* attach unit */
|
||||||
if(r != SCPE_OK) /* error? */
|
if(r != SCPE_OK) /* error? */
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue