Merge remote-tracking branch 'origin/master' into Extra-VAXen
This commit is contained in:
commit
30ef557968
9 changed files with 34 additions and 22 deletions
|
@ -1924,7 +1924,7 @@ if (err != 0) { /* error? */
|
||||||
if (rq_dte (cp, uptr, ST_DRV)) /* post err log */
|
if (rq_dte (cp, uptr, ST_DRV)) /* post err log */
|
||||||
rq_rw_end (cp, uptr, EF_LOG, ST_DRV); /* if ok, report err */
|
rq_rw_end (cp, uptr, EF_LOG, ST_DRV); /* if ok, report err */
|
||||||
perror ("RQ I/O error");
|
perror ("RQ I/O error");
|
||||||
if (!(uptr->flags | UNIT_RAW))
|
if (!(uptr->flags & UNIT_RAW))
|
||||||
clearerr (uptr->fileref);
|
clearerr (uptr->fileref);
|
||||||
return SCPE_IOERR;
|
return SCPE_IOERR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,7 +327,7 @@ REG clk_reg[] = {
|
||||||
|
|
||||||
DEVICE clk_dev = {
|
DEVICE clk_dev = {
|
||||||
"TODR", &clk_unit, clk_reg, NULL,
|
"TODR", &clk_unit, clk_reg, NULL,
|
||||||
1, 0, 8, 1, 0, 0,
|
1, 0, 8, 4, 0, 32,
|
||||||
NULL, NULL, &clk_reset,
|
NULL, NULL, &clk_reset,
|
||||||
NULL, &clk_attach, &clk_detach,
|
NULL, &clk_attach, &clk_detach,
|
||||||
NULL, 0
|
NULL, 0
|
||||||
|
|
|
@ -101,8 +101,6 @@ int32 clk_tps = 100; /* ticks/second */
|
||||||
int32 todr_reg = 0; /* TODR register */
|
int32 todr_reg = 0; /* TODR register */
|
||||||
int32 todr_blow = 1; /* TODR battery low */
|
int32 todr_blow = 1; /* TODR battery low */
|
||||||
struct todr_battery_info {
|
struct todr_battery_info {
|
||||||
char toy_gmtbase_a[16]; /* Platform independent Text format of toy_gmtbase */
|
|
||||||
char toy_gmtbasemsec_a[16]; /* Platform independent Text format of toy_gmtbasemsec */
|
|
||||||
uint32 toy_gmtbase; /* GMT base of set value */
|
uint32 toy_gmtbase; /* GMT base of set value */
|
||||||
uint32 toy_gmtbasemsec; /* The milliseconds of the set value */
|
uint32 toy_gmtbasemsec; /* The milliseconds of the set value */
|
||||||
};
|
};
|
||||||
|
@ -234,7 +232,7 @@ MTAB clk_mod[] = {
|
||||||
|
|
||||||
DEVICE clk_dev = {
|
DEVICE clk_dev = {
|
||||||
"CLK", &clk_unit, clk_reg, clk_mod,
|
"CLK", &clk_unit, clk_reg, clk_mod,
|
||||||
1, 0, 8, 1, 0, 0,
|
1, 0, 8, 4, 0, 32,
|
||||||
NULL, NULL, &clk_reset,
|
NULL, NULL, &clk_reset,
|
||||||
NULL, &clk_attach, &clk_detach,
|
NULL, &clk_attach, &clk_detach,
|
||||||
&clk_dib, 0
|
&clk_dib, 0
|
||||||
|
@ -429,8 +427,6 @@ if (0 == todr_reg) /* clock running? */
|
||||||
#define TOY_MAX_SECS (0x40000000/25)
|
#define TOY_MAX_SECS (0x40000000/25)
|
||||||
|
|
||||||
clock_gettime(CLOCK_REALTIME, &now); /* get curr time */
|
clock_gettime(CLOCK_REALTIME, &now); /* get curr time */
|
||||||
toy->toy_gmtbase = strtoul(toy->toy_gmtbase_a, NULL, 0);
|
|
||||||
toy->toy_gmtbasemsec = strtoul(toy->toy_gmtbasemsec_a, NULL, 0);
|
|
||||||
base.tv_sec = toy->toy_gmtbase;
|
base.tv_sec = toy->toy_gmtbase;
|
||||||
base.tv_nsec = toy->toy_gmtbasemsec * 1000000;
|
base.tv_nsec = toy->toy_gmtbasemsec * 1000000;
|
||||||
sim_timespec_diff (&val, &now, &base);
|
sim_timespec_diff (&val, &now, &base);
|
||||||
|
@ -457,8 +453,6 @@ val.tv_nsec = (((uint32)data) % 100) * 10000000;
|
||||||
sim_timespec_diff (&base, &now, &val); /* base = now - data */
|
sim_timespec_diff (&base, &now, &val); /* base = now - data */
|
||||||
toy->toy_gmtbase = (uint32)base.tv_sec;
|
toy->toy_gmtbase = (uint32)base.tv_sec;
|
||||||
toy->toy_gmtbasemsec = base.tv_nsec/1000000;
|
toy->toy_gmtbasemsec = base.tv_nsec/1000000;
|
||||||
sprintf(toy->toy_gmtbase_a, "0x%08X", toy->toy_gmtbase);
|
|
||||||
sprintf(toy->toy_gmtbasemsec_a, "0x%08X", toy->toy_gmtbasemsec);
|
|
||||||
todr_reg = data;
|
todr_reg = data;
|
||||||
if (data)
|
if (data)
|
||||||
todr_blow = 0;
|
todr_blow = 0;
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="Check for required build dependencies"
|
||||||
|
CommandLine="if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -106,6 +108,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="Check for required build dependencies"
|
||||||
|
CommandLine="if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
Description="Build Dependent ROM include File(s)"
|
Description="Build Dependent ROM include File(s) & Check for required build dependencies"
|
||||||
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd
"
|
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd

if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -112,8 +112,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
Description="Build Dependent ROM include File(s)"
|
Description="Build Dependent ROM include File(s) & Check for required build dependencies"
|
||||||
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd
"
|
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd

if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
Description="Build Dependent ROM include File(s)"
|
Description="Build Dependent ROM include File(s) & Check for required build dependencies"
|
||||||
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd
"
|
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd

if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -111,8 +111,8 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
Description="Build Dependent ROM include File(s)"
|
Description="Build Dependent ROM include File(s) & Check for required build dependencies"
|
||||||
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd
"
|
CommandLine="pushd ..
$(TargetDir)BuildROMs
popd

if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice
if not exist ../../windows-build/pthreads/pthread.h goto _notice
goto _good

:_notice
echo ****************************************************
echo ****************************************************
echo ** The required build support is not available. **
echo ****************************************************
echo ****************************************************
type 0ReadMe_Projects.txt
exit 1

:_good
"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
|
12
scp.c
12
scp.c
|
@ -2725,8 +2725,18 @@ for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { /* loop thru devices */
|
||||||
WRITE_I (uptr->u6);
|
WRITE_I (uptr->u6);
|
||||||
WRITE_I (uptr->flags); /* [V2.10] flags */
|
WRITE_I (uptr->flags); /* [V2.10] flags */
|
||||||
WRITE_I (uptr->capac); /* [V3.5] capacity */
|
WRITE_I (uptr->capac); /* [V3.5] capacity */
|
||||||
if (uptr->flags & UNIT_ATT)
|
if (uptr->flags & UNIT_ATT) {
|
||||||
fputs (uptr->filename, sfile);
|
fputs (uptr->filename, sfile);
|
||||||
|
if ((uptr->flags & UNIT_BUF) && /* writable buffered */
|
||||||
|
uptr->hwmark && /* files need to be */
|
||||||
|
((uptr->flags & UNIT_RO) == 0)) { /* written on save */
|
||||||
|
uint32 cap = (uptr->hwmark + dptr->aincr - 1) / dptr->aincr;
|
||||||
|
rewind (uptr->fileref);
|
||||||
|
sim_fwrite (uptr->filebuf, SZ_D (dptr), cap, uptr->fileref);
|
||||||
|
fclose (uptr->fileref); /* flush data and state */
|
||||||
|
uptr->fileref = sim_fopen (uptr->filename, "rb+");/* reopen r/w */
|
||||||
|
}
|
||||||
|
}
|
||||||
fputc ('\n', sfile);
|
fputc ('\n', sfile);
|
||||||
if (((uptr->flags & (UNIT_FIX + UNIT_ATTABLE)) == UNIT_FIX) &&
|
if (((uptr->flags & (UNIT_FIX + UNIT_ATTABLE)) == UNIT_FIX) &&
|
||||||
(dptr->examine != NULL) &&
|
(dptr->examine != NULL) &&
|
||||||
|
|
|
@ -2660,7 +2660,7 @@ VHD_DynamicDiskHeader Dynamic;
|
||||||
uint32 *BAT = NULL;
|
uint32 *BAT = NULL;
|
||||||
time_t now;
|
time_t now;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
FILE *File;
|
FILE *File = NULL;
|
||||||
uint32 Status = 0;
|
uint32 Status = 0;
|
||||||
uint32 BytesPerSector = 512;
|
uint32 BytesPerSector = 512;
|
||||||
uint64 SizeInBytes = ((uint64)SizeInSectors)*BytesPerSector;
|
uint64 SizeInBytes = ((uint64)SizeInSectors)*BytesPerSector;
|
||||||
|
@ -2833,7 +2833,7 @@ CreateDifferencingVirtualDisk(const char *szVHDPath,
|
||||||
const char *szParentVHDPath)
|
const char *szParentVHDPath)
|
||||||
{
|
{
|
||||||
uint32 BytesPerSector = 512;
|
uint32 BytesPerSector = 512;
|
||||||
VHDHANDLE hVHD;
|
VHDHANDLE hVHD = NULL;
|
||||||
VHD_Footer ParentFooter;
|
VHD_Footer ParentFooter;
|
||||||
VHD_DynamicDiskHeader ParentDynamic;
|
VHD_DynamicDiskHeader ParentDynamic;
|
||||||
uint32 ParentTimeStamp;
|
uint32 ParentTimeStamp;
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
|
|
||||||
#include "sim_defs.h"
|
#include "sim_defs.h"
|
||||||
|
|
||||||
static unsigned char sim_flip[FLIP_SIZE];
|
|
||||||
int32 sim_end = 1; /* 1 = little */
|
int32 sim_end = 1; /* 1 = little */
|
||||||
|
|
||||||
/* OS-independent, endian independent binary I/O package
|
/* OS-independent, endian independent binary I/O package
|
||||||
|
@ -141,11 +140,13 @@ size_t sim_fwrite (void *bptr, size_t size, size_t count, FILE *fptr)
|
||||||
size_t c, nelem, nbuf, lcnt, total;
|
size_t c, nelem, nbuf, lcnt, total;
|
||||||
int32 i;
|
int32 i;
|
||||||
unsigned char *sptr;
|
unsigned char *sptr;
|
||||||
|
unsigned char *sim_flip;
|
||||||
|
|
||||||
if ((size == 0) || (count == 0)) /* check arguments */
|
if ((size == 0) || (count == 0)) /* check arguments */
|
||||||
return 0;
|
return 0;
|
||||||
if (sim_end || (size == sizeof (char))) /* le or byte? */
|
if (sim_end || (size == sizeof (char))) /* le or byte? */
|
||||||
return fwrite (bptr, size, count, fptr); /* done */
|
return fwrite (bptr, size, count, fptr); /* done */
|
||||||
|
sim_flip = (unsigned char *)malloc(FLIP_SIZE);
|
||||||
nelem = FLIP_SIZE / size; /* elements in buffer */
|
nelem = FLIP_SIZE / size; /* elements in buffer */
|
||||||
nbuf = count / nelem; /* number buffers */
|
nbuf = count / nelem; /* number buffers */
|
||||||
lcnt = count % nelem; /* count in last buf */
|
lcnt = count % nelem; /* count in last buf */
|
||||||
|
@ -158,10 +159,13 @@ for (i = (int32)nbuf; i > 0; i--) { /* loop on buffers */
|
||||||
sim_buf_copy_swapped (sim_flip, sptr, size, c);
|
sim_buf_copy_swapped (sim_flip, sptr, size, c);
|
||||||
sptr = sptr + size * count;
|
sptr = sptr + size * count;
|
||||||
c = fwrite (sim_flip, size, c, fptr);
|
c = fwrite (sim_flip, size, c, fptr);
|
||||||
if (c == 0)
|
if (c == 0) {
|
||||||
|
free(sim_flip);
|
||||||
return total;
|
return total;
|
||||||
|
}
|
||||||
total = total + c;
|
total = total + c;
|
||||||
}
|
}
|
||||||
|
free(sim_flip);
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue