Merge remote-tracking branch 'origin/master' into Operator-Commands
This commit is contained in:
commit
99c13051e6
94 changed files with 2165 additions and 1737 deletions
4
.gitattributes
vendored
4
.gitattributes
vendored
|
@ -2,4 +2,6 @@
|
|||
*.sln binary
|
||||
*.vcproj binary
|
||||
*.exe binary
|
||||
*.bin binary
|
||||
*.bin binary
|
||||
sim_rev.h export-subst
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_cpu_opt.c: MITS Altair CPU (8080 and Z80)
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_defs.h: MITS Altair simulator definitions
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_dsk.c: MITS Altair 88-DISK Simulator
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -483,6 +483,7 @@ int32 dsk11(const int32 port, const int32 io, const int32 data) {
|
|||
current_disk, PCX);
|
||||
}
|
||||
current_track[current_disk]++;
|
||||
current_flag[current_disk] &= 0xbf; /* mwd 1/29/13: track zero now false */
|
||||
if (current_track[current_disk] > (tracks[current_disk] - 1))
|
||||
current_track[current_disk] = (tracks[current_disk] - 1);
|
||||
if (dirty) /* implies that current_disk < NUM_OF_DSK */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_hdsk.c: simulated hard disk device to increase capacity
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "altairz80_defs.h"
|
||||
#include <assert.h>
|
||||
#include "sim_imd.h"
|
||||
|
||||
/* Debug flags */
|
||||
#define READ_MSG (1 << 0)
|
||||
|
@ -43,6 +44,9 @@ static t_stat show_format(FILE *st, UNIT *uptr, int32 val, void *desc);
|
|||
static t_stat hdsk_reset(DEVICE *dptr);
|
||||
static t_stat hdsk_attach(UNIT *uptr, char *cptr);
|
||||
static t_stat hdsk_detach(UNIT *uptr);
|
||||
static uint32 is_imd(const UNIT *uptr);
|
||||
static void assignFormat(UNIT *uptr);
|
||||
static void verifyDiskInfo(const DISK_INFO info, const char unitChar);
|
||||
|
||||
#define UNIT_V_HDSK_WLK (UNIT_V_UF + 0) /* write locked */
|
||||
#define UNIT_HDSK_WLK (1 << UNIT_V_HDSK_WLK)
|
||||
|
@ -118,6 +122,7 @@ typedef struct {
|
|||
#define SPT16 16
|
||||
#define SPT32 32
|
||||
#define SPT26 26
|
||||
#define SPT52 52
|
||||
|
||||
static HDSK_INFO hdsk_info_data = { { 0x0000, 0, 0xFD, 1 } };
|
||||
|
||||
|
@ -126,18 +131,18 @@ static int32 standard8[SPT26] = { 0, 6, 12, 18, 24, 4, 10, 16,
|
|||
19, 25, 5, 11, 17, 23, 3, 9,
|
||||
15, 21 };
|
||||
|
||||
static int32 appple_ii_DOS[SPT16] = { 0, 6, 12, 3, 9, 15, 14, 5,
|
||||
static int32 apple_ii_DOS[SPT16] = { 0, 6, 12, 3, 9, 15, 14, 5,
|
||||
11, 2, 8, 7, 13, 4, 10, 1 };
|
||||
|
||||
static int32 appple_ii_DOS2[SPT32] = { 0, 1, 12, 13, 24, 25, 6, 7,
|
||||
static int32 apple_ii_DOS2[SPT32] = { 0, 1, 12, 13, 24, 25, 6, 7,
|
||||
18, 19, 30, 31, 28, 29, 10, 11,
|
||||
22, 23, 4, 5, 16, 17, 14, 15,
|
||||
26, 27, 8, 9, 20, 21, 2, 3 };
|
||||
|
||||
static int32 appple_ii_PRODOS[SPT16] = { 0, 9, 3, 12, 6, 15, 1, 10,
|
||||
static int32 apple_ii_PRODOS[SPT16] = { 0, 9, 3, 12, 6, 15, 1, 10,
|
||||
4, 13, 7, 8, 2, 11, 5, 14 };
|
||||
|
||||
static int32 appple_ii_PRODOS2[SPT32] = { 0, 1, 18, 19, 6, 7, 24, 25,
|
||||
static int32 apple_ii_PRODOS2[SPT32] = { 0, 1, 18, 19, 6, 7, 24, 25,
|
||||
12, 13, 30, 31, 2, 3, 20, 21,
|
||||
8, 9, 26, 27, 14, 15, 16, 17,
|
||||
4, 5, 22, 23, 10, 11, 28, 29 };
|
||||
|
@ -197,17 +202,44 @@ static DPB dpb[] = {
|
|||
{ "SSSD8S", 256256, SPT26, 0x03, 0x07, 0x00, 242, 0x003F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x00, 0x00, 0, 0, standard8 }, /* Standard 8" SS SD with skew */
|
||||
|
||||
{ "SSDD8", 512512, SPT52, 0x04, 0x0F, 0x01, 242, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x01, 0x01, 0, 0, NULL }, /* Standard 8" SS DD */
|
||||
|
||||
{ "SSDD8S", 512512, SPT52, 0x04, 0x0F, 0x01, 242, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x01, 0x01, 0, 0, standard8 }, /* Standard 8" SS DD with skew */
|
||||
|
||||
{ "DSDD8", 1025024, SPT52, 0x04, 0x0F, 0x00, 493, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x01, 0x01, 0, 0, NULL }, /* Standard 8" DS DD */
|
||||
|
||||
{ "DSDD8S", 1025024, SPT52, 0x04, 0x0F, 0x00, 493, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x01, 0x01, 0, 0, NULL }, /* Standard 8" DS DD with skew */
|
||||
|
||||
{"512SSDD8",591360, 60, 0x04, 0x0F, 0x00, 280, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x02, 0x03, 0, 0, NULL }, /* Standard 8" SS DD with 512 byte sectors */
|
||||
|
||||
{"512DSDD8",1182720, 60, 0x04, 0x0F, 0x00, 569, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x02, 0x03, 0, 0, NULL }, /* Standard 8" DS DD with 512 byte sectors */
|
||||
|
||||
#if 0
|
||||
/* CP/M 3 BIOS currently does not support physical sector size 1024 */
|
||||
{"1024SSDD8",630784, 64, 0x04, 0x0F, 0x00, 299, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x03, 0x07, 0, 0, NULL }, /* Standard 8" SS DD with 1024 byte sectors */
|
||||
|
||||
{"1024DSDD8",1261568, 64, 0x04, 0x0F, 0x00, 607, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x03, 0x07, 0, 0, NULL }, /* Standard 8" DS DD with 1024 byte sectors */
|
||||
#endif
|
||||
|
||||
{ "APPLE-DO",143360, SPT32, 0x03, 0x07, 0x00, 127, 0x003F,
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x01, 0x01, 0, 0, appple_ii_DOS }, /* Apple II DOS 3.3 */
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x01, 0x01, 0, 0, apple_ii_DOS }, /* Apple II DOS 3.3 */
|
||||
|
||||
{ "APPLE-PO",143360, SPT32, 0x03, 0x07, 0x00, 127, 0x003F,
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x01, 0x01, 0, 0, appple_ii_PRODOS }, /* Apple II PRODOS */
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x01, 0x01, 0, 0, apple_ii_PRODOS }, /* Apple II PRODOS */
|
||||
|
||||
{ "APPLE-D2",143360, SPT32, 0x03, 0x07, 0x00, 127, 0x003F,
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x00, 0x00, 0, 0, appple_ii_DOS2 }, /* Apple II DOS 3.3, deblocked */
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x00, 0x00, 0, 0, apple_ii_DOS2 }, /* Apple II DOS 3.3, deblocked */
|
||||
|
||||
{ "APPLE-P2",143360, SPT32, 0x03, 0x07, 0x00, 127, 0x003F,
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x00, 0x00, 0, 0, appple_ii_PRODOS2 }, /* Apple II PRODOS, deblocked */
|
||||
0xC0, 0x00, 0x0000, 0x0003, 0x00, 0x00, 0, 0, apple_ii_PRODOS2 }, /* Apple II PRODOS, deblocked */
|
||||
|
||||
{ "MITS", 337568, SPT32, 0x03, 0x07, 0x00, 254, 0x00FF,
|
||||
0xFF, 0x00, 0x0000, 0x0006, 0x00, 0x00, 137, 3, mits }, /* MITS Altair original */
|
||||
|
@ -215,6 +247,20 @@ static DPB dpb[] = {
|
|||
{ "MITS2", 1113536, SPT32, 0x04, 0x0F, 0x00, 0x1EF, 0x00FF,
|
||||
0xF0, 0x00, 0x0000, 0x0006, 0x00, 0x00, 137, 3, mits }, /* MITS Altair original, extra */
|
||||
|
||||
/*
|
||||
dw 40 ;#128 byte records/track
|
||||
db 4,0fh ;block shift mask (2K)
|
||||
db 1 ;extent mask
|
||||
dw 194 ;maximun block number
|
||||
dw 127 ;max number of dir entry - 1
|
||||
db 0C0H,00h ;alloc vector for directory
|
||||
dw 0020h ;checksum size
|
||||
dw 2 ;offset for sys tracks
|
||||
db 2,3 ;physical sector shift (512 sector)
|
||||
*/
|
||||
{ "V1050", 409600, 40, 0x04, 0x0F, 0x01, 194, 0x007F,
|
||||
0xC0, 0x00, 0x0000, 0x0002, 0x02, 0x03, 0, 0, NULL }, /* Visual Technology Visual 1050, http://www.metabarn.com/v1050/index.html */
|
||||
|
||||
{ "", 0 }
|
||||
};
|
||||
|
||||
|
@ -228,6 +274,7 @@ static UNIT hdsk_unit[] = {
|
|||
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, HDSK_CAPACITY) },
|
||||
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE, HDSK_CAPACITY) }
|
||||
};
|
||||
static DISK_INFO* hdsk_imd[HDSK_NUMBER];
|
||||
|
||||
static REG hdsk_reg[] = {
|
||||
{ DRDATA (HDCMD, hdskLastCommand, 32), REG_RO },
|
||||
|
@ -267,63 +314,128 @@ DEVICE hdsk_dev = {
|
|||
|
||||
/* Reset routine */
|
||||
static t_stat hdsk_reset(DEVICE *dptr) {
|
||||
PNP_INFO *pnp = (PNP_INFO *)dptr->ctxt;
|
||||
if (dptr->flags & DEV_DIS) {
|
||||
sim_map_resource(pnp->io_base, pnp->io_size, RESOURCE_TYPE_IO, &hdsk_io, TRUE);
|
||||
PNP_INFO *pnp = (PNP_INFO *)dptr -> ctxt;
|
||||
if (dptr -> flags & DEV_DIS) {
|
||||
sim_map_resource(pnp -> io_base, pnp -> io_size, RESOURCE_TYPE_IO, &hdsk_io, TRUE);
|
||||
} else {
|
||||
/* Connect HDSK at base address */
|
||||
if (sim_map_resource(pnp->io_base, pnp->io_size, RESOURCE_TYPE_IO, &hdsk_io, FALSE) != 0) {
|
||||
printf("%s: error mapping I/O resource at 0x%04x\n", __FUNCTION__, pnp->mem_base);
|
||||
dptr->flags |= DEV_DIS;
|
||||
if (sim_map_resource(pnp -> io_base, pnp -> io_size, RESOURCE_TYPE_IO, &hdsk_io, FALSE) != 0) {
|
||||
printf("%s: error mapping I/O resource at 0x%04x\n", __FUNCTION__, pnp -> mem_base);
|
||||
dptr -> flags |= DEV_DIS;
|
||||
return SCPE_ARG;
|
||||
}
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Attach routine */
|
||||
static t_stat hdsk_attach(UNIT *uptr, char *cptr) {
|
||||
t_stat r;
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
static uint32 is_imd(const UNIT *uptr) {
|
||||
return ((uptr != NULL) && (uptr -> filename != NULL) && (strlen(uptr -> filename) > 3) &&
|
||||
(strcasecmp(".IMD", uptr -> filename + strlen(uptr -> filename) - 4) == 0));
|
||||
}
|
||||
|
||||
static void assignFormat(UNIT *uptr) {
|
||||
uint32 i;
|
||||
char unitChar;
|
||||
|
||||
r = attach_unit(uptr, cptr); /* attach unit */
|
||||
if ( r != SCPE_OK) /* error? */
|
||||
return r;
|
||||
|
||||
/* Step 1: Determine capacity of this disk */
|
||||
uptr -> capac = sim_fsize(uptr -> fileref); /* the file length is a good indication */
|
||||
if (uptr -> capac == 0) { /* file does not exist or has length 0 */
|
||||
uptr -> capac = uptr -> HDSK_NUMBER_OF_TRACKS *
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE;
|
||||
if (uptr -> capac == 0)
|
||||
uptr -> capac = HDSK_CAPACITY;
|
||||
} /* post condition: uptr -> capac > 0 */
|
||||
assert(uptr -> capac);
|
||||
|
||||
/* Step 2: Determine format based on disk capacity */
|
||||
uptr -> HDSK_FORMAT_TYPE = -1; /* default to unknown format type */
|
||||
for (i = 0; dpb[i].capac != 0; i++) { /* find disk parameter block */
|
||||
if (dpb[i].capac == uptr -> capac) { /* found if correct capacity */
|
||||
uptr -> HDSK_FORMAT_TYPE = -1; /* default to unknown format type */
|
||||
for (i = 0; dpb[i].capac != 0; i++) { /* find disk parameter block */
|
||||
if (dpb[i].capac == uptr -> capac) { /* found if correct capacity */
|
||||
uptr -> HDSK_FORMAT_TYPE = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 3: Set number of sectors per track and sector size */
|
||||
if (uptr -> HDSK_FORMAT_TYPE == -1) { /* Case 1: no disk parameter block found*/
|
||||
for (i = 0; i < hdsk_dev.numunits; i++) /* find affected unit number */
|
||||
if (&hdsk_unit[i] == uptr)
|
||||
break; /* found */
|
||||
unitChar = '0' + i;
|
||||
static void verifyDiskInfo(const DISK_INFO info, const char unitChar) {
|
||||
uint32 track, head;
|
||||
if (info.ntracks < 1)
|
||||
printf("HDSK%c (IMD): WARNING: Number of tracks is 0.\n", unitChar);
|
||||
if (info.nsides < 1) {
|
||||
printf("HDSK%c (IMD): WARNING: Number of sides is 0.\n", unitChar);
|
||||
return;
|
||||
}
|
||||
for (track = 0; track < info.ntracks / info.nsides; track++)
|
||||
for (head = 0; head < info.nsides; head++) {
|
||||
if (info.track[track][head].nsects != info.track[1][0].nsects)
|
||||
printf("HDSK%c (IMD): WARNING: For track %i and head %i expected number of sectors "
|
||||
"%i but got %i.\n", unitChar, track, head,
|
||||
info.track[1][0].nsects, info.track[track][head].nsects);
|
||||
if (info.track[track][head].sectsize != info.track[1][0].sectsize)
|
||||
printf("HDSK%c (IMD): WARNING: For track %i and head %i expected sector size "
|
||||
"%i but got %i.\n", unitChar, track, head,
|
||||
info.track[1][0].sectsize, info.track[track][head].sectsize);
|
||||
if (info.track[track][head].start_sector != info.track[1][0].start_sector)
|
||||
printf("HDSK%c (IMD): WARNING: For track %i and head %i expected start sector "
|
||||
"%i but got %i.\n", unitChar, track, head,
|
||||
info.track[1][0].start_sector, info.track[track][head].start_sector);
|
||||
}
|
||||
}
|
||||
|
||||
/* Attach routine */
|
||||
static t_stat hdsk_attach(UNIT *uptr, char *cptr) {
|
||||
int32 thisUnitIndex;
|
||||
char unitChar;
|
||||
const t_stat r = attach_unit(uptr, cptr); /* attach unit */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
return r;
|
||||
|
||||
assert(uptr != NULL);
|
||||
thisUnitIndex = find_unit_index(uptr);
|
||||
unitChar = '0' + thisUnitIndex;
|
||||
assert((0 <= thisUnitIndex) && (thisUnitIndex < HDSK_NUMBER));
|
||||
|
||||
if (is_imd(uptr)) {
|
||||
if ((sim_fsize(uptr -> fileref) == 0) &&
|
||||
(diskCreate(uptr -> fileref, "$Id: SIMH hdsk.c $") != SCPE_OK)) {
|
||||
printf("HDSK%c (IMD): Failed to create IMD disk.\n", unitChar);
|
||||
detach_unit(uptr);
|
||||
return SCPE_OPENERR;
|
||||
}
|
||||
hdsk_imd[thisUnitIndex] = diskOpen(uptr -> fileref, sim_deb && (hdsk_dev.dctrl & VERBOSE_MSG));
|
||||
if (hdsk_imd[thisUnitIndex] == NULL)
|
||||
return SCPE_IOERR;
|
||||
verifyDiskInfo(*hdsk_imd[thisUnitIndex], '0' + thisUnitIndex);
|
||||
uptr -> HDSK_NUMBER_OF_TRACKS = hdsk_imd[thisUnitIndex] -> ntracks;
|
||||
uptr -> HDSK_SECTORS_PER_TRACK = hdsk_imd[thisUnitIndex] -> track[1][0].nsects;
|
||||
uptr -> HDSK_SECTOR_SIZE = hdsk_imd[thisUnitIndex] -> track[1][0].sectsize;
|
||||
uptr -> capac = ((uptr -> HDSK_NUMBER_OF_TRACKS) *
|
||||
(uptr -> HDSK_SECTORS_PER_TRACK) *
|
||||
(uptr -> HDSK_SECTOR_SIZE));
|
||||
assignFormat(uptr);
|
||||
if (uptr -> HDSK_FORMAT_TYPE == -1) { /* Case 1: no disk parameter block found*/
|
||||
uptr -> HDSK_FORMAT_TYPE = 0;
|
||||
printf("HDSK%c (IMD): WARNING: Unsupported disk capacity, assuming HDSK type "
|
||||
"with capacity %iKB.\n", unitChar, uptr -> capac / 1000);
|
||||
uptr -> flags |= UNIT_HDSK_WLK;
|
||||
printf("HDSK%c (IMD): WARNING: Forcing WRTLCK.\n", unitChar);
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Step 1: Determine capacity of this disk */
|
||||
uptr -> capac = sim_fsize(uptr -> fileref); /* the file length is a good indication */
|
||||
if (uptr -> capac == 0) { /* file does not exist or has length 0 */
|
||||
uptr -> capac = (uptr -> HDSK_NUMBER_OF_TRACKS *
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE);
|
||||
if (uptr -> capac == 0)
|
||||
uptr -> capac = HDSK_CAPACITY;
|
||||
} /* post condition: uptr -> capac > 0 */
|
||||
assert(uptr -> capac);
|
||||
|
||||
/* Step 2: Determine format based on disk capacity */
|
||||
assignFormat(uptr);
|
||||
|
||||
/* Step 3: Set number of sectors per track and sector size */
|
||||
if (uptr -> HDSK_FORMAT_TYPE == -1) { /* Case 1: no disk parameter block found */
|
||||
uptr -> HDSK_FORMAT_TYPE = 0;
|
||||
printf("HDSK%c: WARNING: Unsupported disk capacity, assuming HDSK type with capacity %iKB.\n",
|
||||
unitChar, uptr -> capac / 1000);
|
||||
unitChar, uptr -> capac / 1000);
|
||||
uptr -> flags |= UNIT_HDSK_WLK;
|
||||
printf("HDSK%c: WARNING: Forcing WRTLCK.\n", unitChar);
|
||||
/* check whether capacity corresponds to setting of tracks, sectors per track and sector size */
|
||||
/* check whether capacity corresponds to setting of tracks, sectors per track and sector size */
|
||||
if (uptr -> capac != (uint32)(uptr -> HDSK_NUMBER_OF_TRACKS *
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE)) {
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE)) {
|
||||
printf("HDSK%c: WARNING: Fixing geometry.\n", unitChar);
|
||||
if (uptr -> HDSK_SECTORS_PER_TRACK == 0)
|
||||
uptr -> HDSK_SECTORS_PER_TRACK = 32;
|
||||
|
@ -331,27 +443,35 @@ static t_stat hdsk_attach(UNIT *uptr, char *cptr) {
|
|||
uptr -> HDSK_SECTOR_SIZE = 128;
|
||||
}
|
||||
}
|
||||
else { /* Case 2: disk parameter block found */
|
||||
else { /* Case 2: disk parameter block found */
|
||||
uptr -> HDSK_SECTORS_PER_TRACK = dpb[uptr -> HDSK_FORMAT_TYPE].spt >> dpb[uptr -> HDSK_FORMAT_TYPE].psh;
|
||||
uptr -> HDSK_SECTOR_SIZE = (128 << dpb[uptr -> HDSK_FORMAT_TYPE].psh);
|
||||
}
|
||||
assert((uptr -> HDSK_SECTORS_PER_TRACK) && (uptr -> HDSK_SECTOR_SIZE) && (uptr -> HDSK_FORMAT_TYPE >= 0));
|
||||
|
||||
/* Step 4: Number of tracks is smallest number to accomodate capacity */
|
||||
|
||||
/* Step 4: Number of tracks is smallest number to accomodate capacity */
|
||||
uptr -> HDSK_NUMBER_OF_TRACKS = (uptr -> capac + uptr -> HDSK_SECTORS_PER_TRACK *
|
||||
uptr -> HDSK_SECTOR_SIZE - 1) / (uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE);
|
||||
uptr -> HDSK_SECTOR_SIZE - 1) / (uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE);
|
||||
assert( ( (t_addr) ((uptr -> HDSK_NUMBER_OF_TRACKS - 1) * uptr -> HDSK_SECTORS_PER_TRACK *
|
||||
uptr -> HDSK_SECTOR_SIZE) < uptr -> capac) &&
|
||||
(uptr -> capac <= (t_addr) (uptr -> HDSK_NUMBER_OF_TRACKS *
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE) ) );
|
||||
|
||||
uptr -> HDSK_SECTOR_SIZE) < uptr -> capac) &&
|
||||
(uptr -> capac <= (t_addr) (uptr -> HDSK_NUMBER_OF_TRACKS *
|
||||
uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE) ) );
|
||||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
static t_stat hdsk_detach(UNIT *uptr) {
|
||||
t_stat result;
|
||||
int32 unitIndex;
|
||||
if (uptr == NULL)
|
||||
return SCPE_IERR;
|
||||
if (is_imd(uptr)) {
|
||||
unitIndex = find_unit_index(uptr);
|
||||
if (unitIndex == -1)
|
||||
return SCPE_IERR;
|
||||
assert((0 <= unitIndex) && (unitIndex < HDSK_NUMBER));
|
||||
diskClose(&hdsk_imd[unitIndex]);
|
||||
}
|
||||
result = detach_unit(uptr);
|
||||
uptr -> capac = HDSK_CAPACITY;
|
||||
uptr -> HDSK_FORMAT_TYPE = 0;
|
||||
|
@ -490,7 +610,7 @@ static t_stat hdsk_boot(int32 unitno, DEVICE *dptr) {
|
|||
install_ALTAIRbootROM(); /* install modified ROM */
|
||||
}
|
||||
assert(install_bootrom(bootrom_hdsk, BOOTROM_SIZE_HDSK, HDSK_BOOT_ADDRESS, FALSE) == SCPE_OK);
|
||||
*((int32 *) sim_PC->loc) = HDSK_BOOT_ADDRESS;
|
||||
*((int32 *) sim_PC -> loc) = HDSK_BOOT_ADDRESS;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -603,22 +723,57 @@ static int32 doSeek(void) {
|
|||
return CPM_OK;
|
||||
}
|
||||
|
||||
uint8 hdskbuf[HDSK_MAX_SECTOR_SIZE] = { 0 }; /* data buffer */
|
||||
static uint8 hdskbuf[HDSK_MAX_SECTOR_SIZE] = { 0 }; /* data buffer */
|
||||
|
||||
/* pre-condition: checkParameters has been executed to repair any faulty parameters */
|
||||
static int32 doRead(void) {
|
||||
int32 i;
|
||||
t_stat result;
|
||||
DISK_INFO *thisDisk;
|
||||
int32 hostSector;
|
||||
int32 sectorSize;
|
||||
uint32 flags;
|
||||
uint32 readlen;
|
||||
uint32 cylinder;
|
||||
uint32 head;
|
||||
UNIT *uptr = &hdsk_dev.units[selectedDisk];
|
||||
if (doSeek())
|
||||
return CPM_ERROR;
|
||||
|
||||
if (sim_fread(hdskbuf, 1, uptr -> HDSK_SECTOR_SIZE, uptr -> fileref) != (size_t)(uptr -> HDSK_SECTOR_SIZE)) {
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = CPM_EMPTY;
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d: " ADDRESS_FORMAT
|
||||
" Could not read Sector=%02d Track=%04d.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack);
|
||||
return CPM_OK; /* allows the creation of empty hard disks */
|
||||
if (is_imd(uptr)) {
|
||||
thisDisk = hdsk_imd[selectedDisk];
|
||||
hostSector = ((dpb[uptr -> HDSK_FORMAT_TYPE].skew == NULL) ?
|
||||
selectedSector : dpb[uptr -> HDSK_FORMAT_TYPE].skew[selectedSector]) + thisDisk -> track[1][0].start_sector;
|
||||
sectorSize = ((dpb[uptr -> HDSK_FORMAT_TYPE].physicalSectorSize == 0) ?
|
||||
uptr -> HDSK_SECTOR_SIZE :
|
||||
dpb[uptr -> HDSK_FORMAT_TYPE].physicalSectorSize);
|
||||
flags = 0;
|
||||
readlen = 0;
|
||||
cylinder = selectedTrack;
|
||||
head = 0;
|
||||
if (cylinder >= thisDisk -> ntracks / thisDisk -> nsides) {
|
||||
head = 1;
|
||||
cylinder -= thisDisk -> ntracks / thisDisk -> nsides;
|
||||
}
|
||||
result = sectRead(thisDisk, cylinder, head, hostSector, hdskbuf, sectorSize,
|
||||
&flags, &readlen);
|
||||
if (result != SCPE_OK) {
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = CPM_EMPTY;
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d (IMD): " ADDRESS_FORMAT
|
||||
" . Could not read Sector=%02d Track=%04d.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack);
|
||||
return CPM_ERROR;
|
||||
}
|
||||
} else {
|
||||
if (doSeek())
|
||||
return CPM_ERROR;
|
||||
|
||||
if (sim_fread(hdskbuf, 1, uptr -> HDSK_SECTOR_SIZE, uptr -> fileref) != (size_t)(uptr -> HDSK_SECTOR_SIZE)) {
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = CPM_EMPTY;
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d: " ADDRESS_FORMAT
|
||||
" Could not read Sector=%02d Track=%04d.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack);
|
||||
return CPM_OK; /* allows the creation of empty hard disks */
|
||||
}
|
||||
}
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
PutBYTEWrapper(selectedDMA + i, hdskbuf[i]);
|
||||
|
@ -628,19 +783,54 @@ static int32 doRead(void) {
|
|||
/* pre-condition: checkParameters has been executed to repair any faulty parameters */
|
||||
static int32 doWrite(void) {
|
||||
int32 i;
|
||||
t_stat result;
|
||||
DISK_INFO *thisDisk;
|
||||
int32 hostSector;
|
||||
int32 sectorSize;
|
||||
uint32 flags;
|
||||
uint32 writelen;
|
||||
uint32 cylinder;
|
||||
uint32 head;
|
||||
size_t rtn;
|
||||
UNIT *uptr = &hdsk_dev.units[selectedDisk];
|
||||
if (((uptr -> flags) & UNIT_HDSK_WLK) == 0) { /* write enabled */
|
||||
if (doSeek())
|
||||
return CPM_ERROR;
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = GetBYTEWrapper(selectedDMA + i);
|
||||
rtn = sim_fwrite(hdskbuf, 1, uptr -> HDSK_SECTOR_SIZE, uptr -> fileref);
|
||||
if (rtn != (size_t)(uptr -> HDSK_SECTOR_SIZE)) {
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d: " ADDRESS_FORMAT
|
||||
" Could not write Sector=%02d Track=%04d Result=%zd.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack, rtn);
|
||||
return CPM_ERROR;
|
||||
if (is_imd(uptr)) {
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = GetBYTEWrapper(selectedDMA + i);
|
||||
thisDisk = hdsk_imd[selectedDisk];
|
||||
hostSector = ((dpb[uptr -> HDSK_FORMAT_TYPE].skew == NULL) ?
|
||||
selectedSector : dpb[uptr -> HDSK_FORMAT_TYPE].skew[selectedSector]) + thisDisk -> track[1][0].start_sector;
|
||||
sectorSize = ((dpb[uptr -> HDSK_FORMAT_TYPE].physicalSectorSize == 0) ?
|
||||
uptr -> HDSK_SECTOR_SIZE :
|
||||
dpb[uptr -> HDSK_FORMAT_TYPE].physicalSectorSize);
|
||||
flags = 0;
|
||||
writelen = 0;
|
||||
cylinder = selectedTrack;
|
||||
head = 0;
|
||||
if (cylinder >= thisDisk -> ntracks / thisDisk -> nsides) {
|
||||
head = 1;
|
||||
cylinder -= thisDisk -> ntracks / thisDisk -> nsides;
|
||||
}
|
||||
result = sectWrite(thisDisk, cylinder, head, hostSector, hdskbuf,
|
||||
sectorSize, &flags, &writelen);
|
||||
if (result != SCPE_OK) {
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d (IMD): " ADDRESS_FORMAT
|
||||
" . Could not write Sector=%02d Track=%04d.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack);
|
||||
return CPM_ERROR;
|
||||
}
|
||||
} else {
|
||||
if (doSeek())
|
||||
return CPM_ERROR;
|
||||
for (i = 0; i < uptr -> HDSK_SECTOR_SIZE; i++)
|
||||
hdskbuf[i] = GetBYTEWrapper(selectedDMA + i);
|
||||
rtn = sim_fwrite(hdskbuf, 1, uptr -> HDSK_SECTOR_SIZE, uptr -> fileref);
|
||||
if (rtn != (size_t)(uptr -> HDSK_SECTOR_SIZE)) {
|
||||
sim_debug(VERBOSE_MSG, &hdsk_dev, "HDSK%d: " ADDRESS_FORMAT
|
||||
" Could not write Sector=%02d Track=%04d Result=%zd.\n",
|
||||
selectedDisk, PCX, selectedSector, selectedTrack, rtn);
|
||||
return CPM_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_net.c: networking capability
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -77,16 +77,14 @@ static struct {
|
|||
static UNIT net_unit = {
|
||||
UDATA (&net_svc, UNIT_ATTABLE, 0),
|
||||
0, /* wait, set in attach */
|
||||
0, /* u3 = Port */
|
||||
0, /* u4 = IP of host */
|
||||
0, /* u3, unused */
|
||||
0, /* u4, unused */
|
||||
0, /* u5, unused */
|
||||
0, /* u6, unused */
|
||||
};
|
||||
|
||||
static REG net_reg[] = {
|
||||
{ DRDATA (POLL, net_unit.wait, 32) },
|
||||
{ HRDATA (IPHOST, net_unit.u4, 32), REG_RO },
|
||||
{ DRDATA (PORT, net_unit.u3, 32), REG_RO },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_sio.c: MITS Altair serial I/O card
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -64,27 +64,27 @@
|
|||
|
||||
uint8 *URLContents(const char *URL, uint32 *length);
|
||||
#ifndef URL_READER_SUPPORT
|
||||
#define RESULT_BUFFER_LENGTH 1024
|
||||
#define RESULT_BUFFER_LENGTH 1024
|
||||
#define RESULT_LEAD_IN "URL is not supported on this platform. START URL \""
|
||||
#define RESULT_LEAD_OUT "\" URL END."
|
||||
uint8 *URLContents(const char *URL, uint32 *length) {
|
||||
char str[RESULT_BUFFER_LENGTH] = RESULT_LEAD_IN;
|
||||
char str[RESULT_BUFFER_LENGTH] = RESULT_LEAD_IN;
|
||||
char *result;
|
||||
strncat(str, URL, RESULT_BUFFER_LENGTH - strlen(RESULT_LEAD_IN) - strlen(RESULT_LEAD_OUT) - 1);
|
||||
strcat(str, RESULT_LEAD_OUT);
|
||||
result = malloc(strlen(str));
|
||||
strcpy(result, str);
|
||||
*length = strlen(str);
|
||||
return (uint8*)result;
|
||||
strncat(str, URL, RESULT_BUFFER_LENGTH - strlen(RESULT_LEAD_IN) - strlen(RESULT_LEAD_OUT) - 1);
|
||||
strcat(str, RESULT_LEAD_OUT);
|
||||
result = (char*)malloc(strlen(str));
|
||||
strcpy(result, str);
|
||||
*length = strlen(str);
|
||||
return (uint8*)result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Debug flags */
|
||||
#define IN_MSG (1 << 0)
|
||||
#define OUT_MSG (1 << 1)
|
||||
#define CMD_MSG (1 << 2)
|
||||
#define VERBOSE_MSG (1 << 3)
|
||||
#define BUFFER_EMPTY_MSG (1 << 4)
|
||||
#define IN_MSG (1 << 0)
|
||||
#define OUT_MSG (1 << 1)
|
||||
#define CMD_MSG (1 << 2)
|
||||
#define VERBOSE_MSG (1 << 3)
|
||||
#define BUFFER_EMPTY_MSG (1 << 4)
|
||||
|
||||
#define UNIT_V_SIO_ANSI (UNIT_V_UF + 0) /* ANSI mode, strip bit 8 on output */
|
||||
#define UNIT_SIO_ANSI (1 << UNIT_V_SIO_ANSI)
|
||||
|
@ -172,12 +172,12 @@ extern volatile int32 stop_cpu;
|
|||
|
||||
/* Debug Flags */
|
||||
static DEBTAB generic_dt[] = {
|
||||
{ "IN", IN_MSG },
|
||||
{ "OUT", OUT_MSG },
|
||||
{ "CMD", CMD_MSG },
|
||||
{ "VERBOSE", VERBOSE_MSG },
|
||||
{ "BUFFEREMPTY", BUFFER_EMPTY_MSG },
|
||||
{ NULL, 0 }
|
||||
{ "IN", IN_MSG },
|
||||
{ "OUT", OUT_MSG },
|
||||
{ "CMD", CMD_MSG },
|
||||
{ "VERBOSE", VERBOSE_MSG },
|
||||
{ "BUFFEREMPTY", BUFFER_EMPTY_MSG },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
/* SIMH pseudo device status registers */
|
||||
|
@ -225,10 +225,10 @@ static int32 lastCPMStatus = 0; /* result of last attachCPM comm
|
|||
static int32 lastCommand = 0; /* most recent command processed on port 0xfeh */
|
||||
static int32 getCommonPos = 0; /* determines state for sending the 'common' register */
|
||||
|
||||
/* CPU Clock Frequency related */
|
||||
/* CPU Clock Frequency related */
|
||||
static uint32 newClockFrequency;
|
||||
static int32 setClockFrequencyPos = 0; /* determines state for sending the clock frequency */
|
||||
static int32 getClockFrequencyPos = 0; /* determines state for receiving the clock frequency */
|
||||
static int32 setClockFrequencyPos = 0; /* determines state for sending the clock frequency */
|
||||
static int32 getClockFrequencyPos = 0; /* determines state for receiving the clock frequency */
|
||||
|
||||
/* support for wild card expansion */
|
||||
#if UNIX_PLATFORM
|
||||
|
@ -274,7 +274,7 @@ static UNIT sio_unit = {
|
|||
100000, /* wait */
|
||||
FALSE, /* u3 = FALSE, no character available in buffer */
|
||||
FALSE, /* u4 = FALSE, terminal input is not attached to a file */
|
||||
0, /* u5 = 0, not used */
|
||||
0, /* u5 = 0, not used */
|
||||
0 /* u6 = 0, not used */
|
||||
};
|
||||
|
||||
|
@ -456,7 +456,7 @@ static t_stat sio_reset(DEVICE *dptr) {
|
|||
int32 i;
|
||||
sim_debug(VERBOSE_MSG, &sio_dev, "SIO: " ADDRESS_FORMAT " Reset\n", PCX);
|
||||
sio_unit.u3 = FALSE; /* no character in terminal input buffer */
|
||||
sio_unit.buf = 0;
|
||||
sio_unit.buf = 0;
|
||||
resetSIOWarningFlags();
|
||||
if (sio_unit.u4) /* is terminal input attached to a file? */
|
||||
rewind(sio_unit.fileref); /* yes, rewind input */
|
||||
|
@ -472,7 +472,7 @@ static t_stat ptr_reset(DEVICE *dptr) {
|
|||
sim_debug(VERBOSE_MSG, &ptr_dev, "PTR: " ADDRESS_FORMAT " Reset\n", PCX);
|
||||
resetSIOWarningFlags();
|
||||
ptr_unit.u3 = FALSE; /* End Of File not yet reached */
|
||||
ptr_unit.buf = 0;
|
||||
ptr_unit.buf = 0;
|
||||
if (ptr_unit.flags & UNIT_ATT) /* attached? */
|
||||
rewind(ptr_unit.fileref);
|
||||
sim_map_resource(0x12, 1, RESOURCE_TYPE_IO, &sio1s, dptr->flags & DEV_DIS);
|
||||
|
@ -650,18 +650,18 @@ static int32 sio0sCore(const int32 port, const int32 io, const int32 data) {
|
|||
pollConnection();
|
||||
if (io == 0) { /* IN */
|
||||
if (sio_unit.u4) { /* attached to a file? */
|
||||
if (sio_unit.u3) /* character available? */
|
||||
return spi.sio_can_read | spi.sio_can_write;
|
||||
ch = getc(sio_unit.fileref);
|
||||
if (ch == EOF) {
|
||||
if (sio_unit.u3) /* character available? */
|
||||
return spi.sio_can_read | spi.sio_can_write;
|
||||
ch = getc(sio_unit.fileref);
|
||||
if (ch == EOF) {
|
||||
sio_detach(&sio_unit); /* detach file and switch to keyboard input */
|
||||
return spi.sio_cannot_read | spi.sio_can_write;
|
||||
}
|
||||
else {
|
||||
sio_unit.u3 = TRUE; /* indicate character available */
|
||||
sio_unit.buf = ch; /* store character in buffer */
|
||||
return spi.sio_can_read | spi.sio_can_write;
|
||||
}
|
||||
return spi.sio_cannot_read | spi.sio_can_write;
|
||||
}
|
||||
else {
|
||||
sio_unit.u3 = TRUE; /* indicate character available */
|
||||
sio_unit.buf = ch; /* store character in buffer */
|
||||
return spi.sio_can_read | spi.sio_can_write;
|
||||
}
|
||||
}
|
||||
if (sio_unit.flags & UNIT_ATT) { /* attached to a port? */
|
||||
if (tmxr_rqln(&TerminalLines[spi.terminalLine]))
|
||||
|
@ -692,8 +692,8 @@ static int32 sio0sCore(const int32 port, const int32 io, const int32 data) {
|
|||
return spi.sio_cannot_read | spi.sio_can_write;
|
||||
} /* OUT follows, no fall-through from IN */
|
||||
if (spi.hasReset && (data == spi.sio_reset)) { /* reset command */
|
||||
if (!sio_unit.u4) /* only reset for regular console I/O */
|
||||
sio_unit.u3 = FALSE; /* indicate that no character is available */
|
||||
if (!sio_unit.u4) /* only reset for regular console I/O */
|
||||
sio_unit.u3 = FALSE; /* indicate that no character is available */
|
||||
sim_debug(CMD_MSG, &sio_dev, "\tSIO_S: " ADDRESS_FORMAT
|
||||
" Command OUT(0x%03x) = 0x%02x\n", PCX, port, data);
|
||||
}
|
||||
|
@ -723,7 +723,7 @@ static int32 sio0dCore(const int32 port, const int32 io, const int32 data) {
|
|||
if ((sio_unit.flags & UNIT_ATT) && (!sio_unit.u4))
|
||||
return mapCharacter(tmxr_getc_ln(&TerminalLines[spi.terminalLine]));
|
||||
if (!sio_unit.u3) {
|
||||
sim_debug(BUFFER_EMPTY_MSG, &sio_dev, "\tSIO_D: " ADDRESS_FORMAT
|
||||
sim_debug(BUFFER_EMPTY_MSG, &sio_dev, "\tSIO_D: " ADDRESS_FORMAT
|
||||
" IN(0x%03x) for empty character buffer\n", PCX, port);
|
||||
}
|
||||
sio_unit.u3 = FALSE; /* no character is available any more */
|
||||
|
@ -733,8 +733,10 @@ static int32 sio0dCore(const int32 port, const int32 io, const int32 data) {
|
|||
ch = sio_unit.flags & UNIT_SIO_ANSI ? data & 0x7f : data; /* clear highest bit in ANSI mode */
|
||||
if ((ch != CONTROLG_CHAR) || !(sio_unit.flags & UNIT_SIO_BELL)) {
|
||||
voidSleep();
|
||||
if ((sio_unit.flags & UNIT_ATT) && (!sio_unit.u4)) /* attached to a port and not to a file */
|
||||
if ((sio_unit.flags & UNIT_ATT) && (!sio_unit.u4)) { /* attached to a port and not to a file */
|
||||
tmxr_putc_ln(&TerminalLines[spi.terminalLine], ch); /* status ignored */
|
||||
tmxr_poll_tx(&altairTMXR); /* poll xmt */
|
||||
}
|
||||
else
|
||||
sim_putchar(ch);
|
||||
}
|
||||
|
@ -743,15 +745,15 @@ static int32 sio0dCore(const int32 port, const int32 io, const int32 data) {
|
|||
}
|
||||
|
||||
static char* printable(char* result, int32 data, const int32 isIn) {
|
||||
result[0] = 0;
|
||||
data &= 0x7f;
|
||||
if ((0x20 <= data) && (data < 0x7f))
|
||||
sprintf(result, isIn ? " <-\"%c\"" : " ->\"%c\"", data);
|
||||
return result;
|
||||
result[0] = 0;
|
||||
data &= 0x7f;
|
||||
if ((0x20 <= data) && (data < 0x7f))
|
||||
sprintf(result, isIn ? " <-\"%c\"" : " ->\"%c\"", data);
|
||||
return result;
|
||||
}
|
||||
|
||||
int32 sio0d(const int32 port, const int32 io, const int32 data) {
|
||||
char buffer[8];
|
||||
char buffer[8];
|
||||
const int32 result = sio0dCore(port, io, data);
|
||||
if (io == 0) {
|
||||
sim_debug(IN_MSG, &sio_dev, "\tSIO_D: " ADDRESS_FORMAT
|
||||
|
@ -797,7 +799,7 @@ int32 sio1s(const int32 port, const int32 io, const int32 data) {
|
|||
" IN(0x%02x) = 0x%02x\n", PCX, port, result);
|
||||
sim_debug(IN_MSG, &ptp_dev, "PTP_S: " ADDRESS_FORMAT
|
||||
" IN(0x%02x) = 0x%02x\n", PCX, port, result);
|
||||
}
|
||||
}
|
||||
else if (io) {
|
||||
sim_debug(OUT_MSG, &ptr_dev, "PTR_S: " ADDRESS_FORMAT
|
||||
" OUT(0x%02x) = 0x%02x\n", PCX, port, data);
|
||||
|
@ -1068,11 +1070,11 @@ static int32 fromBCD(const int32 x) {
|
|||
out (0feh),a
|
||||
ld a,<p2>
|
||||
out (0feh),a
|
||||
... ; send all parameters
|
||||
... ; send all parameters
|
||||
in a,(0feh) ; <A> contains first byte of result
|
||||
in a,(0feh) ; <A> contains second byte of result
|
||||
...
|
||||
|
||||
|
||||
*/
|
||||
|
||||
enum simhPseudoDeviceCommands { /* do not change order or remove commands, add only at the end */
|
||||
|
@ -1106,10 +1108,10 @@ enum simhPseudoDeviceCommands { /* do not change order or remove commands, add o
|
|||
SIMHSleepCmd, /* 27 let SIMH sleep for SIMHSleep microseconds */
|
||||
getHostOSPathSeparatorCmd, /* 28 obtain the file path separator of the OS under which SIMH runs */
|
||||
getHostFilenamesCmd, /* 29 perform wildcard expansion and obtain list of file names */
|
||||
readURLCmd, /* 30 read the contents of an URL */
|
||||
getCPUClockFrequency, /* 31 get the clock frequency of the CPU */
|
||||
setCPUClockFrequency, /* 32 set the clock frequency of the CPU */
|
||||
kSimhPseudoDeviceCommands
|
||||
readURLCmd, /* 30 read the contents of an URL */
|
||||
getCPUClockFrequency, /* 31 get the clock frequency of the CPU */
|
||||
setCPUClockFrequency, /* 32 set the clock frequency of the CPU */
|
||||
kSimhPseudoDeviceCommands
|
||||
};
|
||||
|
||||
static char *cmdNames[kSimhPseudoDeviceCommands] = {
|
||||
|
@ -1143,9 +1145,9 @@ static char *cmdNames[kSimhPseudoDeviceCommands] = {
|
|||
"SIMHSleep",
|
||||
"getHostOSPathSeparator",
|
||||
"getHostFilenames",
|
||||
"readURL",
|
||||
"getCPUClockFrequency",
|
||||
"setCPUClockFrequency",
|
||||
"readURL",
|
||||
"getCPUClockFrequency",
|
||||
"setCPUClockFrequency",
|
||||
};
|
||||
|
||||
#define CPM_COMMAND_LINE_LENGTH 128
|
||||
|
@ -1155,7 +1157,7 @@ static struct tm currentTime;
|
|||
static int32 currentTimeValid = FALSE;
|
||||
static char version[] = "SIMH004";
|
||||
|
||||
#define URL_MAX_LENGTH 1024
|
||||
#define URL_MAX_LENGTH 1024
|
||||
static uint32 urlPointer;
|
||||
static char urlStore[URL_MAX_LENGTH];
|
||||
static uint8 *urlResult = NULL;
|
||||
|
@ -1182,13 +1184,13 @@ static t_stat simh_dev_reset(DEVICE *dptr) {
|
|||
lastCommand = 0;
|
||||
lastCPMStatus = SCPE_OK;
|
||||
timerInterrupt = FALSE;
|
||||
urlPointer = 0;
|
||||
getClockFrequencyPos = 0;
|
||||
setClockFrequencyPos = 0;
|
||||
if (urlResult != NULL) {
|
||||
free(urlResult);
|
||||
urlResult = NULL;
|
||||
}
|
||||
urlPointer = 0;
|
||||
getClockFrequencyPos = 0;
|
||||
setClockFrequencyPos = 0;
|
||||
if (urlResult != NULL) {
|
||||
free(urlResult);
|
||||
urlResult = NULL;
|
||||
}
|
||||
if (simh_unit.flags & UNIT_SIMH_TIMERON)
|
||||
simh_dev_set_timeron(NULL, 0, NULL, NULL);
|
||||
return SCPE_OK;
|
||||
|
@ -1265,8 +1267,8 @@ static void attachCPM(UNIT *uptr) {
|
|||
if (uptr == &ptr_unit)
|
||||
sim_switches = SWMASK('R') | SWMASK('Q');
|
||||
else if (uptr == &ptp_unit)
|
||||
sim_switches = SWMASK('W') | SWMASK('C') | SWMASK('Q');
|
||||
/* 'C' option makes sure that file is properly truncated if it had existed before */
|
||||
sim_switches = SWMASK('W') | SWMASK('N') | SWMASK('Q');
|
||||
/* 'N' option makes sure that file is properly truncated if it had existed before */
|
||||
sim_quiet = sim_switches & SWMASK ('Q'); /* -q means quiet */
|
||||
lastCPMStatus = attach_unit(uptr, cpmCommandLine);
|
||||
if (lastCPMStatus != SCPE_OK) {
|
||||
|
@ -1319,26 +1321,26 @@ static void setClockCPM3(void) {
|
|||
static int32 simh_in(const int32 port) {
|
||||
int32 result = 0;
|
||||
switch(lastCommand) {
|
||||
case readURLCmd:
|
||||
case readURLCmd:
|
||||
if (isInReadPhase) {
|
||||
if (showAvailability) {
|
||||
if (resultPointer < resultLength)
|
||||
result = 1;
|
||||
else {
|
||||
if (urlResult != NULL)
|
||||
free(urlResult);
|
||||
urlResult = NULL;
|
||||
lastCommand = 0;
|
||||
}
|
||||
}
|
||||
else if (resultPointer < resultLength)
|
||||
result = urlResult[resultPointer++];
|
||||
showAvailability = 1 - showAvailability;
|
||||
if (showAvailability) {
|
||||
if (resultPointer < resultLength)
|
||||
result = 1;
|
||||
else {
|
||||
if (urlResult != NULL)
|
||||
free(urlResult);
|
||||
urlResult = NULL;
|
||||
lastCommand = 0;
|
||||
}
|
||||
}
|
||||
else if (resultPointer < resultLength)
|
||||
result = urlResult[resultPointer++];
|
||||
showAvailability = 1 - showAvailability;
|
||||
}
|
||||
else
|
||||
lastCommand = 0;
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case getHostFilenamesCmd:
|
||||
#if UNIX_PLATFORM
|
||||
if (globValid) {
|
||||
|
@ -1479,7 +1481,7 @@ static int32 simh_in(const int32 port) {
|
|||
}
|
||||
break;
|
||||
|
||||
case getCPUClockFrequency:
|
||||
case getCPUClockFrequency:
|
||||
if (getClockFrequencyPos == 0) {
|
||||
result = getClockFrequency() & 0xff;
|
||||
getClockFrequencyPos = 1;
|
||||
|
@ -1489,7 +1491,7 @@ static int32 simh_in(const int32 port) {
|
|||
getClockFrequencyPos = lastCommand = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case hasBankedMemoryCmd:
|
||||
result = cpu_unit.flags & UNIT_CPU_BANKED ? MAXBANKS : 0;
|
||||
lastCommand = 0;
|
||||
|
@ -1542,7 +1544,7 @@ void do_SIMH_sleep(void) {
|
|||
static int32 simh_out(const int32 port, const int32 data) {
|
||||
time_t now;
|
||||
switch(lastCommand) {
|
||||
case readURLCmd:
|
||||
case readURLCmd:
|
||||
if (isInReadPhase)
|
||||
lastCommand = 0;
|
||||
else {
|
||||
|
@ -1559,8 +1561,8 @@ static int32 simh_out(const int32 port, const int32 data) {
|
|||
showAvailability = 1;
|
||||
isInReadPhase = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case setClockZSDOSCmd:
|
||||
if (setClockZSDOSPos == 0) {
|
||||
|
@ -1586,16 +1588,16 @@ static int32 simh_out(const int32 port, const int32 data) {
|
|||
}
|
||||
break;
|
||||
|
||||
case setCPUClockFrequency:
|
||||
if (setClockFrequencyPos == 0) {
|
||||
newClockFrequency = data;
|
||||
setClockFrequencyPos = 1;
|
||||
}
|
||||
else {
|
||||
setClockFrequency((data << 8) | newClockFrequency);
|
||||
case setCPUClockFrequency:
|
||||
if (setClockFrequencyPos == 0) {
|
||||
newClockFrequency = data;
|
||||
setClockFrequencyPos = 1;
|
||||
}
|
||||
else {
|
||||
setClockFrequency((data << 8) | newClockFrequency);
|
||||
setClockFrequencyPos = lastCommand = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case setBankSelectCmd:
|
||||
if (cpu_unit.flags & UNIT_CPU_BANKED)
|
||||
|
@ -1644,10 +1646,10 @@ static int32 simh_out(const int32 port, const int32 data) {
|
|||
|
||||
lastCommand = data;
|
||||
switch(data) {
|
||||
case readURLCmd:
|
||||
urlPointer = 0;
|
||||
case readURLCmd:
|
||||
urlPointer = 0;
|
||||
isInReadPhase = FALSE;
|
||||
break;
|
||||
break;
|
||||
|
||||
case getHostFilenamesCmd:
|
||||
#if UNIX_PLATFORM
|
||||
|
@ -1758,18 +1760,18 @@ static int32 simh_out(const int32 port, const int32 data) {
|
|||
setClockCPM3Pos = 0;
|
||||
break;
|
||||
|
||||
case getCommonCmd:
|
||||
getCommonPos = 0;
|
||||
break;
|
||||
|
||||
case getCPUClockFrequency:
|
||||
getClockFrequencyPos = 0;
|
||||
break;
|
||||
|
||||
case setCPUClockFrequency:
|
||||
setClockFrequencyPos = 0;
|
||||
break;
|
||||
|
||||
case getCommonCmd:
|
||||
getCommonPos = 0;
|
||||
break;
|
||||
|
||||
case getCPUClockFrequency:
|
||||
getClockFrequencyPos = 0;
|
||||
break;
|
||||
|
||||
case setCPUClockFrequency:
|
||||
setClockFrequencyPos = 0;
|
||||
break;
|
||||
|
||||
case getBankSelectCmd:
|
||||
case setBankSelectCmd:
|
||||
case hasBankedMemoryCmd:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* altairz80_sys.c: MITS Altair system interface
|
||||
|
||||
Copyright (c) 2002-2011, Peter Schorn
|
||||
Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -138,13 +138,13 @@ const char *sim_stop_messages[] = {
|
|||
static char *const Mnemonics8080[] = {
|
||||
/* 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F */
|
||||
"NOP", "LXI B,#h", "STAX B", "INX B", "INR B", "DCR B", "MVI B,*h", "RLC", /* 00-07 */
|
||||
"DB 09h", "DAD B", "LDAX B", "DCX B", "INR C", "DCR C", "MVI C,*h", "RRC", /* 08-0f */
|
||||
"DB 10h", "LXI D,#h", "STAX D", "INX D", "INR D", "DCR D", "MVI D,*h", "RAL", /* 10-17 */
|
||||
"DB 18h", "DAD D", "LDAX D", "DCX D", "INR E", "DCR E", "MVI E,*h", "RAR", /* 18-1f */
|
||||
"DB 20h", "LXI H,#h", "SHLD #h", "INX H", "INR H", "DCR H", "MVI H,*h", "DAA", /* 20-27 */
|
||||
"DB 28h", "DAD H", "LHLD #h", "DCX H", "INR L", "DCR L", "MVI L,*h", "CMA", /* 28-2f */
|
||||
"DB 30h", "LXI SP,#h", "STA #h", "INX SP", "INR M", "DCR M", "MVI M,*h", "STC", /* 30-37 */
|
||||
"DB 38h", "DAD SP", "LDA #h", "DCX SP", "INR A", "DCR A", "MVI A,*h", "CMC", /* 38-3f */
|
||||
"_NOP", "DAD B", "LDAX B", "DCX B", "INR C", "DCR C", "MVI C,*h", "RRC", /* 08-0f */
|
||||
"_NOP", "LXI D,#h", "STAX D", "INX D", "INR D", "DCR D", "MVI D,*h", "RAL", /* 10-17 */
|
||||
"_NOP", "DAD D", "LDAX D", "DCX D", "INR E", "DCR E", "MVI E,*h", "RAR", /* 18-1f */
|
||||
"_NOP", "LXI H,#h", "SHLD #h", "INX H", "INR H", "DCR H", "MVI H,*h", "DAA", /* 20-27 */
|
||||
"_NOP", "DAD H", "LHLD #h", "DCX H", "INR L", "DCR L", "MVI L,*h", "CMA", /* 28-2f */
|
||||
"_NOP", "LXI SP,#h", "STA #h", "INX SP", "INR M", "DCR M", "MVI M,*h", "STC", /* 30-37 */
|
||||
"_NOP", "DAD SP", "LDA #h", "DCX SP", "INR A", "DCR A", "MVI A,*h", "CMC", /* 38-3f */
|
||||
"MOV B,B", "MOV B,C", "MOV B,D", "MOV B,E", "MOV B,H", "MOV B,L", "MOV B,M", "MOV B,A", /* 40-47 */
|
||||
"MOV C,B", "MOV C,C", "MOV C,D", "MOV C,E", "MOV C,H", "MOV C,L", "MOV C,M", "MOV C,A", /* 48-4f */
|
||||
"MOV D,B", "MOV D,C", "MOV D,D", "MOV D,E", "MOV D,H", "MOV D,L", "MOV D,M", "MOV D,A", /* 50-57 */
|
||||
|
@ -162,13 +162,13 @@ static char *const Mnemonics8080[] = {
|
|||
"ORA B", "ORA C", "ORA D", "ORA E", "ORA H", "ORA L", "ORA M", "ORA A", /* b0-b7 */
|
||||
"CMP B", "CMP C", "CMP D", "CMP E", "CMP H", "CMP L", "CMP M", "CMP A", /* b8-bf */
|
||||
"RNZ", "POP B", "JNZ #h", "JMP #h", "CNZ #h", "PUSH B", "ADI *h", "RST 0", /* c0-c7 */
|
||||
"RZ", "RET", "JZ #h", "DB CBh", "CZ #h", "CALL #h", "ACI *h", "RST 1", /* c8-cf */
|
||||
"RZ", "RET", "JZ #h", "_JMP #h", "CZ #h", "CALL #h", "ACI *h", "RST 1", /* c8-cf */
|
||||
"RNC", "POP D", "JNC #h", "OUT *h", "CNC #h", "PUSH D", "SUI *h", "RST 2", /* d0-d7 */
|
||||
"RC", "DB D9h", "JC #h", "IN *h", "CC #h", "DB DDh", "SBI *h", "RST 3", /* d8-df */
|
||||
"RC", "_RET", "JC #h", "IN *h", "CC #h", "_CALL #h", "SBI *h", "RST 3", /* d8-df */
|
||||
"RPO", "POP H", "JPO #h", "XTHL", "CPO #h", "PUSH H", "ANI *h", "RST 4", /* e0-e7 */
|
||||
"RPE", "PCHL", "JPE #h", "XCHG", "CPE #h", "DB EDh", "XRI *h", "RST 5", /* e8-ef */
|
||||
"RPE", "PCHL", "JPE #h", "XCHG", "CPE #h", "_CALL #h", "XRI *h", "RST 5", /* e8-ef */
|
||||
"RP", "POP PSW", "JP #h", "DI", "CP #h", "PUSH PSW", "ORI *h", "RST 6", /* f0-f7 */
|
||||
"RM", "SPHL", "JM #h", "EI", "CM #h", "DB FDh", "CPI *h", "RST 7" /* f8-ff */
|
||||
"RM", "SPHL", "JM #h", "EI", "CM #h", "_CALL #h", "CPI *h", "RST 7" /* f8-ff */
|
||||
};
|
||||
|
||||
static char *const MnemonicsZ80[256] = {
|
||||
|
|
|
@ -209,7 +209,7 @@ t_stat sim_instr_8086(void) {
|
|||
while (switch_cpu_now == TRUE) { /* loop until halted */
|
||||
if (sim_interval <= 0) { /* check clock queue */
|
||||
#if !UNIX_PLATFORM
|
||||
if ((reason = sim_os_poll_kbd()) == SCPE_STOP) /* poll on platforms without reliable signalling */
|
||||
if ((reason = sim_poll_kbd()) == SCPE_STOP) /* poll on platforms without reliable signalling */
|
||||
break;
|
||||
#endif
|
||||
if ( (reason = sim_process_event()) )
|
||||
|
|
|
@ -206,7 +206,7 @@ static uint8 mfdc_rom[256] = {
|
|||
};
|
||||
|
||||
/* Reset routine */
|
||||
t_stat mfdc_reset(DEVICE *dptr)
|
||||
static t_stat mfdc_reset(DEVICE *dptr)
|
||||
{
|
||||
uint8 i;
|
||||
PNP_INFO *pnp = (PNP_INFO *)dptr->ctxt;
|
||||
|
@ -228,7 +228,7 @@ t_stat mfdc_reset(DEVICE *dptr)
|
|||
}
|
||||
|
||||
/* Attach routine */
|
||||
t_stat mfdc_attach(UNIT *uptr, char *cptr)
|
||||
static t_stat mfdc_attach(UNIT *uptr, char *cptr)
|
||||
{
|
||||
t_stat r;
|
||||
unsigned int i = 0;
|
||||
|
@ -283,7 +283,7 @@ t_stat mfdc_attach(UNIT *uptr, char *cptr)
|
|||
|
||||
|
||||
/* Detach routine */
|
||||
t_stat mfdc_detach(UNIT *uptr)
|
||||
static t_stat mfdc_detach(UNIT *uptr)
|
||||
{
|
||||
t_stat r;
|
||||
int8 i;
|
||||
|
|
|
@ -285,7 +285,7 @@ static t_stat disk2_attach(UNIT *uptr, char *cptr)
|
|||
|
||||
|
||||
/* Detach routine */
|
||||
t_stat disk2_detach(UNIT *uptr)
|
||||
static t_stat disk2_detach(UNIT *uptr)
|
||||
{
|
||||
t_stat r;
|
||||
int8 i;
|
||||
|
|
|
@ -351,7 +351,7 @@ static t_stat disk3_attach(UNIT *uptr, char *cptr)
|
|||
|
||||
|
||||
/* Detach routine */
|
||||
t_stat disk3_detach(UNIT *uptr)
|
||||
static t_stat disk3_detach(UNIT *uptr)
|
||||
{
|
||||
DISK3_DRIVE_INFO *pDrive;
|
||||
t_stat r;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
IMSAI FIF Disk Controller by Ernie Price
|
||||
|
||||
Based on altairz80_dsk.c, Copyright (c) 2002-2011, Peter Schorn
|
||||
Based on altairz80_dsk.c, Copyright (c) 2002-2013, Peter Schorn
|
||||
|
||||
Plug-n-Play added by Howard M. Harte
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ static t_stat hdc1001_attach(UNIT *uptr, char *cptr)
|
|||
|
||||
|
||||
/* Detach routine */
|
||||
t_stat hdc1001_detach(UNIT *uptr)
|
||||
static t_stat hdc1001_detach(UNIT *uptr)
|
||||
{
|
||||
HDC1001_DRIVE_INFO *pDrive;
|
||||
t_stat r;
|
||||
|
|
|
@ -268,7 +268,7 @@ DEVICE mdsad_dev = {
|
|||
};
|
||||
|
||||
/* Reset routine */
|
||||
t_stat mdsad_reset(DEVICE *dptr)
|
||||
static t_stat mdsad_reset(DEVICE *dptr)
|
||||
{
|
||||
PNP_INFO *pnp = (PNP_INFO *)dptr->ctxt;
|
||||
|
||||
|
@ -289,7 +289,7 @@ t_stat mdsad_reset(DEVICE *dptr)
|
|||
}
|
||||
|
||||
/* Attach routine */
|
||||
t_stat mdsad_attach(UNIT *uptr, char *cptr)
|
||||
static t_stat mdsad_attach(UNIT *uptr, char *cptr)
|
||||
{
|
||||
char header[4];
|
||||
t_stat r;
|
||||
|
@ -341,7 +341,7 @@ t_stat mdsad_attach(UNIT *uptr, char *cptr)
|
|||
|
||||
|
||||
/* Detach routine */
|
||||
t_stat mdsad_detach(UNIT *uptr)
|
||||
static t_stat mdsad_detach(UNIT *uptr)
|
||||
{
|
||||
t_stat r;
|
||||
int8 i;
|
||||
|
|
|
@ -437,7 +437,7 @@ t_stat diskCreate(FILE *fileref, char *ctlr_comment)
|
|||
}
|
||||
|
||||
|
||||
t_stat diskFormat(DISK_INFO *myDisk)
|
||||
static t_stat diskFormat(DISK_INFO *myDisk)
|
||||
{
|
||||
uint8 i;
|
||||
uint8 sector_map[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26};
|
||||
|
@ -759,7 +759,7 @@ t_stat trackWrite(DISK_INFO *myDisk,
|
|||
* sector record type as the first byte, and fill the sector
|
||||
* data with the fillbyte.
|
||||
*/
|
||||
dataLen = (128 << sectorLen)+1;
|
||||
dataLen = sectorLen + 1;
|
||||
sectorData = malloc(dataLen);
|
||||
memset(sectorData, fillbyte, dataLen);
|
||||
sectorData[0] = SECT_RECORD_NORM;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* i1401_lp.c: IBM 1403 line printer simulator
|
||||
|
||||
Copyright (c) 1993-2008, Robert M. Supnik
|
||||
Copyright (c) 1993-2013, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -25,6 +25,7 @@
|
|||
|
||||
lpt 1403 line printer
|
||||
|
||||
16-Apr-13 RMS Fixed printer chain selection
|
||||
19-Jan-07 RMS Added UNIT_TEXT flag
|
||||
07-Mar-05 RMS Fixed bug in write_line (Van Snyder)
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
|
@ -49,17 +50,17 @@ t_stat lpt_attach (UNIT *uptr, char *cptr);
|
|||
t_stat space (int32 lines, int32 lflag);
|
||||
|
||||
char *pch_table_old[4] = {
|
||||
bcd_to_ascii_old, bcd_to_pca, bcd_to_pch, bcd_to_ascii_old
|
||||
bcd_to_ascii_old, bcd_to_ascii_old, bcd_to_pca, bcd_to_pch
|
||||
};
|
||||
char *pch_table[4] = {
|
||||
bcd_to_ascii_a, bcd_to_pca, bcd_to_pch, bcd_to_ascii_h
|
||||
bcd_to_ascii_a, bcd_to_ascii_h, bcd_to_pca, bcd_to_pch
|
||||
};
|
||||
|
||||
#define UNIT_V_FT (UNIT_V_UF + 0)
|
||||
#define UNIT_V_48 (UNIT_V_UF + 1)
|
||||
#define UNIT_FT (1 << UNIT_V_FT)
|
||||
#define UNIT_48 (1 << UNIT_V_48)
|
||||
#define GET_PCHAIN(x) (((x) >> UNIT_V_FT) & (UNIT_FT|UNIT_48))
|
||||
#define GET_PCHAIN(x) (((x) >> UNIT_V_FT) & 03)
|
||||
#define CHP(ch,val) ((val) & (1 << (ch)))
|
||||
|
||||
/* LPT data structures
|
||||
|
@ -119,9 +120,10 @@ if ((lpt_unit.flags & UNIT_ATT) == 0) /* attached? */
|
|||
wm = ((ilnt == 2) || (ilnt == 5)) && (mod == BCD_SQUARE);
|
||||
sup = ((ilnt == 2) || (ilnt == 5)) && (mod == BCD_S);
|
||||
ind[IN_LPT] = 0; /* clear error */
|
||||
t = GET_PCHAIN (lpt_unit.flags);
|
||||
if (conv_old) /* get print chain */
|
||||
bcd2asc = pch_table_old[GET_PCHAIN (lpt_unit.flags)];
|
||||
else bcd2asc = pch_table[GET_PCHAIN (lpt_unit.flags)];
|
||||
bcd2asc = pch_table_old[t];
|
||||
else bcd2asc = pch_table[t];
|
||||
for (i = 0; i < LPT_WIDTH; i++) { /* convert print buf */
|
||||
t = M[LPT_BUF + i];
|
||||
if (wm) /* wmarks -> 1 or sp */
|
||||
|
|
BIN
Ibm1130/ibm1130.ico
Normal file
BIN
Ibm1130/ibm1130.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -1,435 +0,0 @@
|
|||
# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ibm1130.mak" CFG="Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "Win32 Debug"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "WinRel"
|
||||
# PROP BASE Intermediate_Dir "WinRel"
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "WinRel"
|
||||
# PROP Intermediate_Dir "WinRel"
|
||||
OUTDIR=.\WinRel
|
||||
INTDIR=.\WinRel
|
||||
|
||||
ALL : $(OUTDIR)/ibm1130.exe $(OUTDIR)/ibm1130.bsc
|
||||
|
||||
$(OUTDIR) :
|
||||
if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
|
||||
# ADD CPP /nologo /W3 /GX /YX /O2 /I "c:\pdp11\supnik" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "GUI_SUPPORT" /U "VMS" /FR /c
|
||||
CPP_PROJ=/nologo /W3 /GX /YX /O2 /I "c:\pdp11\supnik" /D "NDEBUG" /D "WIN32" /D\
|
||||
"_CONSOLE" /D "GUI_SUPPORT" /U "VMS" /FR$(INTDIR)/ /Fp$(OUTDIR)/"ibm1130.pch"\
|
||||
/Fo$(INTDIR)/ /c
|
||||
CPP_OBJS=.\WinRel/
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo$(INTDIR)/"ibm1130.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o$(OUTDIR)/"ibm1130.bsc"
|
||||
BSC32_SBRS= \
|
||||
$(INTDIR)/ibm1130_cpu.sbr \
|
||||
$(INTDIR)/ibm1130_sys.sbr \
|
||||
$(INTDIR)/ibm1130_cr.sbr \
|
||||
$(INTDIR)/ibm1130_stddev.sbr \
|
||||
$(INTDIR)/ibm1130_disk.sbr \
|
||||
$(INTDIR)/ibm1130_gdu.sbr \
|
||||
$(INTDIR)/ibm1130_gui.sbr \
|
||||
$(INTDIR)/ibm1130_prt.sbr \
|
||||
$(INTDIR)/scp.sbr \
|
||||
$(INTDIR)/sim_tmxr.sbr \
|
||||
$(INTDIR)/sim_sock.sbr \
|
||||
$(INTDIR)/ibm1130_fmt.sbr \
|
||||
$(INTDIR)/sim_console.sbr \
|
||||
$(INTDIR)/sim_fio.sbr \
|
||||
$(INTDIR)/sim_timer.sbr \
|
||||
$(INTDIR)/ibm1130_ptrp.sbr
|
||||
|
||||
$(OUTDIR)/ibm1130.bsc : $(OUTDIR) $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib wsock32.lib shell32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib\
|
||||
wsock32.lib shell32.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no\
|
||||
/PDB:$(OUTDIR)/"ibm1130.pdb" /MACHINE:I386 /OUT:$(OUTDIR)/"ibm1130.exe"
|
||||
DEF_FILE=
|
||||
LINK32_OBJS= \
|
||||
$(INTDIR)/ibm1130_cpu.obj \
|
||||
$(INTDIR)/ibm1130_sys.obj \
|
||||
$(INTDIR)/ibm1130_cr.obj \
|
||||
$(INTDIR)/ibm1130_stddev.obj \
|
||||
$(INTDIR)/ibm1130.res \
|
||||
$(INTDIR)/ibm1130_disk.obj \
|
||||
$(INTDIR)/ibm1130_gdu.obj \
|
||||
$(INTDIR)/ibm1130_gui.obj \
|
||||
$(INTDIR)/ibm1130_prt.obj \
|
||||
$(INTDIR)/scp.obj \
|
||||
$(INTDIR)/sim_tmxr.obj \
|
||||
$(INTDIR)/sim_sock.obj \
|
||||
$(INTDIR)/ibm1130_fmt.obj \
|
||||
$(INTDIR)/sim_console.obj \
|
||||
$(INTDIR)/sim_fio.obj \
|
||||
$(INTDIR)/sim_timer.obj \
|
||||
$(INTDIR)/ibm1130_ptrp.obj
|
||||
|
||||
$(OUTDIR)/ibm1130.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "WinDebug"
|
||||
# PROP BASE Intermediate_Dir "WinDebug"
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "WinDebug"
|
||||
# PROP Intermediate_Dir "WinDebug"
|
||||
OUTDIR=.\WinDebug
|
||||
INTDIR=.\WinDebug
|
||||
|
||||
ALL : $(OUTDIR)/ibm1130.exe $(OUTDIR)/ibm1130.bsc
|
||||
|
||||
$(OUTDIR) :
|
||||
if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
|
||||
# ADD CPP /nologo /W3 /GX /Zi /YX /Od /I "c:\pdp11\supnik" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "GUI_SUPPORT" /U "VMS" /FR /c
|
||||
CPP_PROJ=/nologo /W3 /GX /Zi /YX /Od /I "c:\pdp11\supnik" /D "_DEBUG" /D\
|
||||
"WIN32" /D "_CONSOLE" /D "GUI_SUPPORT" /U "VMS" /FR$(INTDIR)/\
|
||||
/Fp$(OUTDIR)/"ibm1130.pch" /Fo$(INTDIR)/ /Fd$(OUTDIR)/"ibm1130.pdb" /c
|
||||
CPP_OBJS=.\WinDebug/
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo$(INTDIR)/"ibm1130.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o$(OUTDIR)/"ibm1130.bsc"
|
||||
BSC32_SBRS= \
|
||||
$(INTDIR)/ibm1130_cpu.sbr \
|
||||
$(INTDIR)/ibm1130_sys.sbr \
|
||||
$(INTDIR)/ibm1130_cr.sbr \
|
||||
$(INTDIR)/ibm1130_stddev.sbr \
|
||||
$(INTDIR)/ibm1130_disk.sbr \
|
||||
$(INTDIR)/ibm1130_gdu.sbr \
|
||||
$(INTDIR)/ibm1130_gui.sbr \
|
||||
$(INTDIR)/ibm1130_prt.sbr \
|
||||
$(INTDIR)/scp.sbr \
|
||||
$(INTDIR)/sim_tmxr.sbr \
|
||||
$(INTDIR)/sim_sock.sbr \
|
||||
$(INTDIR)/ibm1130_fmt.sbr \
|
||||
$(INTDIR)/sim_console.sbr \
|
||||
$(INTDIR)/sim_fio.sbr \
|
||||
$(INTDIR)/sim_timer.sbr \
|
||||
$(INTDIR)/ibm1130_ptrp.sbr
|
||||
|
||||
$(OUTDIR)/ibm1130.bsc : $(OUTDIR) $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib wsock32.lib shell32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
|
||||
# SUBTRACT LINK32 /MAP
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib\
|
||||
wsock32.lib shell32.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes\
|
||||
/PDB:$(OUTDIR)/"ibm1130.pdb" /DEBUG /MACHINE:I386 /OUT:$(OUTDIR)/"ibm1130.exe"
|
||||
DEF_FILE=
|
||||
LINK32_OBJS= \
|
||||
$(INTDIR)/ibm1130_cpu.obj \
|
||||
$(INTDIR)/ibm1130_sys.obj \
|
||||
$(INTDIR)/ibm1130_cr.obj \
|
||||
$(INTDIR)/ibm1130_stddev.obj \
|
||||
$(INTDIR)/ibm1130.res \
|
||||
$(INTDIR)/ibm1130_disk.obj \
|
||||
$(INTDIR)/ibm1130_gdu.obj \
|
||||
$(INTDIR)/ibm1130_gui.obj \
|
||||
$(INTDIR)/ibm1130_prt.obj \
|
||||
$(INTDIR)/scp.obj \
|
||||
$(INTDIR)/sim_tmxr.obj \
|
||||
$(INTDIR)/sim_sock.obj \
|
||||
$(INTDIR)/ibm1130_fmt.obj \
|
||||
$(INTDIR)/sim_console.obj \
|
||||
$(INTDIR)/sim_fio.obj \
|
||||
$(INTDIR)/sim_timer.obj \
|
||||
$(INTDIR)/ibm1130_ptrp.obj
|
||||
|
||||
$(OUTDIR)/ibm1130.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Group "Source Files"
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_cpu.c
|
||||
DEP_IBM11=\
|
||||
.\ibm1130_defs.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_cpu.obj : $(SOURCE) $(DEP_IBM11) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_sys.c
|
||||
DEP_IBM113=\
|
||||
.\ibm1130_defs.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_sys.obj : $(SOURCE) $(DEP_IBM113) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_cr.c
|
||||
DEP_IBM1130=\
|
||||
.\ibm1130_defs.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_cr.obj : $(SOURCE) $(DEP_IBM1130) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_stddev.c
|
||||
DEP_IBM1130_=\
|
||||
.\ibm1130_defs.h\
|
||||
.\ibm1130_conout.h\
|
||||
.\ibm1130_conin.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_stddev.obj : $(SOURCE) $(DEP_IBM1130_) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130.rc
|
||||
DEP_IBM1130_R=\
|
||||
.\1130consoleblank.bmp\
|
||||
.\hand.cur
|
||||
|
||||
$(INTDIR)/ibm1130.res : $(SOURCE) $(DEP_IBM1130_R) $(INTDIR)
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_disk.c
|
||||
DEP_IBM1130_D=\
|
||||
.\ibm1130_defs.h\
|
||||
.\dmsr2v12phases.h\
|
||||
.\dmsr2v12slet.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_disk.obj : $(SOURCE) $(DEP_IBM1130_D) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_gdu.c
|
||||
DEP_IBM1130_G=\
|
||||
.\ibm1130_defs.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_gdu.obj : $(SOURCE) $(DEP_IBM1130_G) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_gui.c
|
||||
DEP_IBM1130_GU=\
|
||||
.\ibm1130_defs.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_gui.obj : $(SOURCE) $(DEP_IBM1130_GU) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_prt.c
|
||||
DEP_IBM1130_P=\
|
||||
.\ibm1130_defs.h\
|
||||
.\ibm1130_prtwheel.h\
|
||||
..\sim_defs.h
|
||||
|
||||
$(INTDIR)/ibm1130_prt.obj : $(SOURCE) $(DEP_IBM1130_P) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\scp.c
|
||||
DEP_SCP_C=\
|
||||
..\sim_defs.h\
|
||||
\pdp11\supnik\sim_rev.h\
|
||||
\pdp11\supnik\sim_sock.h\
|
||||
\pdp11\supnik\sim_tmxr.h\
|
||||
\MSVC20\INCLUDE\sys\TYPES.H
|
||||
|
||||
$(INTDIR)/scp.obj : $(SOURCE) $(DEP_SCP_C) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\sim_tmxr.c
|
||||
DEP_SIM_T=\
|
||||
..\sim_defs.h\
|
||||
\pdp11\supnik\sim_sock.h\
|
||||
\pdp11\supnik\sim_tmxr.h\
|
||||
\MSVC20\INCLUDE\sys\TYPES.H
|
||||
|
||||
$(INTDIR)/sim_tmxr.obj : $(SOURCE) $(DEP_SIM_T) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\sim_sock.c
|
||||
DEP_SIM_S=\
|
||||
..\sim_defs.h\
|
||||
\pdp11\supnik\sim_sock.h\
|
||||
\MSVC20\INCLUDE\sys\TYPES.H
|
||||
|
||||
$(INTDIR)/sim_sock.obj : $(SOURCE) $(DEP_SIM_S) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_fmt.c
|
||||
|
||||
$(INTDIR)/ibm1130_fmt.obj : $(SOURCE) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\sim_console.c
|
||||
DEP_SIM_C=\
|
||||
..\sim_defs.h\
|
||||
\pdp11\supnik\sim_sock.h\
|
||||
\pdp11\supnik\sim_tmxr.h\
|
||||
\pdp11\supnik\scp.h\
|
||||
\pdp11\supnik\sim_console.h\
|
||||
\pdp11\supnik\sim_timer.h\
|
||||
\pdp11\supnik\sim_fio.h\
|
||||
D:\PROGRA~1\MICROS~1\INCLUDE\WinSock2.h\
|
||||
\MSVC20\INCLUDE\sys\TYPES.H\
|
||||
D:\PROGRA~1\MICROS~1\INCLUDE\Qos.h\
|
||||
D:\WINDDK\2600\inc\wxp\guiddef.h
|
||||
|
||||
$(INTDIR)/sim_console.obj : $(SOURCE) $(DEP_SIM_C) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\sim_fio.c
|
||||
DEP_SIM_F=\
|
||||
..\sim_defs.h\
|
||||
D:\PROGRA~1\MICROS~1\INCLUDE\BaseTsd.h\
|
||||
\pdp11\supnik\scp.h\
|
||||
\pdp11\supnik\sim_console.h\
|
||||
\pdp11\supnik\sim_timer.h\
|
||||
\pdp11\supnik\sim_fio.h
|
||||
|
||||
$(INTDIR)/sim_fio.obj : $(SOURCE) $(DEP_SIM_F) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\pdp11\supnik\sim_timer.c
|
||||
DEP_SIM_TI=\
|
||||
..\sim_defs.h\
|
||||
D:\PROGRA~1\MICROS~1\INCLUDE\BaseTsd.h\
|
||||
\pdp11\supnik\scp.h\
|
||||
\pdp11\supnik\sim_console.h\
|
||||
\pdp11\supnik\sim_timer.h\
|
||||
\pdp11\supnik\sim_fio.h
|
||||
|
||||
$(INTDIR)/sim_timer.obj : $(SOURCE) $(DEP_SIM_TI) $(INTDIR)
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ibm1130_ptrp.c
|
||||
|
||||
$(INTDIR)/ibm1130_ptrp.obj : $(SOURCE) $(INTDIR)
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Project
|
||||
################################################################################
|
|
@ -1,4 +1,4 @@
|
|||
//Microsoft Visual C++ generated resource script.
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "ibm1130res.h"
|
||||
|
||||
|
@ -12,6 +12,14 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -19,24 +27,23 @@
|
|||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"ibm1130res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include <windows.h>\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
|
@ -45,20 +52,72 @@ END
|
|||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_CONSOLE BITMAP MOVEABLE PURE "1130consoleblank.bmp"
|
||||
FULL_1442 BITMAP MOVEABLE PURE "1442full.bmp"
|
||||
EOF_1442 BITMAP MOVEABLE PURE "1442eof.bmp"
|
||||
EMPTY_1442 BITMAP MOVEABLE PURE "1442empty.bmp"
|
||||
MIDDLE_1442 BITMAP MOVEABLE PURE "1442middle.bmp"
|
||||
FULL_1132 BITMAP MOVEABLE PURE "1132full.bmp"
|
||||
EMPTY_1132 BITMAP MOVEABLE PURE "1132empty.bmp"
|
||||
IDB_CONSOLE BITMAP "1130consoleblank.bmp"
|
||||
FULL_1442 BITMAP "1442full.bmp"
|
||||
EOF_1442 BITMAP "1442eof.bmp"
|
||||
EMPTY_1442 BITMAP "1442empty.bmp"
|
||||
MIDDLE_1442 BITMAP "1442middle.bmp"
|
||||
FULL_1132 BITMAP "1132full.bmp"
|
||||
EMPTY_1132 BITMAP "1132empty.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Cursor
|
||||
//
|
||||
|
||||
IDC_MYHAND CURSOR DISCARDABLE "HAND.CUR"
|
||||
IDC_MYHAND CURSOR "HAND.CUR"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
mainicon ICON "ibm1130.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,8,0,0
|
||||
PRODUCTVERSION 3,8,0,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "IBM 1130 simulator. For more information see http://ibm1130.org. Program based on SIMH by Bob Supnik, http:/.simh.trailing-edge.com"
|
||||
VALUE "FileDescription", "ibm1130 Application"
|
||||
VALUE "FileVersion", "3, 8, 0, 0"
|
||||
VALUE "InternalName", "ibm1130"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2012, Brian Knittel. Plotter support incorporates LIBGD Copyright © 1997-2008 Thomas Boutell, Pierre A. Joye and contributors, see file COPYING at www.libgd.org"
|
||||
VALUE "OriginalFilename", "ibm1130.exe"
|
||||
VALUE "ProductName", "ibm1130 Application"
|
||||
VALUE "ProductVersion", "3, 8, 0, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -22,6 +22,16 @@
|
|||
Also commented out my echo command as it's now a standard simh command
|
||||
27-Nov-05 BLK Added Arithmetic Factor Register support per Carl Claunch (GUI only)
|
||||
06-Dec-06 BLK Moved CGI stuff out of ibm1130_cpu.c
|
||||
01-May-07 BLK Changed name of function xio_1142_card to xio_1442_card. Corrected list of
|
||||
devices in xio_devs[] (used in debugging only).
|
||||
24-Mar-11 BLK Got the real IBM 1130 diagnostics (yay!). Fixed two errors detected by the CPU diagnostics:
|
||||
-- was not resetting overflow bit after testing with BSC short form
|
||||
(why did I think only the long form reset OV after testing?)
|
||||
-- failed to detect numeric overflow in Divide instructions
|
||||
Also fixed bug where simulator performed 2nd word fetch on Long mode instructions
|
||||
on ops that don't have long mode, blowing out the SAR/SBR display that's important in the
|
||||
IBM diagnostics. The simulator was decrementing the IAR after the incorrect fetch, so the
|
||||
instructions worked correctly, but, the GUI display was wrong.
|
||||
|
||||
>> To do: verify actual operands stored in ARF, need to get this from state diagrams in the schematic set
|
||||
Also: determine how many bits are actually stored in the IAR in a real 1130, by forcing wraparound
|
||||
|
@ -91,6 +101,7 @@
|
|||
opcode in MSBits
|
||||
|
||||
F = format. 0 = short (1 word), 1 = long (2 word) instruction
|
||||
(Not all operations have long versions. The bit is ignored for shifts, LDX, WAIT and invalid opcodes)
|
||||
|
||||
T = Tag 00 = no index register (e.g. IAR relative)
|
||||
01 = use index register 1 (e.g. core address 1 = M[1])
|
||||
|
@ -153,9 +164,6 @@ static int simh_status_to_stopcode (int status);
|
|||
|
||||
/* hook pointers from scp.c */
|
||||
void (*sim_vm_init) (void) = &sim_init;
|
||||
extern char* (*sim_vm_read) (char *ptr, int32 size, FILE *stream);
|
||||
extern void (*sim_vm_post) (t_bool from_scp);
|
||||
extern CTAB *sim_vm_cmd;
|
||||
|
||||
/* space to store extra simulator-specific commands */
|
||||
#define MAX_EXTRA_COMMANDS 10
|
||||
|
@ -222,7 +230,7 @@ t_stat cpu_set_type (UNIT *uptr, int32 value, char *cptr, void *desc);
|
|||
void calc_ints (void);
|
||||
|
||||
extern t_stat ts_wr (int32 data, int32 addr, int32 access);
|
||||
extern UNIT cr_unit;
|
||||
extern UNIT cr_unit, prt_unit[];
|
||||
|
||||
#ifdef ENABLE_BACKTRACE
|
||||
static void archive_backtrace(char *inst);
|
||||
|
@ -261,9 +269,15 @@ static void trace_instruction (void);
|
|||
* ------------------------------------------------------------------------ */
|
||||
|
||||
#define UNIT_MSIZE (1 << (UNIT_V_UF + 7)) /* flag for memory size setting */
|
||||
#define UNIT_1800 (1 << (UNIT_V_UF + 0)) /* flag for 1800 mode */
|
||||
#define UNIT_1800 (1 << (UNIT_V_UF + 8)) /* flag for 1800 mode */
|
||||
#define UNIT_TRACE (3 << (UNIT_V_UF + 9)) /* debugging tracing mode bits */
|
||||
|
||||
UNIT cpu_unit = { UDATA (&cpu_svc, UNIT_FIX | UNIT_BINK | UNIT_ATTABLE | UNIT_SEQ, INIMEMSIZE) };
|
||||
#define UNIT_TRACE_NONE 0
|
||||
#define UNIT_TRACE_IO (1 << (UNIT_V_UF+9))
|
||||
#define UNIT_TRACE_INSTR (2 << (UNIT_V_UF+9))
|
||||
#define UNIT_TRACE_BOTH (3 << (UNIT_V_UF+9))
|
||||
|
||||
UNIT cpu_unit = { UDATA (&cpu_svc, UNIT_FIX | UNIT_BINK | UNIT_ATTABLE | UNIT_SEQ | UNIT_TRACE_BOTH, INIMEMSIZE) };
|
||||
|
||||
REG cpu_reg[] = {
|
||||
{ HRDATA (IAR, IAR, 32) },
|
||||
|
@ -300,14 +314,18 @@ REG cpu_reg[] = {
|
|||
};
|
||||
|
||||
MTAB cpu_mod[] = {
|
||||
{ UNIT_MSIZE, 4096, NULL, "4KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 8192, NULL, "8KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 16384, NULL, "16KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 32768, NULL, "32KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 4096, NULL, "4KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 8192, NULL, "8KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 16384, NULL, "16KW", &cpu_set_size},
|
||||
{ UNIT_MSIZE, 32768, NULL, "32KW", &cpu_set_size},
|
||||
#ifdef ENABLE_1800_SUPPORT
|
||||
{ UNIT_1800, 0, "1130", "1130", &cpu_set_type},
|
||||
{ UNIT_1800, UNIT_1800, "1800", "1800", &cpu_set_type},
|
||||
#endif
|
||||
{ UNIT_1800, 0, "1130", "1130", &cpu_set_type},
|
||||
{ UNIT_1800, UNIT_1800, "1800", "1800", &cpu_set_type},
|
||||
#endif
|
||||
{ UNIT_TRACE, UNIT_TRACE_NONE, "notrace", "NOTRACE", NULL},
|
||||
{ UNIT_TRACE, UNIT_TRACE_IO, "traceIO", "TRACEIO", NULL},
|
||||
{ UNIT_TRACE, UNIT_TRACE_INSTR, "traceInstr", "TRACEINSTR", NULL},
|
||||
{ UNIT_TRACE, UNIT_TRACE_BOTH, "traceBoth", "TRACEBOTH", NULL},
|
||||
{ 0 } };
|
||||
|
||||
DEVICE cpu_dev = {
|
||||
|
@ -433,7 +451,6 @@ void calc_ints (void)
|
|||
* ------------------------------------------------------------------------ */
|
||||
|
||||
#define INCREMENT_IAR IAR = (IAR + 1) & mem_mask
|
||||
#define DECREMENT_IAR IAR = (IAR - 1) & mem_mask
|
||||
|
||||
void bail (char *msg)
|
||||
{
|
||||
|
@ -441,36 +458,53 @@ void bail (char *msg)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
static void weirdop (char *msg, int offset)
|
||||
static void weirdop (char *msg)
|
||||
{
|
||||
printf("Weird opcode: %s at %04x\n", msg, IAR+offset);
|
||||
printf("Weird opcode: %s at %04x\n", msg, IAR-1);
|
||||
}
|
||||
|
||||
static char *xio_devs[] = {
|
||||
"0?", "console", "1142card", "1134papertape",
|
||||
"dsk0", "1627plot", "1132print", "switches",
|
||||
"1231omr", "2501card", "comm", "b?",
|
||||
"sys7", "d?", "e?", "f?",
|
||||
"10?", "dsk1", "dsk2", "dsk3",
|
||||
"dsk4", "dsk5", "dsk6", "dsk7+",
|
||||
"18?", "2250disp", "2741attachment", "1b",
|
||||
"1c?", "1d?", "1e?", "1f?"
|
||||
"dev-00?", "console", "1442card", "1134ptape",
|
||||
"dsk0", "1627plot", "1132print", "switches",
|
||||
"1231omr", "2501card", "sca", "dev-0b?",
|
||||
"sys7", "dev-0d?", "dev-0e?", "dev-0f?",
|
||||
"dev-10?", "dsk1", "dsk2", "dsk3",
|
||||
"dsk4", "1403prt", "dsk5", "2311drv2",
|
||||
"dev-18?", "2250disp", "2741term", "dev-1b",
|
||||
"dev-1c?", "dev-1d?", "dev-1e?", "dev-1f?"
|
||||
};
|
||||
|
||||
static char *xio_funcs[] = {
|
||||
"0?", "write", "read", "sense_irq",
|
||||
"func0?", "write", "read", "sense_irq",
|
||||
"control", "initw", "initr", "sense"
|
||||
};
|
||||
|
||||
t_stat sim_instr (void)
|
||||
{
|
||||
int32 i, eaddr, INDIR, IR, F, DSPLC, word2, oldval, newval, src, src2, dst, abit, xbit;
|
||||
int32 iocc_addr, iocc_op, iocc_dev, iocc_func, iocc_mod;
|
||||
int32 iocc_addr, iocc_op, iocc_dev, iocc_func, iocc_mod, result;
|
||||
char msg[50];
|
||||
int cwincount = 0, status;
|
||||
static long ninstr = 0;
|
||||
static char *intlabel[] = {"INT0","INT1","INT2","INT3","INT4","INT5"};
|
||||
|
||||
/* the F bit indicates a two-word instruction for most instructions except the ones marked FALSE below */
|
||||
static t_bool F_bit_used[] = { /* FALSE for those few instructions that don't have a long instr version */
|
||||
/*undef XIO SLx SRx LDS STS WAIT undef */
|
||||
FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE,
|
||||
/*BSI BSC undef undef LDX STX MDX undef */
|
||||
TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE,
|
||||
/*A AD S SD M D CPU dependent */
|
||||
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE,
|
||||
/*LD LDD STO STD AND OR EOR undef */
|
||||
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE
|
||||
};
|
||||
|
||||
#ifdef ENABLE_1800_SUPPORT
|
||||
F_bit_used[0x16] = is_1800; /* these two are defined and do have long versions on the 1800 */
|
||||
F_bit_used[0x17] = is_1800; /* but are undefined on the 1130, so set these accordingly */
|
||||
#endif
|
||||
|
||||
if (cgi) /* give CGI hook function a chance to do something */
|
||||
cgi_start();
|
||||
|
||||
|
@ -581,7 +615,7 @@ t_stat sim_instr (void)
|
|||
}
|
||||
|
||||
ninstr++;
|
||||
if (cpu_unit.flags & UNIT_ATT)
|
||||
if ((cpu_unit.flags & (UNIT_ATT|UNIT_TRACE_INSTR)) == (UNIT_ATT|UNIT_TRACE_INSTR))
|
||||
trace_instruction(); /* log CPU details if logging is enabled */
|
||||
|
||||
prev_IAR = IAR; /* save IAR before incrementing it */
|
||||
|
@ -598,7 +632,7 @@ t_stat sim_instr (void)
|
|||
|
||||
/* here I compute the usual effective address on the assumption that the instruction will need it. Some don't. */
|
||||
|
||||
if (F) { /* long instruction, ASSUME it's valid (have to decrement IAR if not) */
|
||||
if (F && F_bit_used[OP]) { /* long instruction, except for a few that don't have a long mode, like WAIT */
|
||||
INDIR = IR & 0x0080; /* indirect bit */
|
||||
DSPLC = IR & 0x007F; /* displacement or modifier */
|
||||
if (DSPLC & 0x0040)
|
||||
|
@ -612,6 +646,8 @@ t_stat sim_instr (void)
|
|||
eaddr += ReadIndex(TAG); /* add index register value */
|
||||
if (INDIR) /* if indirect addressing */
|
||||
eaddr = ReadW(eaddr); /* pick up referenced address */
|
||||
|
||||
/* to do: the previous steps may lead to incorrect GUI SAR/SBR display if the instruction doesn't actually fetch anything. Check this. */
|
||||
}
|
||||
else { /* short instruction, use displacement */
|
||||
INDIR = 0; /* never indirect */
|
||||
|
@ -623,6 +659,8 @@ t_stat sim_instr (void)
|
|||
eaddr = ReadIndex(TAG) + DSPLC; /* add index register value */
|
||||
else
|
||||
eaddr = IAR + DSPLC; /* otherwise relative to IAR after fetch */
|
||||
|
||||
/* to do: the previous steps may lead to incorrect GUI SAR/SBR display if the instruction doesn't actually fetch the index value. Check this. */
|
||||
}
|
||||
|
||||
switch (OP) { /* decode instruction */
|
||||
|
@ -634,16 +672,14 @@ t_stat sim_instr (void)
|
|||
iocc_func = (iocc_op >> 8) & 0x0007;
|
||||
iocc_mod = iocc_op & 0x00FF;
|
||||
|
||||
if (cpu_unit.flags & UNIT_ATT)
|
||||
trace_io("* XIO %s %s mod %02x addr %04x", xio_funcs[iocc_func], xio_devs[iocc_dev], iocc_mod, iocc_addr);
|
||||
|
||||
/* fprintf(stderr, "* XIO %s %s mod %02x addr %04x\n", xio_funcs[iocc_func], xio_devs[iocc_dev], iocc_mod, iocc_addr); */
|
||||
if ((cpu_unit.flags & (UNIT_ATT|UNIT_TRACE_IO)) == (UNIT_ATT|UNIT_TRACE_IO))
|
||||
trace_io("* XIO %s %s mod %02x addr %04x", xio_funcs[iocc_func], (iocc_func == XIO_SENSE_IRQ) ? "-" : xio_devs[iocc_dev], iocc_mod, iocc_addr);
|
||||
|
||||
ACC = 0; /* ACC is destroyed, and default XIO_SENSE_DEV result is 0 */
|
||||
|
||||
switch (iocc_func) {
|
||||
case XIO_UNUSED:
|
||||
sprintf(msg, "Unknown op %x on device %02x", iocc_func, iocc_dev);
|
||||
sprintf(msg, "Unknown XIO op %x on device %02x (%s)", iocc_func, iocc_dev, xio_devs[iocc_dev]);
|
||||
xio_error(msg);
|
||||
break;
|
||||
|
||||
|
@ -656,8 +692,8 @@ t_stat sim_instr (void)
|
|||
case 0x01: /* console keyboard and printer */
|
||||
xio_1131_console(iocc_addr, iocc_func, iocc_mod);
|
||||
break;
|
||||
case 0x02: /* 1142 card reader/punch */
|
||||
xio_1142_card(iocc_addr, iocc_func, iocc_mod);
|
||||
case 0x02: /* 1442 card reader/punch */
|
||||
xio_1442_card(iocc_addr, iocc_func, iocc_mod);
|
||||
break;
|
||||
case 0x03: /* 1134 paper tape reader/punch */
|
||||
xio_1134_papertape(iocc_addr, iocc_func, iocc_mod);
|
||||
|
@ -724,10 +760,8 @@ t_stat sim_instr (void)
|
|||
break;
|
||||
|
||||
case 0x02: /* --- SLA,SLT,SLC,SLCA,NOP - Shift Left family --- */
|
||||
if (F) {
|
||||
weirdop("Long Left Shift", -2);
|
||||
DECREMENT_IAR;
|
||||
}
|
||||
if (F)
|
||||
weirdop("Long Left Shift");
|
||||
|
||||
CCC = ((TAG == 0) ? DSPLC : ReadIndex(TAG)) & 0x003F;
|
||||
ARFSET(CCC);
|
||||
|
@ -764,7 +798,7 @@ t_stat sim_instr (void)
|
|||
CCC--;
|
||||
}
|
||||
C = (CCC != 0);
|
||||
WriteIndex(TAG, (ReadIndex(TAG) & 0xFF00) | CCC); /* put 6 bits back into low byte of index register */
|
||||
WriteIndex(TAG, ReadIndex(TAG) & 0xFF00 | CCC); /* put 6 bits back into low byte of index register */
|
||||
break;
|
||||
}
|
||||
/* if TAG == 0, fall through and treat like normal shift SLT */
|
||||
|
@ -786,10 +820,8 @@ t_stat sim_instr (void)
|
|||
break;
|
||||
|
||||
case 0x03: /* --- SRA, SRT, RTE - Shift Right family --- */
|
||||
if (F) {
|
||||
weirdop("Long Right Shift", -2);
|
||||
DECREMENT_IAR;
|
||||
}
|
||||
if (F)
|
||||
weirdop("Long Right Shift");
|
||||
|
||||
CCC = ((TAG == 0) ? DSPLC : ReadIndex(TAG)) & 0x3F;
|
||||
ARFSET(CCC);
|
||||
|
@ -810,8 +842,8 @@ t_stat sim_instr (void)
|
|||
while (CCC > 0) {
|
||||
xbit = (ACC & 0x0001) << 15;
|
||||
abit = (ACC & 0x8000);
|
||||
ACC = ((ACC >> 1) & 0x7FFF) | abit;
|
||||
EXT = ((EXT >> 1) & 0x7FFF) | xbit;
|
||||
ACC = (ACC >> 1) & 0x7FFF | abit;
|
||||
EXT = (EXT >> 1) & 0x7FFF | xbit;
|
||||
CCC--;
|
||||
}
|
||||
break;
|
||||
|
@ -820,8 +852,8 @@ t_stat sim_instr (void)
|
|||
while (CCC > 0) {
|
||||
abit = (EXT & 0x0001) << 15;
|
||||
xbit = (ACC & 0x0001) << 15;
|
||||
ACC = ((ACC >> 1) & 0x7FFF) | abit;
|
||||
EXT = ((EXT >> 1) & 0x7FFF) | xbit;
|
||||
ACC = (ACC >> 1) & 0x7FFF | abit;
|
||||
EXT = (EXT >> 1) & 0x7FFF | xbit;
|
||||
CCC--;
|
||||
}
|
||||
break;
|
||||
|
@ -833,10 +865,8 @@ t_stat sim_instr (void)
|
|||
break;
|
||||
|
||||
case 0x04: /* --- LDS - Load Status --- */
|
||||
if (F) { /* never fetches second word? */
|
||||
weirdop("Long LDS", -2);
|
||||
DECREMENT_IAR;
|
||||
}
|
||||
if (F) /* never fetches second word? */
|
||||
weirdop("Long LDS");
|
||||
|
||||
V = (DSPLC & 1);
|
||||
C = (DSPLC & 2) >> 1;
|
||||
|
@ -854,11 +884,15 @@ t_stat sim_instr (void)
|
|||
break;
|
||||
|
||||
case 0x06: /* --- WAIT --- */
|
||||
/* I am no longer doing the fetch if a long wait is encountered
|
||||
* The 1130 diagnostics use WAIT instructions with the F bit set in some display error codes.
|
||||
* (The wait instruction's opcode is displayed in the Storage Buffer Register on the console display,
|
||||
* since the last thing fetched was the instruction)
|
||||
*/
|
||||
wait_state = WAIT_OP;
|
||||
if (F) { /* what happens if we use long format? */
|
||||
weirdop("Long WAIT", -2);
|
||||
DECREMENT_IAR; /* assume it wouldn't have fetched 2nd word? */
|
||||
}
|
||||
|
||||
SAR = prev_IAR; /* this is a hack; ensure that the SAR/SBR display shows the WAIT instruction fetch */
|
||||
SBR = IR;
|
||||
break;
|
||||
|
||||
case 0x08: /* --- BSI - Branch and store IAR --- */
|
||||
|
@ -1023,10 +1057,20 @@ t_stat sim_instr (void)
|
|||
|
||||
ARFSET(src2);
|
||||
|
||||
if (src2 == 0)
|
||||
/* 24-Mar-11 - Failed IBM diagnostics because I was not checking for overflow here. Fixed.
|
||||
* Have to check for special case of -maxint / -1 because Windows (at least) generates an exception
|
||||
*/
|
||||
if (src2 == 0) {
|
||||
V = 1; /* divide by zero just sets overflow, ACC & EXT are undefined */
|
||||
}
|
||||
else if (src2 == -1 && src == 0x80000000) {
|
||||
V = 1; /* another special case: max negative int / -1 also overflows */
|
||||
}
|
||||
else {
|
||||
ACC = (src / src2) & 0xFFFF;
|
||||
result = src / src2; /* compute dividend */
|
||||
if ((result > 32767) || (result < -32768))
|
||||
V = 1; /* if result does not fit into 16 bits, we have an overflow */
|
||||
ACC = result & 0xFFFF;
|
||||
EXT = (src % src2) & 0xFFFF;
|
||||
}
|
||||
break;
|
||||
|
@ -1105,13 +1149,11 @@ t_stat sim_instr (void)
|
|||
/* case 0x07: */
|
||||
/* case 0x0a: */
|
||||
/* case 0x0b: */
|
||||
/* case 0x0e: */
|
||||
/* case 0x0f: */
|
||||
/* case 0x1f: */
|
||||
wait_state = WAIT_INVALID_OP;
|
||||
if (F)
|
||||
DECREMENT_IAR; /* assume it wouldn't have fetched 2nd word? */
|
||||
|
||||
SAR = prev_IAR; /* this is a hack; ensure that the SAR/SBR display shows the WAIT instruction fetch */
|
||||
SBR = IR;
|
||||
break;
|
||||
} /* end instruction decode switch */
|
||||
|
||||
|
@ -1164,6 +1206,7 @@ static int simh_status_to_stopcode (int status)
|
|||
* bsctest - perform standard set of condition tests. We return TRUE if any
|
||||
* of the condition bits specified in DSPLC test positive, FALSE if none are true.
|
||||
* If reset_V is TRUE, we reset the oVerflow flag after testing it.
|
||||
* 24-Mar-11: no, we reset the oVerflow flag no matter what reset_V is
|
||||
* ------------------------------------------------------------------------ */
|
||||
|
||||
static t_bool bsctest (int32 DSPLC, t_bool reset_V)
|
||||
|
@ -1171,7 +1214,8 @@ static t_bool bsctest (int32 DSPLC, t_bool reset_V)
|
|||
if (DSPLC & 0x01) { /* Overflow off (note inverted sense) */
|
||||
if (! V)
|
||||
return TRUE;
|
||||
else if (reset_V) /* reset after testing */
|
||||
// 24-Mar-11 - V is always reset when tested, in both the long and short forms of the instructions
|
||||
// else if (reset_V) /* reset after testing */
|
||||
V = 0;
|
||||
}
|
||||
|
||||
|
@ -1253,7 +1297,7 @@ t_stat cpu_reset (DEVICE *dptr)
|
|||
wait_state = 0; /* cancel wait */
|
||||
wait_lamp = TRUE; /* but keep the wait lamp lit on the GUI */
|
||||
|
||||
if (cpu_unit.flags & UNIT_ATT) { /* record reset in CPU log */
|
||||
if ((cpu_unit.flags & (UNIT_ATT|UNIT_TRACE_INSTR)) == (UNIT_ATT|UNIT_TRACE_INSTR)) { /* record reset in CPU log */
|
||||
fseek(cpu_unit.fileref, 0, SEEK_END);
|
||||
fprintf(cpu_unit.fileref, "---RESET---" CRLF);
|
||||
}
|
||||
|
@ -1451,7 +1495,7 @@ t_stat register_cmd (char *name, t_stat (*action)(int32 flag, char *ptr), int ar
|
|||
* echo_cmd - just echo the command line
|
||||
* ------------------------------------------------------------------------ */
|
||||
|
||||
static t_stat echo_cmd (int flag, char *cptr)
|
||||
static t_stat echo_cmd (int32 flag, char *cptr)
|
||||
{
|
||||
printf("%s\n", cptr);
|
||||
return SCPE_OK;
|
||||
|
@ -1794,6 +1838,11 @@ static void trace_instruction (void)
|
|||
fputs(CRLF, cpu_unit.fileref);
|
||||
}
|
||||
|
||||
static void trace_common (FILE *fout)
|
||||
{
|
||||
fprintf(fout, "[IAR %04x IPL %c] ", IAR, (ipl < 0) ? ' ' : ('0' + ipl));
|
||||
}
|
||||
|
||||
void trace_io (char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -1801,6 +1850,7 @@ void trace_io (char *fmt, ...)
|
|||
if ((cpu_unit.flags & UNIT_ATT) == 0)
|
||||
return;
|
||||
|
||||
trace_common(cpu_unit.fileref);
|
||||
va_start(args, fmt); /* get pointer to argument list */
|
||||
vfprintf(cpu_unit.fileref, fmt, args); /* write errors to cpu log file */
|
||||
va_end(args);
|
||||
|
@ -1813,12 +1863,14 @@ void trace_both (char *fmt, ...)
|
|||
va_list args;
|
||||
|
||||
if (cpu_unit.flags & UNIT_ATT) {
|
||||
trace_common(cpu_unit.fileref);
|
||||
va_start(args, fmt); /* get pointer to argument list */
|
||||
vfprintf(cpu_unit.fileref, fmt, args);
|
||||
va_end(args);
|
||||
fputs(CRLF, cpu_unit.fileref);
|
||||
}
|
||||
|
||||
trace_common(stdout);
|
||||
va_start(args, fmt); /* get pointer to argument list */
|
||||
vfprintf(stdout, fmt, args);
|
||||
va_end(args);
|
||||
|
@ -1830,17 +1882,32 @@ void trace_both (char *fmt, ...)
|
|||
void debug_print (char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
FILE *fout = stdout;
|
||||
t_bool binarymode = FALSE;
|
||||
|
||||
#define DEBUG_TO_PRINTER
|
||||
|
||||
#ifdef DEBUG_TO_PRINTER
|
||||
if (prt_unit[0].fileref != NULL) { /* THIS IS TEMPORARY */
|
||||
fout = prt_unit[0].fileref;
|
||||
binarymode = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
va_start(args, fmt);
|
||||
vprintf(fmt, args);
|
||||
vfprintf(fout, fmt, args);
|
||||
if (cpu_unit.flags & UNIT_ATT)
|
||||
vfprintf(cpu_unit.fileref, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
if (strchr(fmt, '\n') == NULL) { /* be sure to emit a newline */
|
||||
putchar('\n');
|
||||
if (binarymode)
|
||||
fputs(CRLF, fout);
|
||||
else
|
||||
putc('\n', fout);
|
||||
|
||||
if (cpu_unit.flags & UNIT_ATT)
|
||||
putc('\n', cpu_unit.fileref);
|
||||
fputs(CRLF, cpu_unit.fileref);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "ibm1130_defs.h"
|
||||
#include "ibm1130_fmt.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <io.h> /* Microsoft puts definition of mktemp into io.h rather than stdlib.h */
|
||||
|
@ -18,6 +19,16 @@
|
|||
* This is not a supported product, but I welcome bug reports and fixes.
|
||||
* Mail to simh@ibm1130.org
|
||||
|
||||
* Update 2012-10-12 Added ability to specify tab expansion width in deck files
|
||||
|
||||
* Update 2008-11-24 Made card reader attach always use read-only mode, so if file does not exist
|
||||
it will not be created as an empty file. Fixed bug in BOOT CR (cold start from card)
|
||||
that resulted in seeing cold card data again when next card was read. (This caused
|
||||
the DMS load deck to fail, for instance).
|
||||
|
||||
* Update 2007-05-01 Changed name of function xio_1142_card to xio_1442_card.
|
||||
Took six years to notice the mistake.
|
||||
|
||||
* Update 2006-01-23 More fixes, in call to mktemp and in 2501 support, also thanks
|
||||
to Carl Claunch.
|
||||
|
||||
|
@ -60,25 +71,29 @@
|
|||
|
||||
The ATTACH CR command accepts several command-line switches
|
||||
|
||||
-q quiet mode, the simulator will not print the name of each file it opens
|
||||
while processing deck files (which are discussed below). For example,
|
||||
-q quiet mode, the simulator will not print the name of each file it opens
|
||||
while processing deck files (which are discussed below). For example,
|
||||
|
||||
ATTACH -q @deckfile
|
||||
ATTACH CR -q @deckfile
|
||||
|
||||
-l makes the simulator convert lower case letters in text decks
|
||||
to the IBM lower-case Hollerith character codes. Normally, the simulator
|
||||
converts lower case input to the uppercase Hollerith character codes.
|
||||
(Lowercase codes are used in APL\1130 save decks).
|
||||
-l makes the simulator convert lower case letters in text decks
|
||||
to the IBM lower-case Hollerith character codes. Normally, the simulator
|
||||
converts lower case input to the uppercase Hollerith character codes.
|
||||
(Lowercase codes are used in APL\1130 save decks).
|
||||
|
||||
-d prints a lot of simulator debugging information
|
||||
-d prints a lot of simulator debugging information
|
||||
|
||||
-f converts tabs in an ascii file to spaces according to Fortran column conventions
|
||||
-a converts tabs in an ascii file to spaces according to 1130 Assembler column conventions
|
||||
-t converts tabs in an ascii file to spaces, with tab settings every 8 columns
|
||||
(See below for a discussion of tab formatting)
|
||||
-f converts tabs in an ascii file to spaces according to Fortran column conventions
|
||||
-a converts tabs in an ascii file to spaces according to 1130 Assembler column conventions
|
||||
-t converts tabs in an ascii file to spaces, with tab settings every 8 columns
|
||||
-# converts tabs in an ascii file to spaces, with tab settings every # columns
|
||||
(See below for a discussion of tab formatting)
|
||||
|
||||
-p means that filename is a COM port connected to a physical card reader using
|
||||
the CARDREAD interface (see http://ibm1130.org/sim/downloads)
|
||||
-p means that filename is a COM port connected to a physical card reader using
|
||||
the CARDREAD interface (see http://ibm1130.org/sim/downloads)
|
||||
|
||||
NOTE: for the Card Reader (CR), the -r (readonly) switch is implied. If the file does
|
||||
not exist, it will NOT be created.
|
||||
|
||||
The ATTACH CP command accepts the -d switch.
|
||||
|
||||
|
@ -95,7 +110,7 @@
|
|||
arguments to ibm1130, or to the "do" command if a "do" script is executing, if the
|
||||
attach command is constructed this way:
|
||||
|
||||
attach @deckfile %1 %2 %3
|
||||
attach CR @deckfile %1 %2 %3
|
||||
|
||||
This will pass the ibm1130 or do script arguments to attach, which will make
|
||||
them available in the deckfile. Then, for instance the line
|
||||
|
@ -114,6 +129,7 @@
|
|||
af forces 029 ascii conversion, and interprets tabs in Fortran mode
|
||||
aa forces 029 ascii conversion, and interprets tabs in 1130 Assembler mode
|
||||
at forces 029 ascii conversion, and interprets tabs with settings every 8 spaces
|
||||
a# forces 029 ascii conversion, and interprets tabs with settings every # spaces
|
||||
|
||||
If "a" or "b" mode is not specified, the device mode setting is used. In this case,
|
||||
if the mode is "auto", the simulator will select binary or 029 by inspecting each
|
||||
|
@ -644,10 +660,12 @@ static CPCODE cardcode_026F[] = /* 026 fortran */
|
|||
0x0220, '\'',
|
||||
0x8420, '.',
|
||||
0x8220, ')',
|
||||
0x8220, '<', /* if ASCII has <, treat like ) */
|
||||
0x4420, '$',
|
||||
0x4220, '*',
|
||||
0x2420, ',',
|
||||
0x2220, '(',
|
||||
0x2220, '%', /* if ASCII has %, treat like ) */
|
||||
};
|
||||
|
||||
static CPCODE cardcode_026C[] = /* 026 commercial */
|
||||
|
@ -695,11 +713,13 @@ static CPCODE cardcode_026C[] = /* 026 commercial */
|
|||
0x0420, '=',
|
||||
0x0220, '\'',
|
||||
0x8420, '.',
|
||||
0x8220, ')',
|
||||
0x8220, '<',
|
||||
0x8220, ')', /* if ASCII has ), treat like < */
|
||||
0x4420, '$',
|
||||
0x4220, '*',
|
||||
0x2420, ',',
|
||||
0x2220, '(',
|
||||
0x2220, '%',
|
||||
0x2220, '(', /* if ASCII has (, treat like % */
|
||||
};
|
||||
|
||||
extern int cgi;
|
||||
|
@ -717,7 +737,8 @@ static int any_punched = 0;
|
|||
#define MAXARGS 10 /* max number of arguments to save */
|
||||
static char list_save[MAXARGS][MAXARGLEN], *list_arg[MAXARGLEN];
|
||||
static int list_nargs = 0;
|
||||
static char* (*tab_proc)(char*) = NULL; /* tab reformatting routine */
|
||||
static char* (*tab_proc)(char* str, int width) = NULL; /* tab reformatting routine */
|
||||
static int tab_width = 8;
|
||||
|
||||
static uint16 punchstation[80];
|
||||
static uint16 readstation[80];
|
||||
|
@ -776,10 +797,12 @@ t_stat set_active_cr_code (int match)
|
|||
if (! lookup_codetable(match, &code, &ncode))
|
||||
return SCPE_ARG;
|
||||
|
||||
memset(ascii_to_card, 0, sizeof(ascii_to_card));
|
||||
if (code != NULL) { /* if an ASCII mode was selected */
|
||||
memset(ascii_to_card, 0, sizeof(ascii_to_card));
|
||||
|
||||
for (i = 0; i < ncode; i++) /* set ascii to card code table */
|
||||
ascii_to_card[code[i].ascii] = code[i].hollerith;
|
||||
for (i = 0; i < ncode; i++) /* set ascii to card code table */
|
||||
ascii_to_card[code[i].ascii] = code[i].hollerith;
|
||||
}
|
||||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -938,19 +961,19 @@ t_stat load_cr_boot (int drvno, int switches)
|
|||
}
|
||||
/* quiet switch or CGI mode inhibit the boot remark */
|
||||
if (((switches & SWMASK('Q')) == 0) && ! cgi) { /* 3.0-3, parenthesized & operation, per lint check */
|
||||
sprintf(msg, "Loaded %s cold start card\n", name);
|
||||
sprintf(msg, "Loaded %s cold start card", name);
|
||||
|
||||
#ifdef GUI_SUPPORT
|
||||
remark_cmd(msg);
|
||||
#else
|
||||
printf("%s", msg);
|
||||
printf("%s\n", msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat cr_boot (int32 unitno, DEVICE *dptr)
|
||||
t_stat cr_boot (int unitno, DEVICE *dptr)
|
||||
{
|
||||
t_stat rval;
|
||||
int i;
|
||||
|
@ -962,7 +985,7 @@ t_stat cr_boot (int32 unitno, DEVICE *dptr)
|
|||
return load_cr_boot(-1, 0);
|
||||
|
||||
if (GET_ACTCODE(cr_unit) != CODE_BINARY) {
|
||||
printf("Can only boot from card reader when set to BINARY mode");
|
||||
printf("Can only boot from card reader when set to BINARY mode\n");
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
|
@ -971,6 +994,11 @@ t_stat cr_boot (int32 unitno, DEVICE *dptr)
|
|||
|
||||
feedcycle(TRUE, FALSE);
|
||||
|
||||
if (readstate != STATION_LOADED) {
|
||||
printf("No cards in reader\n");
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
/* if (fxread(buf, sizeof(buf[0]), 80, cr_unit.fileref) != 80) */
|
||||
/* return SCPE_IOERR; */
|
||||
|
||||
|
@ -979,6 +1007,7 @@ t_stat cr_boot (int32 unitno, DEVICE *dptr)
|
|||
for (i = 0; i < 80; i++) /* shift 12 bits into 16 */
|
||||
WriteW(i, (readstation[i] & 0xF800) | ((readstation[i] & 0x0400) ? 0x00C0 : 0x0000) | ((readstation[i] & 0x03F0) >> 4));
|
||||
|
||||
readstate = STATION_READ; /* the current card has been consumed */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1139,7 @@ again: /* jump here if we've loaded a new deck after emptying the previous one
|
|||
|
||||
if (tab_proc != NULL) { /* apply tab editing, if specified */
|
||||
buf[nread] = '\0'; /* .. be sure string is terminated */
|
||||
result = (*tab_proc)(buf); /* .. convert tabs spaces */
|
||||
result = (*tab_proc)(buf, tab_width); /* .. convert tabs spaces */
|
||||
nread = strlen(result); /* .. set new read length */
|
||||
}
|
||||
else
|
||||
|
@ -1247,7 +1276,7 @@ static void checkdeck (void)
|
|||
|
||||
static t_bool nextdeck (void)
|
||||
{
|
||||
char buf[200], tmpbuf[200], *fname, *c, quote, *mode;
|
||||
char buf[200], tmpbuf[200], *fname, *c, quote;
|
||||
int code;
|
||||
long fpos;
|
||||
|
||||
|
@ -1271,6 +1300,7 @@ static t_bool nextdeck (void)
|
|||
|
||||
for (;;) { /* get a filename */
|
||||
tab_proc = NULL; /* default: no tab editing */
|
||||
tab_width = 8;
|
||||
|
||||
if (fgets(buf, sizeof(buf), deckfile) == NULL)
|
||||
break; /* oops, no more names */
|
||||
|
@ -1391,7 +1421,7 @@ static t_bool nextdeck (void)
|
|||
continue;
|
||||
}
|
||||
|
||||
mode = c = skipbl(c); /* skip to next token, which would be mode, if present */
|
||||
c = skipbl(c); /* skip to next token, which would be mode, if present */
|
||||
|
||||
switch (*c) {
|
||||
case 'b':
|
||||
|
@ -1422,6 +1452,13 @@ static t_bool nextdeck (void)
|
|||
case 'T':
|
||||
tab_proc = EditToWhitespace;
|
||||
c++;
|
||||
tab_width = 0; /* see if there is a digit after the 4 -- if so use it as tab expansion width */
|
||||
while (isdigit(*c))
|
||||
tab_width = tab_width*10 + *c++ - '0';
|
||||
|
||||
if (tab_width == 0)
|
||||
tab_width = 8;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1430,10 +1467,10 @@ static t_bool nextdeck (void)
|
|||
code = guess_cr_code();
|
||||
|
||||
if (cpu_unit.flags & UNIT_ATT)
|
||||
trace_io("(Opened %s deck %s%s)\n", (code == CODE_BINARY) ? "binary" : "text", fname, tab_proc ? (*tab_proc)(NULL) : "");
|
||||
trace_io("(Opened %s deck %s%s)\n", (code == CODE_BINARY) ? "binary" : "text", fname, tab_proc ? (*tab_proc)(NULL, tab_width) : "");
|
||||
|
||||
if (! (cr_unit.flags & UNIT_QUIET))
|
||||
printf( "(Opened %s deck %s%s)\n", (code == CODE_BINARY) ? "binary" : "text", fname, tab_proc ? (*tab_proc)(NULL) : "");
|
||||
printf( "(Opened %s deck %s%s)\n", (code == CODE_BINARY) ? "binary" : "text", fname, tab_proc ? (*tab_proc)(NULL, tab_width) : "");
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -1510,7 +1547,7 @@ t_stat cr_rewind (void)
|
|||
static t_stat cr_attach (UNIT *uptr, char *cptr)
|
||||
{
|
||||
t_stat rval;
|
||||
t_bool use_decklist;
|
||||
t_bool use_decklist, old_quiet;
|
||||
char *c, *arg, quote;
|
||||
|
||||
cr_detach(uptr); /* detach file and possibly deck file */
|
||||
|
@ -1518,8 +1555,11 @@ static t_stat cr_attach (UNIT *uptr, char *cptr)
|
|||
CLRBIT(uptr->flags, UNIT_SCRATCH|UNIT_QUIET|UNIT_DEBUG|UNIT_PHYSICAL|UNIT_LOWERCASE); /* set options */
|
||||
|
||||
tab_proc = NULL;
|
||||
tab_width = 8;
|
||||
use_decklist = FALSE;
|
||||
|
||||
sim_switches |= SWMASK('R'); // the card reader is readonly. Don't create an empty file if file does not exist
|
||||
|
||||
if (sim_switches & SWMASK('D')) SETBIT(uptr->flags, UNIT_DEBUG);
|
||||
if (sim_switches & SWMASK('Q')) SETBIT(uptr->flags, UNIT_QUIET);
|
||||
if (sim_switches & SWMASK('L')) SETBIT(uptr->flags, UNIT_LOWERCASE);
|
||||
|
@ -1589,8 +1629,14 @@ static t_stat cr_attach (UNIT *uptr, char *cptr)
|
|||
SETBIT(uptr->flags, UNIT_ATT);
|
||||
uptr->pos = 0;
|
||||
}
|
||||
else if ((rval = attach_unit(uptr, cptr)) != SCPE_OK) {
|
||||
return rval;
|
||||
else {
|
||||
old_quiet = sim_quiet; /* attach the file, but set sim_quiet so we don't get the "CR is read-only" message */
|
||||
sim_quiet = TRUE;
|
||||
rval = attach_unit(uptr, cptr);
|
||||
sim_quiet = old_quiet;
|
||||
|
||||
if (rval != SCPE_OK) /* file did not exist */
|
||||
return rval;
|
||||
}
|
||||
|
||||
if (use_decklist) { /* if we skipped the '@', store the actually-specified name */
|
||||
|
@ -1667,10 +1713,10 @@ static t_stat cp_detach (UNIT *uptr)
|
|||
return detach_unit(uptr);
|
||||
}
|
||||
|
||||
static void op_done (UNIT *u, t_bool issue_intr)
|
||||
static void op_done (UNIT *u, char *opname, t_bool issue_intr)
|
||||
{
|
||||
if (u->flags & UNIT_DEBUG)
|
||||
DEBUG_PRINT("!CR Op Complete, card %d", cr_count);
|
||||
DEBUG_PRINT("!CR %s Op Complete, card %d%s", opname, cr_count, issue_intr ? ", interrupt" : "");
|
||||
|
||||
SET_OP(OP_IDLE);
|
||||
|
||||
|
@ -1704,7 +1750,7 @@ static t_stat cr_svc (UNIT *uptr)
|
|||
break;
|
||||
|
||||
case OP_FEEDING:
|
||||
op_done(&cr_unit, FALSE);
|
||||
op_done(&cr_unit, "feed", FALSE);
|
||||
break;
|
||||
|
||||
case OP_READING:
|
||||
|
@ -1718,10 +1764,7 @@ static t_stat cr_svc (UNIT *uptr)
|
|||
M[(cr_addr + i) & mem_mask] = readstation[i];
|
||||
|
||||
readstate = STATION_READ;
|
||||
if (cr_unit.flags & UNIT_DEBUG)
|
||||
DEBUG_PRINT("!CR Op Complete, card %d", cr_count);
|
||||
|
||||
op_done(&cr_unit, TRUE);
|
||||
op_done(&cr_unit, "read", TRUE);
|
||||
}
|
||||
else if (++cr_unit.COLUMN < 80) { /* 1442 interrupts on each column... */
|
||||
SETBIT(cr_dsw, CR_DSW_1442_READ_RESPONSE);
|
||||
|
@ -1733,7 +1776,7 @@ static t_stat cr_svc (UNIT *uptr)
|
|||
}
|
||||
else { /* ... then issues op-complete */
|
||||
readstate = STATION_READ;
|
||||
op_done(&cr_unit, TRUE);
|
||||
op_done(&cr_unit, "read", TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1745,7 +1788,7 @@ static t_stat cr_svc (UNIT *uptr)
|
|||
|
||||
if (cp_unit.flags & UNIT_LASTPUNCH) {
|
||||
punchstate = STATION_PUNCHED;
|
||||
op_done(&cp_unit, TRUE);
|
||||
op_done(&cp_unit, "punch", TRUE);
|
||||
}
|
||||
else if (++cp_unit.COLUMN < 80) {
|
||||
SETBIT(cr_dsw, CR_DSW_1442_PUNCH_RESPONSE);
|
||||
|
@ -1757,7 +1800,7 @@ static t_stat cr_svc (UNIT *uptr)
|
|||
}
|
||||
else {
|
||||
punchstate = STATION_PUNCHED;
|
||||
op_done(&cp_unit, TRUE);
|
||||
op_done(&cp_unit, "punch", TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1853,7 +1896,7 @@ void xio_2501_card (int32 addr, int32 func, int32 modify)
|
|||
}
|
||||
}
|
||||
|
||||
void xio_1142_card (int32 addr, int32 func, int32 modify)
|
||||
void xio_1442_card (int32 addr, int32 func, int32 modify)
|
||||
{
|
||||
char msg[80];
|
||||
int ch;
|
||||
|
@ -2579,8 +2622,7 @@ static t_stat pcr_svc (UNIT *uptr)
|
|||
break;
|
||||
|
||||
case OP_READING:
|
||||
if (pcr_nready >= 2) { /* if there is a whole column buffered, simulate column interrupt*/
|
||||
/* pcr_trigger_interrupt_0 - simulate a read response interrupt so OS will read queued column data */
|
||||
if (pcr_nready >= 2) { /* if there is a whole column buffered, simulate column interrupt/* pcr_trigger_interrupt_0 - simulate a read response interrupt so OS will read queued column data */
|
||||
|
||||
pcr_trigger_interrupt_0();
|
||||
sim_activate(&cr_unit, cr_wait); /* keep checking frequently */
|
||||
|
@ -2588,7 +2630,7 @@ static t_stat pcr_svc (UNIT *uptr)
|
|||
else if (pcr_done) {
|
||||
pcr_done = FALSE;
|
||||
cr_count++;
|
||||
op_done(&cr_unit, TRUE);
|
||||
op_done(&cr_unit, "pcr read", TRUE);
|
||||
pcr_set_dsw_from_status(TRUE);
|
||||
}
|
||||
else
|
||||
|
@ -2598,7 +2640,7 @@ static t_stat pcr_svc (UNIT *uptr)
|
|||
case OP_FEEDING:
|
||||
if (pcr_done) {
|
||||
cr_count++;
|
||||
op_done(&cr_unit, FALSE);
|
||||
op_done(&cr_unit, "pcr feed", FALSE);
|
||||
pcr_set_dsw_from_status(TRUE);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -137,6 +137,7 @@ void WriteW (int32 a, int32 d);
|
|||
#define STOP_BREAK 11 /* simulator break key pressed */
|
||||
#define STOP_STEP 12 /* step count expired */
|
||||
#define STOP_OTHER 13 /* other reason, probably error returned by sim_process_event() */
|
||||
#define STOP_PRINT_CHECK 14 /* stop due to printer check (used by CGI version) */
|
||||
|
||||
#define IORETURN(f,v) ((f)? (v): SCPE_OK) /* cond error return */
|
||||
|
||||
|
@ -252,7 +253,7 @@ void WriteW (int32 a, int32 d);
|
|||
/* prototypes: xio handlers */
|
||||
|
||||
void xio_1131_console (int32 addr, int32 func, int32 modify); /* console keyboard and printer */
|
||||
void xio_1142_card (int32 addr, int32 func, int32 modify); /* standard card reader/punch */
|
||||
void xio_1442_card (int32 addr, int32 func, int32 modify); /* standard card reader/punch */
|
||||
void xio_1134_papertape (int32 addr, int32 func, int32 modify); /* paper tape reader/punch */
|
||||
void xio_disk (int32 addr, int32 func, int32 modify, int drv); /* internal CPU disk */
|
||||
void xio_1627_plotter (int32 addr, int32 func, int32 modify); /* XY plotter */
|
||||
|
|
|
@ -34,7 +34,7 @@ commands may NOT be accurate. This should probably be fixed.
|
|||
*/
|
||||
|
||||
#include "ibm1130_defs.h"
|
||||
#include "memory.h"
|
||||
#include <memory.h>
|
||||
|
||||
#define TRACE_DMS_IO /* define to enable debug of DMS phase IO */
|
||||
|
||||
|
|
|
@ -72,18 +72,19 @@
|
|||
#define MIN(a,b) ((a < b) ? a : b)
|
||||
#define AMSG " with Assembler Reformat"
|
||||
#define FMSG " with FORTRAN Reformat"
|
||||
#define WMSG " with tab replacement"
|
||||
#define AFORMAT "%20.20s%-60.60s"," "
|
||||
#define ACOMMENTFMT "%20.20s%-60.60s"," "
|
||||
#define ABLANKLINE "%20.20s*"," "
|
||||
#define FFORMAT "%-5.5s %-74.74s"
|
||||
#define FCONTFMT "%-5.5s%-75.75s"
|
||||
|
||||
char gszLabel[6]; /* work area for label */
|
||||
char gszArg[MAXLINE]; /* .. argument */
|
||||
char gszOutput[MAXLINE]; /* .. output */
|
||||
short gaiAsmTabs[] = {7,12,15,20,25,30,35,40,45,52,0};/* tab stops for assembler */
|
||||
|
||||
short gaiPlainTabs[] = {9, 17, 25, 33, 41, 49, 57, 65, 73, 0};/* tab stops for just plain tabs */
|
||||
static char gszLabel[6]; /* work area for label */
|
||||
static char gszArg[MAXLINE]; /* .. argument */
|
||||
static char gszOutput[MAXLINE]; /* .. output */
|
||||
static short gaiAsmTabs[] = {7,12,15,20,25,30,35,40,45,52,0};/* tab stops for assembler */
|
||||
static short gaiPlainTabs[42]; /* tab stops for plain tabs. Settings will be made later. Max # positions when tabs are every 2 positions */
|
||||
static int giPlainTabWidth = 0;
|
||||
|
||||
/*
|
||||
* helper routines
|
||||
|
@ -163,7 +164,7 @@ char* pszX; /* work pointer */
|
|||
* EditToAsm - convert tab-formatted text line to 1130 Assembler format
|
||||
*/
|
||||
|
||||
char *EditToAsm (char* p_pszEdit) /* convert line to 1130 assembler */
|
||||
char *EditToAsm (char* p_pszEdit, int width) /* convert line to 1130 assembler */
|
||||
{
|
||||
char pszLine[MAXLINE]; /* source line */
|
||||
char pszWork[WORKSZ]; /* work buffer */
|
||||
|
@ -174,11 +175,11 @@ size_t iI; /* work integer */
|
|||
return AMSG; /* a. yes .. return display message */
|
||||
|
||||
if (*p_pszEdit == '!') /* leave lines starting with ! alone */
|
||||
return EditToWhitespace(p_pszEdit+1);
|
||||
return EditToWhitespace(p_pszEdit+1, width);
|
||||
|
||||
if (*p_pszEdit == '*') /* q. comment line? */
|
||||
{ /* a. yes.. */
|
||||
strncpy(pszWork, EditToWhitespace(p_pszEdit), MAXLINE); /* .. convert any tabs */
|
||||
strncpy(pszWork, EditToWhitespace(p_pszEdit, width), MAXLINE); /* .. convert any tabs */
|
||||
sprintf(gszOutput, ACOMMENTFMT, pszWork); /* .. put the comment out there in the opcode column */
|
||||
return gszOutput; /* .. and return it */
|
||||
}
|
||||
|
@ -229,7 +230,7 @@ size_t iI; /* work integer */
|
|||
* (a la DEC Fortran)
|
||||
*/
|
||||
|
||||
char *EditToFortran(char* p_pszEdit) /* convert line to 1130 assembler */
|
||||
char *EditToFortran(char* p_pszEdit, int width) /* convert line to 1130 assembler */
|
||||
{
|
||||
char pszLine[MAXLINE]; /* source line */
|
||||
char* pszWork; /* work pointer */
|
||||
|
@ -244,7 +245,7 @@ int bContinue; /* true if continue */
|
|||
|
||||
if (*p_pszEdit == 'C' || *p_pszEdit == '*' || *p_pszEdit == '\0') /* q. comment or directive or blank line? */
|
||||
{ /* a. yes.. don't restructure */
|
||||
return EditToWhitespace(p_pszEdit);
|
||||
return EditToWhitespace(p_pszEdit, width);
|
||||
}
|
||||
|
||||
strncpy(pszLine, p_pszEdit, MAXLINE-1); /* copy the line local */
|
||||
|
@ -283,19 +284,33 @@ int bContinue; /* true if continue */
|
|||
}
|
||||
|
||||
/*************************************************
|
||||
* EditToWhitespace - expand tabs at 8 space intervals.
|
||||
* EditToWhitespace - expand tabs at n space intervals.
|
||||
*/
|
||||
|
||||
char* EditToWhitespace(char *p_pszEdit)
|
||||
char* EditToWhitespace(char *p_pszEdit, int width)
|
||||
{
|
||||
int iI; /* work integer */
|
||||
int iPos; /* work integer for settings tab stops */
|
||||
char pszLine[MAXLINE]; /* source line */
|
||||
char pszWork[WORKSZ]; /* work buffer */
|
||||
|
||||
if (p_pszEdit == NULL) /* q. null request? */
|
||||
return AMSG; /* a. yes .. return display message */
|
||||
return WMSG; /* a. yes .. return display message */
|
||||
|
||||
strncpy(pszLine, p_pszEdit, MAXLINE-1); /* copy the line local */
|
||||
|
||||
if (width == 0) width = 8; /* default */
|
||||
|
||||
if ((width != giPlainTabWidth) && (width > 1) && (width < 30)) {
|
||||
giPlainTabWidth = width; /* if width is different, and valid, rebuild tabstop array */
|
||||
iI = 0; /* output index */
|
||||
iPos = width + 1; /* first tab position */
|
||||
while (iPos < 80) { /* fill array up to but not including position 80 */
|
||||
gaiPlainTabs[iI++] = iPos;
|
||||
iPos += width;
|
||||
}
|
||||
gaiPlainTabs[iI] = 0; /* mark end of array */
|
||||
}
|
||||
|
||||
ExpandTabs(pszLine, pszWork, gaiPlainTabs); /* expand the tabs */
|
||||
strncpy(gszOutput, pszWork, MAXLINE-1); /* copy the line back */
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
/* ibm1130_asm.h: definition of routines in ibm1130_asm.c
|
||||
*/
|
||||
|
||||
char* EditToAsm(char*); /* convert edit format to 1130 assembler format */
|
||||
char* EditToFortran(char*); /* convert edit format to Fortran format */
|
||||
char* EditToWhitespace(char*); /* clean white space, tabstops every 8 positions */
|
||||
char* EditToAsm(char* str, int width); /* convert edit format to 1130 assembler format */
|
||||
char* EditToFortran(char* str, int width); /* convert edit format to Fortran format */
|
||||
char* EditToWhitespace(char* str, int width); /* clean white space, tabstops every 8 positions */
|
||||
|
|
|
@ -151,6 +151,8 @@ static void EraseGDUScreen (void);
|
|||
|
||||
void xio_2250_display (int32 addr, int32 func, int32 modify)
|
||||
{
|
||||
if (cgi) return; /* ignore this device in CGI mode */
|
||||
|
||||
switch (func) {
|
||||
case XIO_SENSE_DEV:
|
||||
ACC = (gdu_dsw & GDU_DSW_BUSY) ? GDU_DSW_BUSY : gdu_dsw;
|
||||
|
@ -203,6 +205,8 @@ void xio_2250_display (int32 addr, int32 func, int32 modify)
|
|||
|
||||
static t_stat gdu_reset (DEVICE *dptr)
|
||||
{
|
||||
if (cgi) return SCPE_OK; /* ignore this device in CGI mode */
|
||||
|
||||
halt_regeneration();
|
||||
clear_interrupts();
|
||||
set_indicators(0);
|
||||
|
@ -250,15 +254,13 @@ static void start_regeneration (void)
|
|||
|
||||
static void halt_regeneration (void)
|
||||
{
|
||||
// halt_regeneration gets called at end of every refresh interation, so it should NOT black out the
|
||||
// screen -- this is why it was flickering so badly. The lower level code (called on a timer)
|
||||
// should check to see if GDU_DSW_BUSY is clear, and if it it still zero after several msec,
|
||||
// only then should it black out the screen and call StopGDUUpdates.
|
||||
// halt_regeneration gets called at end of every refresh interation, so it should NOT black out the
|
||||
// screen -- this is why it was flickering so badly. The lower level code (called on a timer)
|
||||
// should check to see if GDU_DSW_BUSY is clear, and if it it still zero after several msec,
|
||||
// only then should it black out the screen and call StopGDUUpdates.
|
||||
if (gdu_dsw & GDU_DSW_BUSY) {
|
||||
// StopGDUUpdates(); // let lower level code discover this during next refresh
|
||||
CLRBIT(gdu_dsw, GDU_DSW_BUSY);
|
||||
}
|
||||
// EraseGDUScreen(); // let cessation of regeneration erase it (eventually)
|
||||
}
|
||||
|
||||
static void notify_window_closed (void)
|
||||
|
@ -677,6 +679,8 @@ static HPEN hRedPen = NULL;
|
|||
static HBRUSH hGrayBrush, hDarkBrush;
|
||||
static HPEN hBlackPen;
|
||||
static int halted = 0; // number of time intervals that GDU has been halted w/o a regeneration
|
||||
static UINT idTimer = 0;
|
||||
static t_bool painting = FALSE;
|
||||
static LRESULT APIENTRY GDUWndProc (HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);
|
||||
static DWORD WINAPI GDUPump (LPVOID arg);
|
||||
|
||||
|
@ -685,6 +689,8 @@ static void destroy_GDU_window (void)
|
|||
if (hwGDU != NULL)
|
||||
SendMessage(hwGDU, WM_CLOSE, 0, 0); // cross thread call is OK
|
||||
|
||||
#ifdef XXXX
|
||||
// let window closure do this
|
||||
if (hGDUPump != INVALID_HANDLE_VALUE) { // this is not the most graceful way to do it
|
||||
TerminateThread(hGDUPump, 0);
|
||||
hGDUPump = INVALID_HANDLE_VALUE;
|
||||
|
@ -711,6 +717,7 @@ static void destroy_GDU_window (void)
|
|||
DeleteObject(hRedBrush);
|
||||
hRedBrush = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_LIGHTPEN
|
||||
if (hRedPen != NULL) {
|
||||
|
@ -750,6 +757,13 @@ static void gdu_WM_CLOSE (HWND hWnd)
|
|||
|
||||
static void gdu_WM_DESTROY (HWND hWnd)
|
||||
{
|
||||
PostMessage(hWnd, WM_QUIT, 0, 0);
|
||||
if (idTimer != 0) {
|
||||
KillTimer(hwGDU, 1);
|
||||
idTimer = 0;
|
||||
halted = 10000;
|
||||
painting = FALSE;
|
||||
}
|
||||
notify_window_closed();
|
||||
hwGDU = NULL;
|
||||
}
|
||||
|
@ -868,17 +882,29 @@ static void gdu_WM_PAINT (HWND hWnd)
|
|||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
int msec;
|
||||
|
||||
// code for display
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
PaintImage(hDC, TRUE);
|
||||
EndPaint(hWnd, &ps);
|
||||
|
||||
// set a timer so we keep doing it!
|
||||
if (idTimer == 0) {
|
||||
msec = (gdu_rate == 0) ? (1000 / DEFAULT_GDU_RATE) : 1000/gdu_rate;
|
||||
idTimer = SetTimer(hwGDU, 1, msec, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// the window has been resized
|
||||
|
||||
static void gdu_WM_SIZE (HWND hWnd, UINT state, int cx, int cy)
|
||||
{
|
||||
#ifdef BLIT_MODE
|
||||
InvalidateRect(hWnd, NULL, FALSE); // in blt mode, we'll paint a full black bitmap over the new screen size
|
||||
#else
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
// tweak the sizing rectangle during a resize to guarantee a square window
|
||||
|
@ -911,7 +937,7 @@ static void gdu_WM_TIMER (HWND hWnd, UINT id)
|
|||
{
|
||||
HDC hDC;
|
||||
|
||||
if (running) { // if CPU is running, update picture
|
||||
if (painting) { // if GDU is running, update picture
|
||||
if ((gdu_dsw & GDU_DSW_BUSY) == 0) { // regeneration is not to occur
|
||||
if (++halted >= 4) { // stop the timer if four timer intervals go by with the display halted
|
||||
EraseGDUScreen(); // screen goes black due to cessation of refreshing
|
||||
|
@ -981,26 +1007,15 @@ static void CheckGDUKeyboard (void)
|
|||
{
|
||||
}
|
||||
|
||||
static UINT idTimer = 0;
|
||||
|
||||
static void StartGDUUpdates (void)
|
||||
{
|
||||
int msec;
|
||||
|
||||
if (idTimer == 0) {
|
||||
msec = (gdu_rate == 0) ? (1000 / DEFAULT_GDU_RATE) : 1000/gdu_rate;
|
||||
idTimer = SetTimer(hwGDU, 1, msec, NULL);
|
||||
}
|
||||
halted = 0;
|
||||
painting = TRUE;
|
||||
}
|
||||
|
||||
static void StopGDUUpdates (void)
|
||||
{
|
||||
if (idTimer != 0) {
|
||||
KillTimer(hwGDU, 1);
|
||||
idTimer = 0;
|
||||
halted = 10000;
|
||||
}
|
||||
painting = FALSE;
|
||||
}
|
||||
|
||||
static void GetMouseCoordinates()
|
||||
|
@ -1030,7 +1045,7 @@ static void GetMouseCoordinates()
|
|||
|
||||
t_bool gdu_active (void)
|
||||
{
|
||||
return gdu_dsw & GDU_DSW_BUSY;
|
||||
return cgi ? 0 : (gdu_dsw & GDU_DSW_BUSY);
|
||||
}
|
||||
|
||||
static void EraseGDUScreen (void)
|
||||
|
@ -1103,6 +1118,8 @@ static DWORD WINAPI GDUPump (LPVOID arg)
|
|||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
painting = FALSE;
|
||||
|
||||
if (hwGDU != NULL) {
|
||||
DestroyWindow(hwGDU); /* but if a quit message got posted, clean up */
|
||||
hwGDU = NULL;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* ------------------------------------------------------------------------ */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "ibm1130_defs.h"
|
||||
|
@ -92,10 +93,6 @@ DEVICE console_dev = {
|
|||
|
||||
/* reset for the "console" display device */
|
||||
|
||||
extern char *read_line (char *cptr, int size, FILE *stream);
|
||||
extern DEVICE *find_unit (char *cptr, UNIT **uptr);
|
||||
extern char *sim_prompt;
|
||||
|
||||
extern UNIT cr_unit; /* pointers to 1442 and 1132 (1403) printers */
|
||||
extern UNIT prt_unit;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
2004.10.22 - Written.
|
||||
2006.1.2 - Rewritten as plotter routine by Carl V Claunch
|
||||
2012.11.23 - added -d option in detach, which we'll use in the CGI simulator. BK.
|
||||
|
||||
* (C) Copyright 2004, Brian Knittel.
|
||||
* You may freely use this program, but: it offered strictly on an AS-IS, AT YOUR OWN
|
||||
|
@ -35,6 +36,7 @@
|
|||
|
||||
#else
|
||||
|
||||
#define NONDLL // I am linking statically to avoid some issues.
|
||||
#include "gd.h"
|
||||
|
||||
/***************************************************************************************
|
||||
|
@ -45,31 +47,78 @@
|
|||
* - sheet moveable in .01" steps, either direction
|
||||
* - switchable pen, in various colors and line widths
|
||||
*
|
||||
* Simulator implementation will create a JPEG image corresponding to a
|
||||
* landscape mode sheet of paper, the width of the carriage at 11".
|
||||
* A diagram of more than 8" of paper travel will span printed pages
|
||||
* in landscape mode.
|
||||
* Notice that the WIDTH is 11" and the LENGTH can be anything up to 120'. And, the WIDTH
|
||||
* was the plotter's Y direction, and the LENGTH was the plotter's X direction.
|
||||
*
|
||||
* The simulator creates a GIF image corresponding to a landscape mode sheet of paper. That is,
|
||||
* the plotter's Y direction is the image's horizontal dimension, and the plotter's X direction
|
||||
* is the image's vertical dimension. The WIDTH of the image is always 1100 pixels (11 inches at
|
||||
* 100 dpi), and the LENGTH (height) of the image can be set. The default is 800 pixels (8
|
||||
* inches at 100 dpi). A diagram of more than 8" in length (X direction) will span more than
|
||||
* one printed page in landscape mode.
|
||||
*
|
||||
* When an 'att plot' command is issued a file is created based on the
|
||||
* default or currently set values of paper length, starting
|
||||
* position of the pen in both X and Y axes, pen color and pen width.
|
||||
* Based on the number of logical pages of paper, the command will create
|
||||
* the proper size canvas internally and create the output JPEG file.
|
||||
* default or currently set values of paper length, pen position, pen color and pen width.
|
||||
*
|
||||
* When a 'det plot' command is issued, the plotter image will be converted
|
||||
* into the file that was specified during the attach process. The
|
||||
* image is not viewable until this point, unless an examine plot is
|
||||
* issued which will dump the current state of the paper into the file.
|
||||
* When a 'det plot' command is issued, the plotter image will be
|
||||
* written to the GIF that was created during the attach process. The
|
||||
* image is not viewable until this point. (You could implement an EXAMINE PLOT command
|
||||
* of some sort to write out an intermediate version of the image, but this is not currently
|
||||
* implemented).
|
||||
*
|
||||
* The 'set plot' command can set pen width, paper length, pen color,
|
||||
* current carriage X and Y coordinates. Paper length can be set
|
||||
* current carriage X and Y coordinates, as discussed below. Paper length can be set
|
||||
* to alter the default of 800 (8"); changes are ignored until
|
||||
* the next 'attach' command. The current carriage x and y positions
|
||||
* can be set at any time and will go into effect immediately, just
|
||||
* as the pen color and pen width can be altered on the fly.
|
||||
*
|
||||
* NOTE: requires gd library and definition of ENABLE_PLOT_SUPPORT in makefile or Visual C configuration
|
||||
* gd is not included in the main simh and ibm1130.org distributions at the present time.
|
||||
* NOTE: requires the libgd library and definition of ENABLE_PLOT_SUPPORT in makefile or Visual C configuration
|
||||
* gd source is not included in the main simh and ibm1130.org source distributions at the present time due to
|
||||
* licensing issues.
|
||||
*
|
||||
* NOTE: On Windows, you need to either:
|
||||
* + compile both LIBGD and SIMH to use the static C runtime libraries, compile
|
||||
* LIBGD to a static library, and link LIBGD into ibm1130.exe (which is
|
||||
* what we do at IBM1130.org, so that gd is built into the version of ibm1130.exe
|
||||
* we distribute), or,
|
||||
* + Compile both LIBGD and IBM1130 to use the DLL version of the C runtime, and compile
|
||||
* GD to either a static library or a DLL, but, static is easier since you don't
|
||||
* need to copy LIBGD.DLL along with ibm1130.exe
|
||||
*
|
||||
* SIMH commands:
|
||||
*
|
||||
* attach [-w] plot filename.gif
|
||||
* Creates file filename.gif and attaches the plotter device to it.
|
||||
* The file is empty at this point. The pen is raised. If the -w option is specified, and the
|
||||
* simulator does not draw on the plotter between attach and detach, the gif file will be deleted
|
||||
* on detach. (This is useful for the the cgi version of the simulator).
|
||||
*
|
||||
* detach plot filename.gif
|
||||
* Detach the plot device. The gif data is written at this point, not before.
|
||||
* If the -w flag was used on attach, and there was no plot activity, the gif file will be deleted.
|
||||
*
|
||||
* set plot black | red | blue | green | yellow | purple | lgrey | grey
|
||||
* Sets the pen to the named color. Default is black.
|
||||
*
|
||||
* set plot 1.0 | 2.0 | 3.0 | 4.0
|
||||
* Sets the pen thickness to the specified number of hundredths of an inch. Default is 1.0
|
||||
*
|
||||
* set plot penup | pendown
|
||||
* Moves the pen up or down (onto the paper).
|
||||
*
|
||||
* set plot length NNN
|
||||
* Sets the plot length (plotter X direction, GIF vertical dimension) to the NNN hundredths of
|
||||
* an inch. Default is 800. The plot width (plotter Y direction, GIF horizontal dimension) is always
|
||||
* 1100 (11 inches). NOTE: Changing this setting has no affect on the current plot. It takes affect at
|
||||
* the next "attach plot" command.
|
||||
*
|
||||
* set plot xpos NNN
|
||||
* set plot ypos NNN
|
||||
* Sets the pen x or y position to NNN hundredths of an inch.
|
||||
*
|
||||
* (You cannot manually create a plot by issuing set plot pendown, xpos and ypos commands. The xpos and ypos
|
||||
* settings only change the starting point for the simulated program).
|
||||
***************************************************************************************/
|
||||
|
||||
#define PLOT1627_DSW_OP_COMPLETE 0x8000
|
||||
|
@ -78,7 +127,7 @@
|
|||
|
||||
#define IS_ONLINE(u) (((u)->flags & (UNIT_ATT|UNIT_DIS)) == UNIT_ATT)
|
||||
#define IS_DEBUG ((plot_unit->flags & UNIT_DEBUG) == UNIT_DEBUG)
|
||||
#define IS_PENDOWN ((plot_unit->flags & UNIT_PEN) == UNIT_PEN)
|
||||
#define IS_PENDOWN ((plot_unit->flags & UNIT_PEN) != 0)
|
||||
|
||||
static t_stat plot_svc (UNIT *uptr); /* activity routine */
|
||||
static t_stat plot_reset (DEVICE *dptr); /* reset of 1130 */
|
||||
|
@ -103,7 +152,7 @@ static int32 plot_ymax = 1099; /* right edge of carriage */
|
|||
|
||||
#define PEN_DOWN 0x80000000
|
||||
#define PEN_UP 0x00000000
|
||||
static int32 plot_pen = PEN_UP; /* current pen position */
|
||||
static int32 plot_pen = PEN_UP; /* current pen position. This duplicates the device flag PLOT_PEN. Makes the show dev plot command nicer. */
|
||||
|
||||
static int black_pen; /* holds color black */
|
||||
static int blue_pen; /* holds color blue */
|
||||
|
@ -116,8 +165,10 @@ static int grey_pen; /* holds grey */
|
|||
static int white_background; /* holds white of paper roll */
|
||||
static int plot_pwidth; /* set and display variable */
|
||||
static int plot_pcolor; /* set and display variable */
|
||||
static int need_update = 0; /* flag to force and update_pen() */
|
||||
static gdImagePtr image; /* pointer to our canvas */
|
||||
static int need_update = FALSE; /* flag to force and update_pen() */
|
||||
static int plot_used = FALSE; /* flag set to true if anything was actually plotted between attach and detach */
|
||||
static int delete_if_unused = FALSE; /* if TRUE and no plotter activity was seen, delete file on detach. This flag is set by -w option on attach command. */
|
||||
static gdImagePtr image = NULL; /* pointer to our canvas */
|
||||
|
||||
#define UNIT_V_COLOR (UNIT_V_UF + 0) /* color of selected pen - 3 bits */
|
||||
#define UNIT_V_WIDTH (UNIT_V_UF + 3) /* width of pen - two bits */
|
||||
|
@ -140,8 +191,8 @@ static gdImagePtr image; /* pointer to our canvas */
|
|||
#define PEN_LTGREY (6u << UNIT_V_COLOR)
|
||||
#define PEN_GREY (7u << UNIT_V_COLOR)
|
||||
|
||||
#define SET_COLOR(op) {plot_unit[0].flags &= ~UNIT_COLOR; plot_unit[0].flags |= (op);}
|
||||
#define GET_COLOR (plot_unit[0].flags & UNIT_COLOR)
|
||||
#define SET_COLOR(op) (plot_unit[0].flags = (plot_unit[0].flags & ~UNIT_COLOR) | (op))
|
||||
#define GET_COLOR (plot_unit[0].flags & UNIT_COLOR)
|
||||
|
||||
#define BLACK 0,0,0
|
||||
#define BLUE 0,0,255
|
||||
|
@ -159,7 +210,7 @@ static gdImagePtr image; /* pointer to our canvas */
|
|||
#define PEN_QUAD (3u << UNIT_V_WIDTH)
|
||||
|
||||
#define GET_WIDTH() (plot_unit[0].flags & UNIT_WIDTH)
|
||||
#define SET_WIDTH(cd) {plot_unit[0].flags &= ~UNIT_WIDTH; un.flags |= (cd);}
|
||||
#define SET_WIDTH(cd) (plot_unit[0].flags = (plot_unit[0].flags & ~UNIT_WIDTH) | (cd))
|
||||
|
||||
UNIT plot_unit[] = {
|
||||
{ UDATA (&plot_svc, UNIT_ATTABLE, 0) },
|
||||
|
@ -167,10 +218,10 @@ UNIT plot_unit[] = {
|
|||
|
||||
REG plot_reg[] = {
|
||||
{ HRDATA (DSW, plot_dsw, 16) }, /* device status word */
|
||||
{ DRDATA (WTIME, plot_wait, 24), PV_LEFT }, /* plotter movement wait */
|
||||
{ DRDATA (WTIME, plot_wait, 24), PV_LEFT }, /* plotter movement wait */
|
||||
{ DRDATA (Xpos, plot_xpos, 32), PV_LEFT }, /* Current X Position*/
|
||||
{ DRDATA (Ypos, plot_ypos, 32), PV_LEFT }, /* Current Y Position*/
|
||||
{ FLDATA (PenDown, plot_pen, 0)}, /* Current pen position - 1 = down */
|
||||
{ FLDATA (PenDown, plot_pen, 0)}, /* Current pen position: 1 = down */
|
||||
{ DRDATA (PaperSize, plot_xmax, 32), PV_LEFT }, /* Length of paper in inches */
|
||||
{ NULL } };
|
||||
|
||||
|
@ -211,9 +262,10 @@ DEVICE plot_dev = {
|
|||
|
||||
/* xio_1627_plotter - XIO command interpreter for the 1627 plotter model 1 */
|
||||
|
||||
void xio_1627_plotter (iocc_addr, iocc_func, iocc_mod)
|
||||
void xio_1627_plotter (int32 iocc_addr, int32 iocc_func, int32 iocc_mod)
|
||||
{
|
||||
char msg[80];
|
||||
int16 v;
|
||||
|
||||
if (! IS_ONLINE(plot_unit) ) {
|
||||
SETBIT(plot_dsw, PLOT1627_DSW_NOT_READY); /* set not ready */
|
||||
|
@ -246,7 +298,44 @@ void xio_1627_plotter (iocc_addr, iocc_func, iocc_mod)
|
|||
break;
|
||||
|
||||
case XIO_CONTROL: /* control XIO */
|
||||
xio_error("Control XIO not supported by 1627 plotter");
|
||||
// xio_error("Control XIO not supported by 1627 plotter");
|
||||
// Well, not on a real 1130. But on our simulator, let's use XIO_CONTROL to
|
||||
// allow programmatic control of the pen. Nifty, eh?
|
||||
//
|
||||
// Functions: XIO_CONTROL 0 clr - sets pen color (0=black, 1=red, 2=blue, 3=green, 4=yellow, 5=purple, 6=ltgrey, 7=grey)
|
||||
// XIO_CONTRLL 1 wid - sets pen width (1..4)
|
||||
// XIO_CONTROL 2 xpos - sets pen xpos
|
||||
// XIO_CONTROL 3 ypos - sets pen ypos
|
||||
|
||||
v = (int16) iocc_addr; /* get signed 16 bit value passed in addr arg */
|
||||
switch (iocc_mod) {
|
||||
case 0: /* set pen color */
|
||||
if (BETWEEN(v,0,7)) {
|
||||
SET_COLOR(v << UNIT_V_COLOR);
|
||||
update_pen();
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: /* set pen width 1..4*/
|
||||
if (BETWEEN(v,1,4)) {
|
||||
SET_WIDTH((v-1) << UNIT_V_WIDTH);
|
||||
update_pen();
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* set xpos. (Programmatic xpos and ypos are probably not that valuable) */
|
||||
plot_xpos = v; /* Note that it's possible to move the pen way off the paper */
|
||||
break;
|
||||
|
||||
case 3: /* set ypos. Clip to valid range! */
|
||||
if (v <= 0)
|
||||
plot_ypos = 0;
|
||||
else if (v > plot_ymax)
|
||||
plot_ypos = plot_ymax;
|
||||
else
|
||||
plot_ypos = v;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -274,8 +363,14 @@ static t_stat plot_svc (UNIT *uptr)
|
|||
|
||||
static t_stat plot_reset (DEVICE *dptr)
|
||||
{
|
||||
char * buf;
|
||||
int32 size;
|
||||
#ifdef NONDLL
|
||||
static int show_notice = FALSE;
|
||||
|
||||
if (show_notice && ! cgi) {
|
||||
printf("Plotter support included. Please see www.libgd.org for libgd copyright information.\n");
|
||||
show_notice = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
sim_cancel(plot_unit);
|
||||
|
||||
|
@ -296,18 +391,13 @@ static t_stat plot_attach (UNIT *uptr, char *cptr)
|
|||
{
|
||||
t_stat result;
|
||||
|
||||
CLRBIT(uptr->flags, UNIT_DEBUG);
|
||||
SETBIT(plot_dsw, PLOT1627_DSW_NOT_READY); /* assume failure */
|
||||
|
||||
CLRBIT(uptr->flags, UNIT_DEBUG);
|
||||
if (sim_switches & SWMASK('D')) SETBIT(uptr->flags, UNIT_DEBUG);
|
||||
|
||||
/* get the output file by using regular attach routine */
|
||||
result = attach_unit(uptr, cptr);
|
||||
|
||||
if (result != SCPE_OK) {
|
||||
if (IS_DEBUG) printf("problem attaching file\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
SETBIT(plot_dsw, PLOT1627_DSW_NOT_READY); /* assume failure */
|
||||
if (cptr == NULL || ! *cptr) /* filename must be passed */
|
||||
return SCPE_ARG;
|
||||
|
||||
/* set up our canvas at the desired size */
|
||||
image = gdImageCreate(plot_ymax+1,plot_xmax+1); /* create our canvas */
|
||||
|
@ -316,7 +406,21 @@ static t_stat plot_attach (UNIT *uptr, char *cptr)
|
|||
return SCPE_MEM;
|
||||
}
|
||||
|
||||
delete_if_unused = (sim_switches & SWMASK('W')) != 0;
|
||||
|
||||
remove(cptr); /* delete file if it already exists. Otherwise, attach_unit() would open r+w */
|
||||
/* get the output file by using regular attach routine */
|
||||
result = attach_unit(uptr, cptr);
|
||||
|
||||
if (result != SCPE_OK) {
|
||||
if (IS_DEBUG) printf("problem attaching file\n");
|
||||
gdImageDestroy(image); /* free up the canvas memory */
|
||||
image = NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* set up the basic colors after image created */
|
||||
/* (by the way, these calls don't allocate any memory in or out of the image buffer. They just populate its "colors-used" table */
|
||||
white_background = gdImageColorAllocate(image,WHITE); /* white is background */
|
||||
black_pen = gdImageColorAllocate(image,BLACK); /* load up black color */
|
||||
blue_pen = gdImageColorAllocate(image,BLUE); /* load up blue color */
|
||||
|
@ -336,19 +440,22 @@ static t_stat plot_attach (UNIT *uptr, char *cptr)
|
|||
|
||||
CLRBIT(plot_dsw, PLOT1627_DSW_NOT_READY); /* we're in business */
|
||||
|
||||
update_pen(); /* routine to ensure pen is okay */
|
||||
plot_pen = PEN_UP;
|
||||
CLRBIT(plot_unit->flags, UNIT_PEN);
|
||||
|
||||
update_pen(); /* routine to ensure pen is okay */
|
||||
plot_used = FALSE; /* plotter page is blank */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* pen updating routine, called at attach and whenever we reset the values */
|
||||
|
||||
void update_pen (void)
|
||||
static void update_pen (void)
|
||||
{
|
||||
int color;
|
||||
int width;
|
||||
|
||||
if (!IS_ONLINE(plot_unit)) return; /* only do this if attached */
|
||||
if (! IS_ONLINE(plot_unit)) return; /* only do this if attached */
|
||||
|
||||
/* pick up latest color as active pen */
|
||||
color = GET_COLOR;
|
||||
|
@ -430,39 +537,69 @@ void update_pen (void)
|
|||
}
|
||||
|
||||
/* plot_detach - detach file from simulated plotter */
|
||||
|
||||
static t_stat plot_detach (UNIT *uptr)
|
||||
{
|
||||
char * buf;
|
||||
int32 size;
|
||||
char * buf, * fname;
|
||||
int32 size, result, saveit;
|
||||
FILE * fp;
|
||||
int32 result;
|
||||
t_stat rval = SCPE_OK; /* return value */
|
||||
|
||||
SETBIT(plot_dsw, PLOT1627_DSW_NOT_READY);
|
||||
|
||||
/* copy images to files, close files, set device to detached, free gd memory */
|
||||
if (! (uptr->flags & UNIT_ATT)) /* not currently attached; don't proceed */
|
||||
return SCPE_OK;
|
||||
|
||||
buf = gdImageGifPtr(image,&size);
|
||||
if (! buf) {
|
||||
if (IS_DEBUG) printf("failure creating GIF in-memory\n");
|
||||
return SCPE_MEM;
|
||||
/* if -w flag was passed on attach: save file if there was plotter activity, otherwise delete it */
|
||||
/* if -w flag was not passed on attached, always save the file */
|
||||
saveit = (plot_used || ! delete_if_unused) && (image != NULL);
|
||||
|
||||
if (saveit) { /* copy images to files, close files, set device to detached, free gd memory */
|
||||
if ((buf = gdImageGifPtr(image,&size)) == NULL) {
|
||||
if (IS_DEBUG) printf("failure creating GIF in-memory\n");
|
||||
return SCPE_MEM;
|
||||
}
|
||||
|
||||
fp = uptr->fileref; /* get file attached to unit */
|
||||
|
||||
if (fseek(fp,0,SEEK_SET) == 0) { /* first we reset to begin of file */
|
||||
if (IS_DEBUG) printf("wrote out GIF to file\n");
|
||||
result = fwrite(buf,1,size,fp); /* write out our image to the file */
|
||||
}
|
||||
else
|
||||
result = 0; /* make it look like the write failed so we return error status */
|
||||
|
||||
gdFree(buf); /* free up the memory of GIF format */
|
||||
}
|
||||
else { /* make a copy of the filename so we can delete it after detach */
|
||||
if ((fname = malloc(strlen(uptr->filename)+1)) != NULL)
|
||||
strcpy(fname, uptr->filename);
|
||||
}
|
||||
|
||||
if (image != NULL) {
|
||||
gdImageDestroy(image); /* free up the canvas memory */
|
||||
image = NULL;
|
||||
}
|
||||
|
||||
rval = detach_unit(uptr); /* have simh close the file */
|
||||
|
||||
if (saveit) { /* if we wrote the file, check that write was OK */
|
||||
if (result != size) { /* report error writing file */
|
||||
if (IS_DEBUG) printf("error in write of image file\n");
|
||||
rval = SCPE_IOERR;
|
||||
}
|
||||
}
|
||||
else { /* if we did not write the file, delete the file */
|
||||
if (fname == NULL) {
|
||||
rval = SCPE_MEM; /* we previously failed to allocate a copy of the filename (this will never happen) */
|
||||
}
|
||||
else {
|
||||
remove(fname); /* remove the file and free the copy of the filename */
|
||||
free(fname);
|
||||
}
|
||||
}
|
||||
|
||||
fp = uptr->fileref; /* get file attached to unit */
|
||||
|
||||
if (! fseek(fp,0,SEEK_SET)) { /* first we reset to begin of file */
|
||||
if (IS_DEBUG) printf("wrote out GIF to file\n");
|
||||
result = fwrite(buf,1,size,fp); /* write out our image to the file */
|
||||
}
|
||||
|
||||
gdFree(buf); /* free up the memory of GIF format */
|
||||
gdImageDestroy(image); /* free up the canvas memory */
|
||||
|
||||
if (result != size) { /* some problem writing it */
|
||||
if (IS_DEBUG) printf("error in write of image file\n");
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
return detach_unit(uptr); /* have simh close the file */
|
||||
return rval;
|
||||
}
|
||||
|
||||
/* process_cmd - implement the drawing actions of the plotter */
|
||||
|
@ -474,7 +611,7 @@ static void process_cmd (void)
|
|||
/* first see if we set any changes to pen or position, do an update */
|
||||
if (need_update) {
|
||||
update_pen();
|
||||
need_update = 0;
|
||||
need_update = FALSE;
|
||||
}
|
||||
|
||||
/* will move pen one step or flip pen up or down */
|
||||
|
@ -484,49 +621,49 @@ static void process_cmd (void)
|
|||
switch (plot_cmd) {
|
||||
case 1: /* raise pen command */
|
||||
plot_pen = PEN_UP;
|
||||
plot_unit->flags = plot_unit->flags & (~UNIT_PEN);
|
||||
CLRBIT(plot_unit->flags, UNIT_PEN);
|
||||
return;
|
||||
break;
|
||||
|
||||
case 2: /* +Y command */
|
||||
plot_ypos = plot_ypos + 1;
|
||||
++plot_ypos;
|
||||
break;
|
||||
|
||||
case 4: /* -Y command */
|
||||
plot_ypos = plot_ypos - 1;
|
||||
--plot_ypos;
|
||||
break;
|
||||
|
||||
case 8: /* -X command */
|
||||
plot_xpos = plot_xpos - 1;
|
||||
--plot_xpos;
|
||||
break;
|
||||
|
||||
case 10: /* -X +Y command */
|
||||
plot_xpos = plot_xpos - 1;
|
||||
plot_ypos = plot_ypos + 1;
|
||||
--plot_xpos;
|
||||
++plot_ypos;
|
||||
break;
|
||||
|
||||
case 12: /* -X -Y command */
|
||||
plot_xpos = plot_xpos - 1;
|
||||
plot_ypos = plot_ypos - 1;
|
||||
--plot_xpos;
|
||||
--plot_ypos;
|
||||
break;
|
||||
|
||||
case 16: /* +X command */
|
||||
plot_xpos = plot_xpos + 1;
|
||||
++plot_xpos;
|
||||
break;
|
||||
|
||||
case 18: /* +X +Y command */
|
||||
plot_xpos = plot_xpos + 1;
|
||||
plot_ypos = plot_ypos + 1;
|
||||
++plot_xpos;
|
||||
++plot_ypos;
|
||||
break;
|
||||
|
||||
case 20: /* +X -Y pen command */
|
||||
plot_xpos = plot_xpos + 1;
|
||||
plot_ypos = plot_ypos - 1;
|
||||
++plot_xpos;
|
||||
--plot_ypos;
|
||||
break;
|
||||
|
||||
case 32: /* lower pen command */
|
||||
plot_pen = PEN_DOWN;
|
||||
plot_unit->flags = plot_unit->flags | UNIT_PEN;
|
||||
SETBIT(plot_unit->flags, UNIT_PEN);
|
||||
return;
|
||||
break;
|
||||
|
||||
|
@ -536,19 +673,36 @@ static void process_cmd (void)
|
|||
break;
|
||||
}
|
||||
|
||||
/* check to see if carriage has moved off any edge */
|
||||
if ((plot_xpos > (plot_xmax+1)) || (plot_ypos > (plot_ymax+1)) ||
|
||||
(plot_xpos < 0) || (plot_ypos < 0)) {
|
||||
/* On the real plotter, y motions were physically restricted at the ends of travel.
|
||||
* We simulate this by clipping the plot_ypos value. Three +y movements at the right
|
||||
* end of travel followed by three -y movements will back up 3 positions, just as it would have on
|
||||
* the physical plotter. Without clipping, the pen would end up where it started, which
|
||||
* is incorrect. (Hopefully, good 1130 plotting software would never make this happen anyhow!)
|
||||
*/
|
||||
|
||||
if (plot_ypos < 0)
|
||||
plot_ypos = 0;
|
||||
else if (plot_ypos > plot_ymax)
|
||||
plot_ypos = plot_ymax;
|
||||
|
||||
/* We do allow X overtravel though, as the drum simply turned past the end of the paper. Three +x
|
||||
* movements past the end of the paper followed by three -x movements would put the pen back at the
|
||||
* edge of the paper.
|
||||
*/
|
||||
|
||||
if ((plot_xpos < 0) || (plot_xpos > plot_xmax)) {
|
||||
/* if so, ignore as 1627 has no way of signalling error */
|
||||
if (IS_DEBUG) printf(
|
||||
"attempted to move carriage off paper edge %d %d for command %d\n",
|
||||
plot_xpos,plot_ypos,plot_cmd);
|
||||
return;
|
||||
|
||||
return; // no drawing takes place if the pen is off of the paper!
|
||||
}
|
||||
|
||||
/* only draw a line if the pen was down during the movement command */
|
||||
if (plot_pen) {
|
||||
gdImageLine(image, plot_ymax-plot_ypos, plot_xmax-plot_xpos, plot_ymax-oldy, plot_xmax-oldx, gdAntiAliased);
|
||||
gdImageLine(image, plot_ymax-plot_ypos, plot_xmax-plot_xpos, plot_ymax-oldy, plot_xmax-oldx, gdAntiAliased);
|
||||
plot_used = TRUE; /* remember that we drew something */
|
||||
/* semantics are 0,0 point is lower right */
|
||||
}
|
||||
|
||||
|
@ -564,6 +718,11 @@ static t_stat plot_set_length (UNIT *uptr, int32 set, char *ptr, void *desc)
|
|||
|
||||
#define LONGEST_ROLL 1440000 /* longest is 120', 14400", 1,440,000 .01"s */
|
||||
|
||||
if (ptr == NULL) { /* check for missing argument */
|
||||
printf("Command format is: set plot length=nnn\n");
|
||||
return SCPE_ARG;
|
||||
}
|
||||
|
||||
val = strtotv (ptr, &cptr, (uint32) 10); /* sim routine to get value */
|
||||
if ((val < 1) | (val >= LONGEST_ROLL)) { /* check valid range */
|
||||
if (IS_DEBUG) printf("setting paper more than 120' or less than 1 inch\n");
|
||||
|
@ -626,8 +785,9 @@ static t_stat plot_show_nl(FILE *fp, UNIT *uptr, int32 val, void *descrip)
|
|||
|
||||
static t_stat plot_validate_change (UNIT *uptr, int32 set, char *ptr, void *desc)
|
||||
{
|
||||
need_update = 1;
|
||||
need_update = TRUE;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_PLOT_SUPPORT */
|
||||
|
||||
|
|
|
@ -112,6 +112,7 @@ static t_bool formfed = FALSE; /* last line printed was a formfeed */
|
|||
#define UNIT_V_RINGCHECK (UNIT_V_UF + 8)
|
||||
#define UNIT_V_SYNCCHECK (UNIT_V_UF + 9)
|
||||
#define UNIT_V_PHYSICAL_PTR (UNIT_V_UF + 10) /* this appears in ibm1130_gui as well */
|
||||
#define UNIT_V_TRACE (UNIT_V_UF + 11)
|
||||
|
||||
#define UNIT_FORMCHECK (1u << UNIT_V_FORMCHECK)
|
||||
#define UNIT_DATACHECK (1u << UNIT_V_DATACHECK)
|
||||
|
@ -124,6 +125,7 @@ static t_bool formfed = FALSE; /* last line printed was a formfeed */
|
|||
#define UNIT_RINGCHECK (1u << UNIT_V_RINGCHECK)
|
||||
#define UNIT_SYNCCHECK (1u << UNIT_V_SYNCCHECK)
|
||||
#define UNIT_PHYSICAL_PTR (1u << UNIT_V_PHYSICAL_PTR)
|
||||
#define UNIT_TRACE (1u << UNIT_V_TRACE)
|
||||
|
||||
UNIT prt_unit[] = {
|
||||
{ UDATA (&prt_svc, UNIT_ATTABLE, 0) },
|
||||
|
@ -132,6 +134,7 @@ UNIT prt_unit[] = {
|
|||
#define IS_1403(uptr) (uptr->flags & UNIT_1403) /* model test */
|
||||
#define IS_1132(uptr) ((uptr->flags & UNIT_1403) == 0) /* model test */
|
||||
#define IS_PHYSICAL(uptr) (uptr->flags & UNIT_PHYSICAL_PTR)
|
||||
#define DO_TRACE(uptr) (uptr->flags & UNIT_TRACE)
|
||||
|
||||
/* Parameter in the unit descriptor (1132 printer) */
|
||||
|
||||
|
@ -149,8 +152,10 @@ REG prt_reg[] = {
|
|||
{ NULL } };
|
||||
|
||||
MTAB prt_mod[] = {
|
||||
{ UNIT_1403, 0, "1132", "1132", NULL }, /* model option */
|
||||
{ UNIT_1403, UNIT_1403, "1403", "1403", NULL },
|
||||
{ UNIT_1403, 0, "1132", "1132", NULL }, /* model option */
|
||||
{ UNIT_1403, UNIT_1403, "1403", "1403", NULL },
|
||||
{ UNIT_TRACE, UNIT_TRACE, "TRACE", "TRACE", NULL },
|
||||
{ UNIT_TRACE, 0, "NOTRACE", "NOTRACE", NULL },
|
||||
{ 0 } };
|
||||
|
||||
DEVICE prt_dev = {
|
||||
|
@ -348,7 +353,7 @@ static void mytrace (int start, char *what)
|
|||
char *where;
|
||||
|
||||
if ((where = saywhere(prev_IAR)) == NULL) where = "?";
|
||||
trace_io("%s %s at %04x: %s\n", start ? "start" : "stop", what, prev_IAR, where);
|
||||
trace_io("%s %s at %04x: %s", start ? "start" : "stop", what, prev_IAR, where);
|
||||
}
|
||||
|
||||
/* xio_1132_printer - XIO command interpreter for the 1132 printer */
|
||||
|
@ -372,32 +377,33 @@ void xio_1132_printer (int32 iocc_addr, int32 func, int32 modify)
|
|||
CLRBIT(PRT_DSW, PRT1132_DSW_READ_EMITTER_RESPONSE | PRT1132_DSW_SKIP_RESPONSE | PRT1132_DSW_SPACE_RESPONSE);
|
||||
CLRBIT(ILSW[1], ILSW_1_1132_PRINTER);
|
||||
}
|
||||
trace_io("* Printer DSW %04x mod %x", ACC, modify);
|
||||
break;
|
||||
|
||||
case XIO_CONTROL:
|
||||
if (modify & PRT_CMD_START_PRINTER) {
|
||||
SETBIT(uptr->flags, UNIT_PRINTING);
|
||||
/* mytrace(1, "printing"); */
|
||||
if (DO_TRACE(uptr)) mytrace(1, "printing");
|
||||
}
|
||||
|
||||
if (modify & PRT_CMD_STOP_PRINTER) {
|
||||
CLRBIT(uptr->flags, UNIT_PRINTING);
|
||||
/* mytrace(0, "printing"); */
|
||||
if (DO_TRACE(uptr)) mytrace(0, "printing");
|
||||
}
|
||||
|
||||
if (modify & PRT_CMD_START_CARRIAGE) {
|
||||
SETBIT(uptr->flags, UNIT_SKIPPING);
|
||||
/* mytrace(1, "skipping"); */
|
||||
if (DO_TRACE(uptr)) mytrace(1, "skipping");
|
||||
}
|
||||
|
||||
if (modify & PRT_CMD_STOP_CARRIAGE) {
|
||||
CLRBIT(uptr->flags, UNIT_SKIPPING);
|
||||
/* mytrace(0, "skipping"); */
|
||||
if (DO_TRACE(uptr)) mytrace(0, "skipping");
|
||||
}
|
||||
|
||||
if (modify & PRT_CMD_SPACE) {
|
||||
SETBIT(uptr->flags, UNIT_SPACING);
|
||||
/* mytrace(1, "space"); */
|
||||
if (DO_TRACE(uptr)) mytrace(1, "space");
|
||||
}
|
||||
|
||||
sim_cancel(uptr);
|
||||
|
@ -437,6 +443,7 @@ static t_stat prt_svc (UNIT *uptr)
|
|||
static t_stat prt1132_svc (UNIT *uptr)
|
||||
{
|
||||
if (PRT_DSW & PRT1132_DSW_NOT_READY) { /* cancel operation if printer went offline */
|
||||
if (DO_TRACE(uptr)) trace_io("1132 form check");
|
||||
SETBIT(uptr->flags, UNIT_FORMCHECK);
|
||||
SET_ACTION(uptr, 0);
|
||||
forms_check(TRUE); /* and turn on forms check lamp */
|
||||
|
@ -467,9 +474,15 @@ static t_stat prt1132_svc (UNIT *uptr)
|
|||
|
||||
if (uptr->flags & UNIT_PRINTING) {
|
||||
if (! save_1132_prt_line(codewheel1132[prt_nchar].ascii)) { /* save previous printed line */
|
||||
trace_io("* Print check -- buffer not set in time");
|
||||
SETBIT(uptr->flags, UNIT_DATACHECK); /* buffer wasn't set in time */
|
||||
SET_ACTION(uptr, 0);
|
||||
print_check(TRUE); /* and turn on forms check lamp */
|
||||
|
||||
/* if (running)
|
||||
reason = STOP_IMMEDIATE; // halt on check
|
||||
*/
|
||||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -583,6 +596,7 @@ static t_stat prt1403_svc(UNIT *uptr)
|
|||
{
|
||||
if (PRT_DSW & PRT1403_DSW_NOT_READY) { /* cancel operation if printer went offline */
|
||||
SET_ACTION(uptr, 0);
|
||||
if (DO_TRACE(uptr)) trace_io("1403 form check");
|
||||
forms_check(TRUE); /* and turn on forms check lamp */
|
||||
}
|
||||
else if (uptr->flags & UNIT_TRANSFERRING) { /* end of transfer */
|
||||
|
@ -635,7 +649,7 @@ static t_stat prt1403_svc(UNIT *uptr)
|
|||
|
||||
/* delete_cmd - SCP command to delete a file */
|
||||
|
||||
static t_stat delete_cmd (int32 flag, char *cptr)
|
||||
static t_stat delete_cmd (int flag, char *cptr)
|
||||
{
|
||||
char gbuf[CBUFSIZE];
|
||||
int status;
|
||||
|
|
|
@ -363,7 +363,7 @@ static t_stat tti_svc (UNIT *uptr)
|
|||
if ((tti_unit.flags & CSET_MASK) == CSET_ASCII)
|
||||
temp = conin_map[temp] & 0xFF; /* perform input translation */
|
||||
|
||||
if (temp == IRQ_KEY) { /* INT REQ (interrupt request) key */
|
||||
if (temp == IRQ_KEY) { /* INT REQ (interrupt request) key -- process this even if no keyboard input request pending */
|
||||
SETBIT(tti_dsw, TT_DSW_INTERRUPT_REQUEST); /* queue interrupt */
|
||||
SETBIT(ILSW[4], ILSW_4_CONSOLE);
|
||||
calc_ints();
|
||||
|
@ -388,16 +388,17 @@ static t_stat tti_svc (UNIT *uptr)
|
|||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
// keyboard is locked or no active input request?
|
||||
if ((tti_unit.flags & KEYBOARD_LOCKED) || ! (tti_dsw & TT_DSW_KEYBOARD_BUSY)) {
|
||||
SendBeep();
|
||||
calc_ints();
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
if ((tti_unit.flags & CSET_MASK) == CSET_ASCII)
|
||||
temp = ascii_to_conin[temp];
|
||||
|
||||
if (temp == 0) { /* ignore invalid characters */
|
||||
if (temp == 0) { /* ignore invalid characters (no mapping to 1130 input code) */
|
||||
SendBeep();
|
||||
calc_ints();
|
||||
return SCPE_OK;
|
||||
|
|
|
@ -35,6 +35,7 @@ extern DEVICE gdu_dev, console_dev, plot_dev;
|
|||
extern UNIT cpu_unit;
|
||||
extern REG cpu_reg[];
|
||||
extern int32 saved_PC;
|
||||
extern t_bool is_1800;
|
||||
|
||||
/* SCP data structures and interface routines
|
||||
|
||||
|
@ -290,12 +291,10 @@ static int ebcdic_to_ascii (int ch)
|
|||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw)
|
||||
{
|
||||
int32 cflag, ch, OP, F, TAG, INDIR, DSPLC, IR, eaddr;
|
||||
int32 ch, OP, F, TAG, INDIR, DSPLC, IR, eaddr;
|
||||
char *mnem, tst[12];
|
||||
|
||||
cflag = (uptr == NULL) || (uptr == &cpu_unit);
|
||||
|
||||
/* if (sw & SWMASK ('A')) { // ASCII? not useful
|
||||
/* if (sw & SWMASK ('A')) { // ASCII? not useful
|
||||
fprintf (of, (c1 < 040)? "<%03o>": "%c", c1);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -348,6 +347,13 @@ t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw)
|
|||
}
|
||||
|
||||
mnem = opcode[OP]; /* get mnemonic */
|
||||
if (is_1800) { /* these two are defined on the 1800 but undefined on the 1130 */
|
||||
if (OP == 0x16)
|
||||
mnem = "CMP ";
|
||||
else if (OP == 0x17)
|
||||
mnem = "DCMP";
|
||||
}
|
||||
|
||||
if (OP == 0x02) { /* left shifts are special */
|
||||
mnem = lsopcode[(DSPLC >> 6) & 0x0003];
|
||||
DSPLC &= 0x003F;
|
||||
|
@ -459,7 +465,7 @@ int strnicmp (const char *a, const char *b, size_t n)
|
|||
{
|
||||
int ca, cb;
|
||||
|
||||
if (n == 0) return 0; /* zero length compare is equal */
|
||||
if (n == 0) return 0; /* zero length compare is equal */
|
||||
|
||||
for (;;) {
|
||||
if ((ca = *a) == 0) /* get character, stop on null terminator */
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
//
|
||||
#define IDB_CONSOLE 101
|
||||
#define IDC_MYHAND 102
|
||||
#define IDI_ICON1 103
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
# (This makefile is for operating systems other than Windows,
|
||||
# or compilers other than Microsoft's. For MS builds, use the
|
||||
# .mak files found in this directory and the utils directory).
|
||||
#
|
||||
# If you are building the emulator and utilities as part of
|
||||
# the SIMH package, please:
|
||||
#
|
||||
# Be sure that you there are NO copies of scp.c, scp_tty.c,
|
||||
# sim_sock.c, sim_tmxr.c, sim_rev.h, sim_defs.h, sim_sock.h and
|
||||
# sim_tmxr.h in the ibm1130 subdirectory. Delete them if there
|
||||
# are.
|
||||
#
|
||||
# Do not use this makefile with "make all" or "make ibm1130".
|
||||
# Use the SIMH build files instead.
|
||||
#
|
||||
# If and when you download updates for this simulator from
|
||||
# www.ibm1130.org, get ibm1130code.zip and ibm1130software.zip
|
||||
# separately.
|
||||
#
|
||||
# If you have downloaded the emulator independently of SIMH (e.g, from
|
||||
# www.ibm1130.org), please:
|
||||
#
|
||||
# Be sure that you DO have copies of scp.c, scp_tty.c, sim_sock.c,
|
||||
# sim_tmxr.c, sim_rev.h, sim_defs.h, sim_sock.h and sim_tmxr.h
|
||||
# in this folder.
|
||||
#
|
||||
# Use this file to make the emulator.
|
||||
#
|
||||
# If and when you download updates for this simulator from
|
||||
# www.ibm1130.org, get ibm1130.zip. When you expand it,
|
||||
# also expand ibm1130sofware.zip, which is inside.
|
||||
#
|
||||
# In either case, if you want to build DMS or work with assembly
|
||||
# language programs outside of DMS, you'll want to make the utilities
|
||||
# by cd'ing to the utils directory and running make there.
|
||||
|
||||
# CC Command
|
||||
#
|
||||
# Note: -O2 is sometimes broken in GCC when setjump/longjump is being
|
||||
# used. Try -O2 only with released simulators.
|
||||
#
|
||||
CC = gcc -O0 -lm -I .
|
||||
#CC = gcc -O2 -g -lm -I .
|
||||
|
||||
|
||||
#
|
||||
# Common Libraries
|
||||
#
|
||||
BIN =
|
||||
SIM = scp.c sim_console.c sim_fio.c sim_sock.c sim_timer.c sim_tmxr.c scp_tty.c
|
||||
SIM_INC = scp.h sim_console.h sim_defs.h sim_fio.h sim_rev.h sim_sock.h sim_timer.h sim_tmxr.h
|
||||
|
||||
#
|
||||
# Emulator source files and compile time options
|
||||
#
|
||||
|
||||
ibm1130D = ./
|
||||
ibm1130 = ${ibm1130D}ibm1130_sys.c ${ibm1130D}ibm1130_cpu.c \
|
||||
${ibm1130D}ibm1130_cr.c ${ibm1130D}ibm1130_disk.c \
|
||||
${ibm1130D}ibm1130_stddev.c ${ibm1130D}ibm1130_gdu.c \
|
||||
${ibm1130D}ibm1130_gui.c ${ibm1130D}ibm1130_prt.c \
|
||||
${ibm1130D}ibm1130_ptrp.c ${ibm1130D}ibm1130_fmt.c
|
||||
|
||||
ibm1130_INC = ibm1130res.h ibm1130_conin.h ibm1130_conout.h \
|
||||
ibm1130_defs.h ibm1130_prtwheel.h ibm1130_fmt.h \
|
||||
dmsr2v12phases.h dmsr2v12slet.h
|
||||
|
||||
#
|
||||
# Build the emulator
|
||||
#
|
||||
|
||||
${BIN}ibm1130 : ${ibm1130} ${SIM} ${ibm1130_INC} ${SIM_INC}
|
||||
${CC} ${ibm1130} ${SIM} -o $@
|
||||
|
|
@ -1,5 +1,13 @@
|
|||
Here's the 1130 simulator as it stands now.
|
||||
|
||||
Status: 25Oct2012
|
||||
|
||||
* Added plotter and 2250 GDU support (though, we don't
|
||||
have the 2250 support library)
|
||||
|
||||
* Numerous fixes, especially the error in compiling
|
||||
the FORTRAN sqrt() function under extended precision.
|
||||
|
||||
Status: 22Jul2003
|
||||
|
||||
* Added support for APL\1130 output translations
|
||||
|
|
|
@ -241,6 +241,7 @@ TMXR dz_desc = { DZ_MUXES * DZ_LINES, 0, 0, NULL }; /* mux descriptor */
|
|||
#define DBG_INT 0x0002 /* display transfer requests */
|
||||
#define DBG_XMT TMXR_DBG_XMT /* display Transmitted Data */
|
||||
#define DBG_RCV TMXR_DBG_RCV /* display Received Data */
|
||||
#define DBG_MDM TMXR_DBG_MDM /* display Modem Signals */
|
||||
#define DBG_TRC TMXR_DBG_TRC /* display trace routine calls */
|
||||
#define DBG_ASY TMXR_DBG_ASY /* display Asynchronous Activities */
|
||||
|
||||
|
@ -249,12 +250,12 @@ DEBTAB dz_debug[] = {
|
|||
{"INT", DBG_INT},
|
||||
{"XMT", DBG_XMT},
|
||||
{"RCV", DBG_RCV},
|
||||
{"MDM", DBG_MDM},
|
||||
{"TRC", DBG_TRC},
|
||||
{"ASY", DBG_ASY},
|
||||
{0}
|
||||
};
|
||||
|
||||
DEVICE dz_dev;
|
||||
t_stat dz_rd (int32 *data, int32 PA, int32 access);
|
||||
t_stat dz_wr (int32 data, int32 PA, int32 access);
|
||||
int32 dz_rxinta (void);
|
||||
|
@ -366,6 +367,7 @@ static char *dz_wr_regs[] =
|
|||
t_stat dz_rd (int32 *data, int32 PA, int32 access)
|
||||
{
|
||||
int i;
|
||||
static BITFIELD* bitdefs[] = {dz_csr_bits, dz_rbuf_bits, dz_tcr_bits, dz_msr_bits};
|
||||
int32 dz = ((PA - dz_dib.ba) >> 3) & DZ_MNOMASK; /* get mux num */
|
||||
|
||||
switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
||||
|
@ -405,14 +407,16 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
|||
tmxr_set_get_modem_bits (lp, 0, 0, &modem_bits);
|
||||
|
||||
dz_msr[dz] &= ~((1 << (MSR_V_RI + i)) | (1 << (MSR_V_CD + i)));
|
||||
dz_msr[dz] |= ((modem_bits&TMXR_MDM_RNG) ? (1 << (MSR_V_RI + i)) : 0) |
|
||||
((modem_bits&TMXR_MDM_DCD) ? (1 << (MSR_V_CD + i)) : 0);
|
||||
dz_msr[dz] |= (dz_tcr[dz] & (1 << (i + TCR_V_DTR))) ?
|
||||
((modem_bits&TMXR_MDM_DCD) ? (1 << (MSR_V_CD + i)) : 0) :
|
||||
((modem_bits&TMXR_MDM_RNG) ? (1 << (MSR_V_RI + i)) : 0);
|
||||
}
|
||||
*data = dz_msr[dz];
|
||||
break;
|
||||
}
|
||||
|
||||
sim_debug(DBG_REG, &dz_dev, "dz_rd(PA=0x%08X [%s], access=%d, data=0x%X)\n", PA, dz_rd_regs[(PA >> 1) & 03], access, *data);
|
||||
sim_debug(DBG_REG, &dz_dev, "dz_rd(PA=0x%08X [%s], access=%d, data=0x%X) ", PA, dz_rd_regs[(PA >> 1) & 03], access, *data);
|
||||
sim_debug_bits(DBG_REG, &dz_dev, bitdefs[(PA >> 1) & 03], (uint32)(*data), (uint32)(*data), TRUE);
|
||||
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -420,18 +424,21 @@ return SCPE_OK;
|
|||
t_stat dz_wr (int32 data, int32 PA, int32 access)
|
||||
{
|
||||
int32 dz = ((PA - dz_dib.ba) >> 3) & DZ_MNOMASK; /* get mux num */
|
||||
static BITFIELD* bitdefs[] = {dz_csr_bits, dz_lpr_bits, dz_tcr_bits, dz_tdr_bits};
|
||||
int32 i, c, line;
|
||||
char lineconfig[16];
|
||||
TMLN *lp;
|
||||
|
||||
sim_debug(DBG_REG, &dz_dev, "dz_wr(PA=0x%08X [%s], access=%d, data=0x%X)\n", PA, dz_wr_regs[(PA >> 1) & 03], access, data);
|
||||
sim_debug(DBG_REG, &dz_dev, "dz_wr(PA=0x%08X [%s], access=%d, data=0x%X) ", PA, dz_wr_regs[(PA >> 1) & 03], access, data);
|
||||
sim_debug_bits(DBG_REG, &dz_dev, bitdefs[(PA >> 1) & 03], (uint32)((PA & 1) ? data<<8 : data), (uint32)((PA & 1) ? data<<8 : data), TRUE);
|
||||
|
||||
switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
||||
|
||||
case 00: /* CSR */
|
||||
if (access == WRITEB) data = (PA & 1)? /* byte? merge */
|
||||
(dz_csr[dz] & 0377) | (data << 8):
|
||||
(dz_csr[dz] & ~0377) | data;
|
||||
if (access == WRITEB)
|
||||
data = (PA & 1)? /* byte? merge */
|
||||
(dz_csr[dz] & 0377) | (data << 8):
|
||||
(dz_csr[dz] & ~0377) | data;
|
||||
if (data & CSR_CLR) /* clr? reset */
|
||||
dz_clear (dz, FALSE);
|
||||
if (data & CSR_MSE) /* MSE? start poll */
|
||||
|
@ -467,10 +474,12 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
|||
break;
|
||||
|
||||
case 02: /* TCR */
|
||||
if (access == WRITEB) data = (PA & 1)? /* byte? merge */
|
||||
(dz_tcr[dz] & 0377) | (data << 8):
|
||||
(dz_tcr[dz] & ~0377) | data;
|
||||
if (dz_mctl) { /* modem ctl? */
|
||||
if (access == WRITEB)
|
||||
data = (PA & 1)? /* byte? merge */
|
||||
(dz_tcr[dz] & 0377) | (data << 8):
|
||||
(dz_tcr[dz] & ~0377) | data;
|
||||
if (dz_mctl &&
|
||||
((access != WRITEB) || (PA & 1))) { /* modem ctl (DTR)? */
|
||||
int32 changed = data ^ dz_tcr[dz];
|
||||
|
||||
for (i = 0; i < DZ_LINES; i++) {
|
||||
|
@ -478,10 +487,10 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
|||
continue; /* line unchanged skip */
|
||||
line = (dz * DZ_LINES) + i; /* get line num */
|
||||
lp = &dz_ldsc[line]; /* get line desc */
|
||||
if (data & (1 << (TCR_V_DTR + i))) {
|
||||
if (data & (1 << (TCR_V_DTR + i))) { /* just asserted, so turn on */
|
||||
tmxr_set_get_modem_bits (lp, TMXR_MDM_DTR|TMXR_MDM_RTS, 0, NULL);
|
||||
}
|
||||
else
|
||||
else /* just deasserted, so turn off */
|
||||
if (dz_auto)
|
||||
tmxr_set_get_modem_bits (lp, 0, TMXR_MDM_DTR|TMXR_MDM_RTS, NULL);
|
||||
}
|
||||
|
@ -641,6 +650,7 @@ void dz_set_rxint (int32 dz)
|
|||
{
|
||||
dz_rxi = dz_rxi | (1 << dz); /* set mux rcv int */
|
||||
SET_INT (DZRX); /* set master intr */
|
||||
sim_debug(DBG_INT, &dz_dev, "dz_set_rxint(dz=%d)\n", dz);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -671,6 +681,7 @@ void dz_set_txint (int32 dz)
|
|||
{
|
||||
dz_txi = dz_txi | (1 << dz); /* set mux xmt int */
|
||||
SET_INT (DZTX); /* set master intr */
|
||||
sim_debug(DBG_INT, &dz_dev, "dz_set_txint(dz=%d)\n", dz);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -740,7 +751,7 @@ t_stat dz_attach (UNIT *uptr, char *cptr)
|
|||
int32 dz, muxln;
|
||||
t_stat r;
|
||||
|
||||
if (sim_switches & SWMASK ('M')) /* modem control? */
|
||||
if ((sim_switches & SWMASK ('M')) || dz_mctl) /* modem control? */
|
||||
tmxr_set_modem_control_passthru (&dz_desc);
|
||||
r = tmxr_attach (&dz_desc, uptr, cptr); /* attach mux */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
|
@ -778,8 +789,11 @@ return SCPE_OK;
|
|||
|
||||
t_stat dz_detach (UNIT *uptr)
|
||||
{
|
||||
t_stat r = tmxr_detach (&dz_desc, uptr);
|
||||
|
||||
dz_mctl = dz_auto = 0; /* modem ctl off */
|
||||
return tmxr_detach (&dz_desc, uptr);
|
||||
tmxr_clear_modem_control_passthru (&dz_desc);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* SET LINES processor */
|
||||
|
@ -804,8 +818,9 @@ if (newln < dz_desc.lines) {
|
|||
for (i = newln; i < dz_desc.lines; i++) {
|
||||
if (dz_ldsc[i].conn) {
|
||||
tmxr_linemsg (&dz_ldsc[i], "\r\nOperator disconnected line\r\n");
|
||||
tmxr_reset_ln (&dz_ldsc[i]); /* reset line */
|
||||
tmxr_send_buffered_data (&dz_ldsc[i]);
|
||||
}
|
||||
tmxr_detach_ln (&dz_ldsc[i]); /* completely reset line */
|
||||
if ((i % DZ_LINES) == (DZ_LINES - 1))
|
||||
dz_clear (i / DZ_LINES, TRUE); /* reset mux */
|
||||
}
|
||||
|
|
|
@ -2718,7 +2718,7 @@ if (cptr) {
|
|||
cap = (uint32) get_uint (cptr, 10, 0xFFFFFFFF, &r);
|
||||
if ((sim_switches & SWMASK ('L')) == 0)
|
||||
cap = cap * 1954;
|
||||
if ((r != SCPE_OK) || (cap < RA8U_MINC) || (cap >= max))
|
||||
if ((r != SCPE_OK) || (cap < RA8U_MINC) || (cap > max))
|
||||
return SCPE_ARG;
|
||||
drv_tab[val].lbn = cap;
|
||||
}
|
||||
|
|
11
README.md
11
README.md
|
@ -14,8 +14,15 @@
|
|||
|
||||
#### Howard Harte has implemented a Lincoln Labs TX-0 simulator.
|
||||
|
||||
#### Updated AltairZ80 simulator from Peter Schorn.
|
||||
|
||||
#### Updated HP2100 simulator from Dave Bryan.
|
||||
|
||||
### New Functionality
|
||||
|
||||
#### Remote Console Facility
|
||||
A new capability has been added which allows a TELNET Connection to a user designated port so that some out of band commands can be entered to manipulate and/or adjust a running simulator. The commands which enable and control this capability are SET REMOTE TELNET=port, SET REMOTE CONNECTIONS=n and SHOW REMOTE.
|
||||
|
||||
#### VAX/PDP11 Enhancements
|
||||
RQ has new disk types: RC25, RCF25, RA80
|
||||
RQ device has a settable controller type (RQDX3, UDA50, KLESI, RUX50)
|
||||
|
@ -151,12 +158,16 @@ Other related changes/extensions:
|
|||
SET NOQUIET Set normal output mode for command execution
|
||||
SET PROMPT Change the prompt used by the simulator (defaulr sim>)
|
||||
SET THROTTLE x/t Throttle t ms every x cycles
|
||||
SET REMOTE TELNET=port Specify remote console telnet port
|
||||
SET REMOTE NOTELNET Disables remote console
|
||||
SET REMOTE CONNECTIONS=n Specify the number of concurrent remote console sessions
|
||||
SHOW FEATURES Displays the devices descriptions and features
|
||||
SHOW ASYNCH Display the current Asynchronous I/O status
|
||||
SHOW SERIAL Display the available and/or open serial ports
|
||||
SHOW ETHERNET Display the available and/or open ethernet connections
|
||||
SHOW MULTIPLEXER Display the details about open multiplexer devices
|
||||
SHOW CLOCKS Display the details about calibrated timers
|
||||
SHOW REMOTE Display the remote console configuration
|
||||
SHOW ON Display ON condition dispatch actions
|
||||
SET ON Enable ON condition error dispatching
|
||||
SET NOON Disable ON condition error dispatching
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
CommandLine="goto _good

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

:_good
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -45,7 +45,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="./;../;../ibm1130/"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SIM_NEED_GIT_COMMIT_ID"
|
||||
PreprocessorDefinitions="GUI_SUPPORT;WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SIM_NEED_GIT_COMMIT_ID"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
CommandLine="goto _good

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

:_good
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -128,7 +128,7 @@
|
|||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="./;../;../ibm1130/"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SIM_NEED_GIT_COMMIT_ID"
|
||||
PreprocessorDefinitions="GUI_SUPPORT;WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;SIM_NEED_GIT_COMMIT_ID"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
|
@ -306,6 +306,10 @@
|
|||
RelativePath="..\ibm1130\ibm1130_defs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\ibm1130_fmt.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\ibm1130\ibm1130_prtwheel.h"
|
||||
>
|
||||
|
@ -367,6 +371,46 @@
|
|||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1130consoleblank.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1132empty.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1132full.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1442empty.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1442eof.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1442full.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\1442middle.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\hand.cur"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\ibm1130.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Ibm1130\ibm1130.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -109,7 +109,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -109,7 +109,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -107,7 +107,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -113,7 +113,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -113,7 +113,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -113,7 +113,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -112,7 +112,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -112,7 +112,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -112,7 +112,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -112,7 +112,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Build Dependent ROM include File(s) & Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -108,7 +108,7 @@
|
|||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Check for required build dependencies & git commit id"
|
||||
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
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
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
if not exist ..\.git goto _SetId
if exist ..\.git\hooks\post-commit goto _SetId
echo *****************************************************
echo *****************************************************
echo ** Installing git hooks in newly cloned repository **
echo *****************************************************
echo *****************************************************
copy git-hooks\post* ..\.git\hooks\
:_SetId
SET GIT_COMMIT_ID=
if not exist ..\.git-commit-id goto _NoId
for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i
:_NoId
SET OLD_GIT_COMMIT_ID=
if not exist .git-commit-id.h echo.>.git-commit-id.h
for /F "tokens=3" %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i
if "%GIT_COMMIT_ID%" equ "%OLD_GIT_COMMIT_ID%" goto _IdGood
echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% >.git-commit-id.h
:_IdGood
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
BIN
doc/altairz80_doc.pdf
Normal file
BIN
doc/altairz80_doc.pdf
Normal file
Binary file not shown.
BIN
doc/simh_doc.doc
BIN
doc/simh_doc.doc
Binary file not shown.
60
makefile
60
makefile
|
@ -79,8 +79,8 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
ifeq (,$(GCC_VERSION))
|
||||
ifeq (SunOS,$(OSTYPE))
|
||||
ifneq (,$(shell $(GCC) -V 2>&1 | grep 'Sun C'))
|
||||
SUNC_VERSION = $(shell $(GCC) -V 2>&1 | grep 'Sun C' | awk '{ print $$4 }')
|
||||
COMPILER_NAME = Sun C $(SUNC_VERSION)
|
||||
SUNC_VERSION = $(shell $(GCC) -V 2>&1 | grep 'Sun C')
|
||||
COMPILER_NAME = $(wordlist 2,10,$(SUNC_VERSION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -97,6 +97,18 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (git-repo,$(shell if $(TEST) -d ./.git; then echo git-repo; fi))
|
||||
ifeq (need-hooks,$(shell if $(TEST) ! -e ./.git/hooks/post-checkout; then echo need-hooks; fi))
|
||||
$(info *** Installing git hooks in local repository ***)
|
||||
GIT_HOOKS += $(shell /bin/cp './Visual Studio Projects/git-hooks/post-commit' ./.git/hooks/)
|
||||
GIT_HOOKS += $(shell /bin/cp './Visual Studio Projects/git-hooks/post-checkout' ./.git/hooks/)
|
||||
GIT_HOOKS += $(shell /bin/cp './Visual Studio Projects/git-hooks/post-merge' ./.git/hooks/)
|
||||
GIT_HOOKS += $(shell ./.git/hooks/post-checkout)
|
||||
ifneq (,$(strip $(GIT_HOOKS)))
|
||||
$(info *** Warning - Error installing git hooks *** $(GIT_HOOKS))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
LTO_EXCLUDE_VERSIONS =
|
||||
PCAPLIB = pcap
|
||||
ifeq (agcc,$(findstring agcc,$(GCC))) # Android target build?
|
||||
|
@ -111,6 +123,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
OS_CCDEFS = -D_GNU_SOURCE
|
||||
GCC_OPTIMIZERS_CMD = $(GCC) -v --help 2>&1
|
||||
GCC_WARNINGS_CMD = $(GCC) -v --help 2>&1
|
||||
LD_ELF = $(shell echo | $(GCC) -E -dM - | grep __ELF__)
|
||||
ifeq (Darwin,$(OSTYPE))
|
||||
OSNAME = OSX
|
||||
LIBEXT = dylib
|
||||
|
@ -153,15 +166,17 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
PCAPLIB = wpcap
|
||||
LIBEXT = a
|
||||
else
|
||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||
ifneq (,$(LDSEARCH))
|
||||
LIBPATH := $(LDSEARCH)
|
||||
else
|
||||
$(info *** Warning ***)
|
||||
$(info *** Warning *** The library search path on your $(OSTYPE) platform can't be)
|
||||
$(info *** Warning *** determined. This should be resolved before you can expect)
|
||||
$(info *** Warning *** to have fully working simulators.)
|
||||
$(info *** Warning ***)
|
||||
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||
ifneq (,$(LDSEARCH))
|
||||
LIBPATH := $(LDSEARCH)
|
||||
else
|
||||
$(info *** Warning ***)
|
||||
$(info *** Warning *** The library search path on your $(OSTYPE) platform can't be)
|
||||
$(info *** Warning *** determined. This should be resolved before you can expect)
|
||||
$(info *** Warning *** to have fully working simulators.)
|
||||
$(info *** Warning ***)
|
||||
endif
|
||||
endif
|
||||
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo usrpkglib; fi))
|
||||
LIBPATH += /usr/pkg/lib
|
||||
|
@ -303,8 +318,6 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
LIBEXT = $(LIBEXTSAVE)
|
||||
else
|
||||
$(error using libpcap: missing pcap.h)
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring USE_NETWORK,$(NETWORK_CCDEFS))$(findstring USE_SHARED,$(NETWORK_CCDEFS)))
|
||||
|
@ -360,8 +373,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi))
|
||||
MKDIRBIN = mkdir -p BIN
|
||||
endif
|
||||
ifneq (,$(shell if $(TEST) -e .git-commit-id; then echo commit-id-exists; fi))
|
||||
ifeq (commit-id-exists,$(shell if $(TEST) -e .git-commit-id; then echo commit-id-exists; fi))
|
||||
GIT_COMMIT_ID=$(shell cat .git-commit-id)
|
||||
else
|
||||
ifeq (,$(shell grep 'define SIM_GIT_COMMIT_ID' sim_rev.h | grep 'Format:'))
|
||||
GIT_COMMIT_ID=$(shell grep 'define SIM_GIT_COMMIT_ID' sim_rev.h | awk '{ print $$3 }')
|
||||
endif
|
||||
endif
|
||||
else
|
||||
#Win32 Environments (via MinGW32)
|
||||
|
@ -411,6 +428,10 @@ else
|
|||
endif
|
||||
ifneq (,$(shell if exist .git-commit-id type .git-commit-id))
|
||||
GIT_COMMIT_ID=$(shell if exist .git-commit-id type .git-commit-id)
|
||||
else
|
||||
ifeq (,$(shell findstr /C:"define SIM_GIT_COMMIT_ID" sim_rev.h | findstr Format))
|
||||
GIT_COMMIT_ID=$(shell for /F "tokens=3" %%i in ("$(shell findstr /C:"define SIM_GIT_COMMIT_ID" sim_rev.h)") do echo %%i)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(GIT_COMMIT_ID))
|
||||
|
@ -506,7 +527,7 @@ else
|
|||
endif
|
||||
endif
|
||||
CC_OUTSPEC = -o $@
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -DSIM_COMPILER="$(COMPILER_NAME)" -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
LDFLAGS = $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O)
|
||||
|
||||
#
|
||||
|
@ -733,6 +754,9 @@ IBM1130 = ${IBM1130D}/ibm1130_cpu.c ${IBM1130D}/ibm1130_cr.c \
|
|||
${IBM1130D}/ibm1130_plot.c ${IBM1130D}/ibm1130_sca.c \
|
||||
${IBM1130D}/ibm1130_t2741.c
|
||||
IBM1130_OPT = -I ${IBM1130D}
|
||||
ifneq ($(WIN32),)
|
||||
IBM1130_OPT += -DGUI_SUPPORT -lgdi32
|
||||
endif
|
||||
|
||||
|
||||
ID16D = Interdata
|
||||
|
@ -1017,7 +1041,13 @@ ibm1130 : ${BIN}ibm1130${EXE}
|
|||
|
||||
${BIN}ibm1130${EXE} : ${IBM1130}
|
||||
${MKDIRBIN}
|
||||
ifneq ($(WIN32),)
|
||||
windres ${IBM1130D}/ibm1130.rc $(BIN)ibm1130.o
|
||||
${CC} ${IBM1130} ${SIM} ${IBM1130_OPT} $(BIN)ibm1130.o $(CC_OUTSPEC) ${LDFLAGS}
|
||||
del BIN\ibm1130.o
|
||||
else
|
||||
${CC} ${IBM1130} ${SIM} ${IBM1130_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
endif
|
||||
|
||||
s3 : ${BIN}s3${EXE}
|
||||
|
||||
|
|
221
scp.c
221
scp.c
|
@ -392,7 +392,7 @@ BRKTAB *sim_brk_new (t_addr loc);
|
|||
|
||||
SCHTAB *get_search (char *cptr, int32 radix, SCHTAB *schptr);
|
||||
int32 test_search (t_value val, SCHTAB *schptr);
|
||||
char *get_glyph_gen (char *iptr, char *optr, char mchar, t_bool uc);
|
||||
static char *get_glyph_gen (char *iptr, char *optr, char mchar, t_bool uc, t_bool quote);
|
||||
int32 get_switches (char *cptr);
|
||||
char *get_sim_sw (char *cptr);
|
||||
t_stat get_aval (t_addr addr, DEVICE *dptr, UNIT *uptr);
|
||||
|
@ -562,7 +562,7 @@ const struct scp_error {
|
|||
{"STALL", "Console Telnet output stall"},
|
||||
{"AFAIL", "Assertion failed"},
|
||||
{"INVREM", "Invalid remote console command"},
|
||||
};
|
||||
};
|
||||
|
||||
const size_t size_map[] = { sizeof (int8),
|
||||
sizeof (int8), sizeof (int16), sizeof (int32), sizeof (int32)
|
||||
|
@ -723,14 +723,14 @@ static CTAB cmd_table[] = {
|
|||
"sh{ow} fea{tures} show system devices with descriptions\n"
|
||||
"sh{ow} m{odifiers} show modifiers for all devices\n"
|
||||
"sh{ow} s{how} show SHOW commands for all devices\n"
|
||||
"sh{ow} n{ames} show logical names\n"
|
||||
"sh{ow} q{ueue} show event queue\n"
|
||||
"sh{ow} n{ames} show logical names\n"
|
||||
"sh{ow} q{ueue} show event queue\n"
|
||||
"sh{ow} ti{me} show simulated time\n"
|
||||
"sh{ow} th{rottle} show simulation rate\n"
|
||||
"sh{ow} th{rottle} show simulation rate\n"
|
||||
"sh{ow} a{synch} show asynchronouse I/O state\n"
|
||||
"sh{ow} ve{rsion} show simulator version\n"
|
||||
"sh{ow} ve{rsion} show simulator version\n"
|
||||
"sh{ow} def{ault} show current directory\n"
|
||||
"sh{ow} rem{oteconsole} show remote console configuration\n"
|
||||
"sh{ow} re{mote} show remote console configuration\n"
|
||||
"sh{ow} <dev> RADIX show device display radix\n"
|
||||
"sh{ow} <dev> DEBUG show device debug flags\n"
|
||||
"sh{ow} <dev> MODIFIERS show device modifiers\n"
|
||||
|
@ -786,19 +786,19 @@ static CTAB cmd_table[] = {
|
|||
#if defined(_WIN32) || defined(__hpux)
|
||||
static
|
||||
int setenv(const char *envname, const char *envval, int overwrite)
|
||||
{
|
||||
char *envstr = malloc(strlen(envname)+strlen(envval)+2);
|
||||
int r;
|
||||
{
|
||||
char *envstr = malloc(strlen(envname)+strlen(envval)+2);
|
||||
int r;
|
||||
|
||||
sprintf(envstr, "%s=%s", envname, envval);
|
||||
sprintf(envstr, "%s=%s", envname, envval);
|
||||
#if defined(_WIN32)
|
||||
r = _putenv(envstr);
|
||||
free(envstr);
|
||||
r = _putenv(envstr);
|
||||
free(envstr);
|
||||
#else
|
||||
r = putenv(envstr);
|
||||
r = putenv(envstr);
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1648,7 +1648,6 @@ do {
|
|||
cmdp->message ((!echo && !sim_quiet) ? ocptr : NULL, stat);
|
||||
else
|
||||
if (stat >= SCPE_BASE) { /* report error if not suppressed */
|
||||
|
||||
printf ("%s\n", sim_error_text (stat));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (stat));
|
||||
|
@ -1787,10 +1786,10 @@ for (; *ip && (op < oend); ) {
|
|||
}
|
||||
else { /* environment variable */
|
||||
ap = NULL;
|
||||
get_glyph_gen (ip+1, gbuf, '%', FALSE); /* first try using the literal name */
|
||||
get_glyph_nc (ip+1, gbuf, '%'); /* first try using the literal name */
|
||||
ap = getenv(gbuf);
|
||||
if (!ap) {
|
||||
get_glyph_gen (ip+1, gbuf, '%', TRUE); /* now try using the upcased name */
|
||||
get_glyph (ip+1, gbuf, '%'); /* now try using the upcased name */
|
||||
ap = getenv(gbuf);
|
||||
}
|
||||
ip += 1 + strlen (gbuf);
|
||||
|
@ -1847,7 +1846,7 @@ for (; *ip && (op < oend); ) {
|
|||
}
|
||||
else
|
||||
if (ip == istart) { /* at beginning of input? */
|
||||
get_glyph_gen (instr, gbuf, 0, TRUE); /* substitute initial token */
|
||||
get_glyph (instr, gbuf, 0); /* substitute initial token */
|
||||
ap = getenv(gbuf); /* if it is an environment variable name */
|
||||
if (!ap) { /* nope? */
|
||||
*op++ = *ip++; /* press on with literal character */
|
||||
|
@ -1876,7 +1875,7 @@ return SCPE_OK;
|
|||
}
|
||||
|
||||
/* Assert command
|
||||
|
||||
|
||||
Syntax: ASSERT {<dev>} <reg>{<logical-op><value>}<conditional-op><value>
|
||||
|
||||
If <dev> is not specified, CPU is assumed. <value> is expressed in the radix
|
||||
|
@ -2189,7 +2188,7 @@ char varname[CBUFSIZE];
|
|||
|
||||
if ((!cptr) || (*cptr == 0)) /* now eol? */
|
||||
return SCPE_2FARG;
|
||||
cptr = get_glyph_gen (cptr, varname, '=', TRUE); /* get environment variable name */
|
||||
cptr = get_glyph (cptr, varname, '='); /* get environment variable name */
|
||||
setenv(varname, cptr, 1);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -2198,7 +2197,7 @@ return SCPE_OK;
|
|||
|
||||
t_stat set_cmd (int32 flag, char *cptr)
|
||||
{
|
||||
uint32 lvl;
|
||||
uint32 lvl = 0;
|
||||
t_stat r;
|
||||
char gbuf[CBUFSIZE], *cvptr, *svptr;
|
||||
DEVICE *dptr;
|
||||
|
@ -2303,11 +2302,18 @@ while (*cptr != 0) { /* do all mods */
|
|||
if ((lvl == MTAB_VUN) && (uptr->flags & UNIT_DIS))
|
||||
return SCPE_UDIS; /* unit disabled? */
|
||||
if (mptr->valid) { /* validation rtn? */
|
||||
if (cvptr && MODMASK(mptr,MTAB_NC)) {
|
||||
get_glyph_nc (svptr, gbuf, ',');
|
||||
if (cvptr && MODMASK(mptr,MTAB_QUOTE)) {
|
||||
get_glyph_quoted (svptr, gbuf, ',');
|
||||
if ((cvptr = strchr (gbuf, '=')))
|
||||
*cvptr++ = 0;
|
||||
}
|
||||
else {
|
||||
if (cvptr && MODMASK(mptr,MTAB_NC)) {
|
||||
get_glyph_nc (svptr, gbuf, ',');
|
||||
if ((cvptr = strchr (gbuf, '=')))
|
||||
*cvptr++ = 0;
|
||||
}
|
||||
}
|
||||
r = mptr->valid (uptr, mptr->match, cvptr, mptr->desc);
|
||||
if (r != SCPE_OK)
|
||||
return r;
|
||||
|
@ -2589,7 +2595,7 @@ while (*cptr != 0) { /* do all mods */
|
|||
*cvptr++ = 0;
|
||||
for (mptr = dptr->modifiers; mptr->mask != 0; mptr++) {
|
||||
if (((mptr->mask & MTAB_XTD)? /* right level? */
|
||||
(mptr->mask & lvl): (MTAB_VUN & lvl)) &&
|
||||
(mptr->mask & lvl): (MTAB_VUN & lvl)) &&
|
||||
((mptr->disp && mptr->pstring && /* named disp? */
|
||||
(MATCH_CMD (gbuf, mptr->pstring) == 0))
|
||||
// ||
|
||||
|
@ -2752,7 +2758,7 @@ if (cptr && (*cptr != 0))
|
|||
fprintf (st, "%s simulator V%d.%d-%d", sim_name, vmaj, vmin, vpat);
|
||||
if (vdelt)
|
||||
fprintf (st, " delta %d", vdelt);
|
||||
#if defined(SIM_VERSION_MODE)
|
||||
#if defined (SIM_VERSION_MODE)
|
||||
fprintf (st, " %s", SIM_VERSION_MODE);
|
||||
#endif
|
||||
if (flag) {
|
||||
|
@ -2771,13 +2777,31 @@ if (flag) {
|
|||
#if defined (SIM_ASYNCH_IO)
|
||||
fprintf (st, "\n\t\tAsynchronous I/O support");
|
||||
#endif
|
||||
#if defined(SIM_ASYNCH_MUX)
|
||||
#if defined (SIM_ASYNCH_MUX)
|
||||
fprintf (st, "\n\t\tAsynchronous Multiplexer support");
|
||||
#endif
|
||||
#if defined(SIM_ASYNCH_CLOCKS)
|
||||
#if defined (SIM_ASYNCH_CLOCKS)
|
||||
fprintf (st, "\n\t\tAsynchronous Clock support");
|
||||
#endif
|
||||
fprintf (st, "\n\tHost Platform:");
|
||||
#if defined (__clang_version__)
|
||||
fprintf (st, "\n\t\tCompiler: clang %s", __clang_version__);
|
||||
#elif defined (__GNUC__) && defined (__VERSION__)
|
||||
fprintf (st, "\n\t\tCompiler: GCC %s", __VERSION__);
|
||||
#elif defined (_MSC_FULL_VER) && defined (_MSC_BUILD)
|
||||
fprintf (st, "\n\t\tCompiler: Microsoft Visual C++ %d.%02d.%05d.%02d", _MSC_FULL_VER/10000000, (_MSC_FULL_VER/100000)%100, _MSC_FULL_VER%100000, _MSC_BUILD);
|
||||
#elif defined (__DECC_VER)
|
||||
fprintf (st, "\n\t\tCompiler: DEC C %c%d.%d-%03d", ("T SV")[((__DECC_VER/10000)%10)-6], __DECC_VER/10000000, (__DECC_VER/100000)%100, __DECC_VER%10000);
|
||||
#elif defined (SIM_COMPILER)
|
||||
#define S_xstr(a) S_str(a)
|
||||
#define S_str(a) #a
|
||||
fprintf (st, "\n\t\tCompiler: %s", S_xstr(SIM_COMPILER));
|
||||
#undef S_str
|
||||
#undef S_xstr
|
||||
#endif
|
||||
#if defined (__DATE__) && defined (__TIME__)
|
||||
fprintf (st, "\n\t\tSimulator Compiled: %s at %s", __DATE__, __TIME__);
|
||||
#endif
|
||||
fprintf (st, "\n\t\tMemory Access: %s Endian", sim_end ? "Little" : "Big");
|
||||
fprintf (st, "\n\t\tMemory Pointer Size: %d bits", (int)sizeof(dptr)*8);
|
||||
fprintf (st, "\n\t\t%s", sim_toffset_64 ? "Large File (>2GB) support" : "No Large File support");
|
||||
|
@ -2799,6 +2823,15 @@ if (flag) {
|
|||
#define S_xstr(a) S_str(a)
|
||||
#define S_str(a) #a
|
||||
fprintf (st, "%sgit commit id: %8.8s", flag ? "\n " : " ", S_xstr(SIM_GIT_COMMIT_ID));
|
||||
#undef S_str
|
||||
#undef S_xstr
|
||||
#endif
|
||||
#if defined(SIM_BUILD)
|
||||
#define S_xstr(a) S_str(a)
|
||||
#define S_str(a) #a
|
||||
fprintf (st, "%sBuild: %s", flag ? "\n " : " ", S_xstr(SIM_BUILD));
|
||||
#undef S_str
|
||||
#undef S_xstr
|
||||
#endif
|
||||
fprintf (st, "\n");
|
||||
return SCPE_OK;
|
||||
|
@ -3008,7 +3041,7 @@ DEVICE *dptr;
|
|||
|
||||
if (cptr && (*cptr != 0)) /* now eol? */
|
||||
return SCPE_2MARG;
|
||||
for (i = 0; (dptr = sim_devices[i]) != NULL; i++)
|
||||
for (i = 0; (dptr = sim_devices[i]) != NULL; i++)
|
||||
show_dev_modifiers (st, dptr, NULL, flag, cptr);
|
||||
for (i = 0; sim_internal_device_count && (dptr = sim_internal_devices[i]); ++i)
|
||||
show_dev_modifiers (st, dptr, NULL, flag, cptr);
|
||||
|
@ -3103,7 +3136,7 @@ sim_trim_endspc(cptr);
|
|||
if (chdir(cptr) != 0) {
|
||||
printf("Unable to change to: %s\n", cptr);
|
||||
return SCPE_IOERR & SCPE_NOMESSAGE;
|
||||
}
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -3129,7 +3162,7 @@ t_stat r;
|
|||
t_addr lo, hi, max = uptr->capac - 1;
|
||||
int32 cnt;
|
||||
|
||||
if (sim_brk_types == 0)
|
||||
if (sim_brk_types == 0)
|
||||
return SCPE_NOFNC;
|
||||
if ((dptr == NULL) || (uptr == NULL))
|
||||
return SCPE_IERR;
|
||||
|
@ -3163,7 +3196,7 @@ while (*cptr) {
|
|||
sim_brk_showall (st, sim_switches);
|
||||
else return SCPE_ARG;
|
||||
}
|
||||
else {
|
||||
else {
|
||||
for ( ; lo <= hi; lo = lo + 1) {
|
||||
r = ssh_break_one (st, flg, lo, cnt, aptr);
|
||||
if (r != SCPE_OK)
|
||||
|
@ -3371,29 +3404,43 @@ if (sim_switches & SWMASK ('R')) { /* read only? */
|
|||
if (!sim_quiet)
|
||||
printf ("%s: unit is read only\n", sim_dname (dptr));
|
||||
}
|
||||
else { /* normal */
|
||||
uptr->fileref = sim_fopen (cptr, "rb+"); /* open r/w */
|
||||
if (uptr->fileref == NULL) { /* open fail? */
|
||||
if ((errno == EROFS) || (errno == EACCES)) { /* read only? */
|
||||
if ((uptr->flags & UNIT_ROABLE) == 0) /* allowed? */
|
||||
return attach_err (uptr, SCPE_NORO); /* no error */
|
||||
uptr->fileref = sim_fopen (cptr, "rb"); /* open rd only */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
uptr->flags = uptr->flags | UNIT_RO; /* set rd only */
|
||||
if (!sim_quiet)
|
||||
printf ("%s: unit is read only\n", sim_dname (dptr));
|
||||
}
|
||||
else { /* doesn't exist */
|
||||
if (sim_switches & SWMASK ('E')) /* must exist? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
uptr->fileref = sim_fopen (cptr, "wb+"); /* open new file */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
if (!sim_quiet) printf ("%s: creating new file\n", sim_dname (dptr));
|
||||
}
|
||||
} /* end if null */
|
||||
} /* end else */
|
||||
else {
|
||||
if (sim_switches & SWMASK ('N')) { /* new file only? */
|
||||
uptr->fileref = sim_fopen (cptr, "wb+"); /* open new file */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
if (!sim_quiet)
|
||||
printf ("%s: creating new file\n", sim_dname (dptr));
|
||||
}
|
||||
else { /* normal */
|
||||
uptr->fileref = sim_fopen (cptr, "rb+"); /* open r/w */
|
||||
if (uptr->fileref == NULL) { /* open fail? */
|
||||
#if defined(EPERM)
|
||||
if ((errno == EROFS) || (errno == EACCES) || (errno == EPERM)) {/* read only? */
|
||||
#else
|
||||
if ((errno == EROFS) || (errno == EACCES)) {/* read only? */
|
||||
#endif
|
||||
if ((uptr->flags & UNIT_ROABLE) == 0) /* allowed? */
|
||||
return attach_err (uptr, SCPE_NORO);/* no error */
|
||||
uptr->fileref = sim_fopen (cptr, "rb"); /* open rd only */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
uptr->flags = uptr->flags | UNIT_RO; /* set rd only */
|
||||
if (!sim_quiet)
|
||||
printf ("%s: unit is read only\n", sim_dname (dptr));
|
||||
}
|
||||
else { /* doesn't exist */
|
||||
if (sim_switches & SWMASK ('E')) /* must exist? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
uptr->fileref = sim_fopen (cptr, "wb+");/* open new file */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return attach_err (uptr, SCPE_OPENERR); /* yes, error */
|
||||
if (!sim_quiet)
|
||||
printf ("%s: creating new file\n", sim_dname (dptr));
|
||||
}
|
||||
} /* end if null */
|
||||
} /* end else */
|
||||
}
|
||||
if (uptr->flags & UNIT_BUFABLE) { /* buffer? */
|
||||
uint32 cap = ((uint32) uptr->capac) / dptr->aincr; /* effective size */
|
||||
if (uptr->flags & UNIT_MUSTBUF) /* dyn alloc? */
|
||||
|
@ -3804,7 +3851,7 @@ fstat (fileno (rfile), &rstat);
|
|||
READ_S (buf); /* [V2.5+] read version */
|
||||
v35 = v32 = FALSE;
|
||||
if (strcmp (buf, save_vercur) == 0) /* version 3.5? */
|
||||
v35 = v32 = TRUE;
|
||||
v35 = v32 = TRUE;
|
||||
else if (strcmp (buf, save_ver32) == 0) /* version 3.2? */
|
||||
v32 = TRUE;
|
||||
else if (strcmp (buf, save_ver30) != 0) { /* version 3.0? */
|
||||
|
@ -4304,6 +4351,7 @@ return sim_cancel (&sim_step_unit);
|
|||
void int_handler (int sig)
|
||||
{
|
||||
stop_cpu = 1;
|
||||
sim_interval = 0; /* should speed up stop detection */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4359,7 +4407,7 @@ for (gptr = gbuf, reason = SCPE_OK;
|
|||
tdptr = sim_dfdev; /* working dptr */
|
||||
if (strncmp (gptr, "STATE", strlen ("STATE")) == 0) {
|
||||
tptr = gptr + strlen ("STATE");
|
||||
if (*tptr && (*tptr++ != ','))
|
||||
if (*tptr && (*tptr++ != ','))
|
||||
return SCPE_ARG;
|
||||
if ((lowr = sim_dfdev->registers) == NULL)
|
||||
return SCPE_NXREG;
|
||||
|
@ -4418,7 +4466,7 @@ return reason;
|
|||
exdep_addr_loop examine/deposit range of addresses
|
||||
*/
|
||||
|
||||
t_stat exdep_reg_loop (FILE *ofile, SCHTAB *schptr, int32 flag, char *cptr,
|
||||
t_stat exdep_reg_loop (FILE *ofile, SCHTAB *schptr, int32 flag, char *cptr,
|
||||
REG *lowr, REG *highr, uint32 lows, uint32 highs)
|
||||
{
|
||||
t_stat reason;
|
||||
|
@ -4690,13 +4738,13 @@ if ((rptr->depth > 1) && (rptr->flags & REG_UNIT)) {
|
|||
#if defined (USE_INT64)
|
||||
if (sz <= sizeof (uint32))
|
||||
*((uint32 *) uptr) = (*((uint32 *) uptr) &
|
||||
~(((uint32) mask) << rptr->offset)) |
|
||||
~(((uint32) mask) << rptr->offset)) |
|
||||
(((uint32) val) << rptr->offset);
|
||||
else *((t_uint64 *) uptr) = (*((t_uint64 *) uptr)
|
||||
& ~(mask << rptr->offset)) | (val << rptr->offset);
|
||||
#else
|
||||
*((uint32 *) uptr) = (*((uint32 *) uptr) &
|
||||
~(((uint32) mask) << rptr->offset)) |
|
||||
~(((uint32) mask) << rptr->offset)) |
|
||||
(((uint32) val) << rptr->offset);
|
||||
#endif
|
||||
}
|
||||
|
@ -4884,7 +4932,7 @@ for (i = 0, j = addr; i < count; i++, j = j + dptr->aincr) {
|
|||
loc = j / dptr->aincr;
|
||||
if (uptr->flags & UNIT_BUF) {
|
||||
SZ_STORE (sz, sim_eval[i], uptr->filebuf, loc);
|
||||
if (loc >= uptr->hwmark)
|
||||
if (loc >= uptr->hwmark)
|
||||
uptr->hwmark = (uint32) loc + 1;
|
||||
}
|
||||
else {
|
||||
|
@ -5050,20 +5098,38 @@ return cptr;
|
|||
|
||||
/* get_glyph get next glyph (force upper case)
|
||||
get_glyph_nc get next glyph (no conversion)
|
||||
get_glyph_quoted get next glyph (potentially enclosed in quotes, no conversion)
|
||||
get_glyph_gen get next glyph (general case)
|
||||
|
||||
Inputs:
|
||||
iptr = pointer to input string
|
||||
optr = pointer to output string
|
||||
mchar = optional end of glyph character
|
||||
flag = TRUE for convert to upper case (_gen only)
|
||||
uc = TRUE for convert to upper case (_gen only)
|
||||
quote = TRUE to allow quote enclosing values (_gen only)
|
||||
Outputs
|
||||
result = pointer to next character in input string
|
||||
*/
|
||||
|
||||
char *get_glyph_gen (char *iptr, char *optr, char mchar, t_bool uc)
|
||||
static char *get_glyph_gen (char *iptr, char *optr, char mchar, t_bool uc, t_bool quote)
|
||||
{
|
||||
while ((isspace (*iptr) == 0) && (*iptr != 0) && (*iptr != mchar)) {
|
||||
t_bool quoting = FALSE;
|
||||
char quote_char = 0;
|
||||
|
||||
while ((*iptr != 0) &&
|
||||
((quote && quoting) || ((isspace (*iptr) == 0) && (*iptr != mchar)))) {
|
||||
if (quote) {
|
||||
if (quoting) {
|
||||
if (*iptr == quote_char)
|
||||
quoting = FALSE;
|
||||
}
|
||||
else {
|
||||
if ((*iptr == '"') || (*iptr == '\'')) {
|
||||
quoting = TRUE;
|
||||
quote_char = *iptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (islower (*iptr) && uc)
|
||||
*optr = toupper (*iptr);
|
||||
else *optr = *iptr;
|
||||
|
@ -5079,12 +5145,17 @@ return iptr;
|
|||
|
||||
char *get_glyph (char *iptr, char *optr, char mchar)
|
||||
{
|
||||
return get_glyph_gen (iptr, optr, mchar, TRUE);
|
||||
return get_glyph_gen (iptr, optr, mchar, TRUE, FALSE);
|
||||
}
|
||||
|
||||
char *get_glyph_nc (char *iptr, char *optr, char mchar)
|
||||
{
|
||||
return get_glyph_gen (iptr, optr, mchar, FALSE);
|
||||
return get_glyph_gen (iptr, optr, mchar, FALSE, FALSE);
|
||||
}
|
||||
|
||||
char *get_glyph_quoted (char *iptr, char *optr, char mchar)
|
||||
{
|
||||
return get_glyph_gen (iptr, optr, mchar, FALSE, TRUE);
|
||||
}
|
||||
|
||||
/* Trim trailing spaces from a string
|
||||
|
@ -5500,7 +5571,7 @@ while (*cptr) { /* loop through modifier
|
|||
cptr = get_glyph_nc (cptr + 1, gbuf, 0);
|
||||
sim_ofile = sim_fopen (gbuf, "a"); /* open for append */
|
||||
if (sim_ofile == NULL) { /* open failed? */
|
||||
*st = SCPE_OPENERR;
|
||||
*st = SCPE_OPENERR;
|
||||
return NULL;
|
||||
}
|
||||
sim_opt_out |= CMD_OPT_OF; /* got output file */
|
||||
|
@ -6539,7 +6610,7 @@ if (sim_deb && (dptr->dctrl & dbits)) {
|
|||
Callers should be calling sim_debug() which is a macro
|
||||
defined in scp.h which evaluates the action condition before
|
||||
incurring call overhead. */
|
||||
|
||||
|
||||
void _sim_debug (uint32 dbits, DEVICE* dptr, const char* fmt, ...)
|
||||
{
|
||||
if (sim_deb && (dptr->dctrl & dbits)) {
|
||||
|
@ -6578,7 +6649,7 @@ if (sim_deb && (dptr->dctrl & dbits)) {
|
|||
#endif /* NO_vsnprintf */
|
||||
va_end (arglist);
|
||||
|
||||
/* If it didn't fit into the buffer, then grow it and try again */
|
||||
/* If the formatted result didn't fit into the buffer, then grow the buffer and try again */
|
||||
|
||||
if ((len < 0) || (len >= bufsize-1)) {
|
||||
if (buf != stackbuf)
|
||||
|
@ -6609,8 +6680,14 @@ if (sim_deb && (dptr->dctrl & dbits)) {
|
|||
j = i + 1;
|
||||
}
|
||||
}
|
||||
if (i > j)
|
||||
fwrite (&buf[j], 1, i-j, sim_deb);
|
||||
if (i > j) {
|
||||
if (debug_unterm)
|
||||
fprintf (sim_deb, "%.*s", i-j, &buf[j]);
|
||||
else /* print prefix when required */
|
||||
fprintf (sim_deb, "DBG(%.0f)%s> %s %s: %.*s", sim_gtime(),
|
||||
AIO_MAIN_THREAD ? "" : "+",
|
||||
dptr->name, debug_type, i-j, &buf[j]);
|
||||
}
|
||||
|
||||
/* Set unterminated flag for next time */
|
||||
|
||||
|
|
3
scp.h
3
scp.h
|
@ -111,11 +111,13 @@ t_stat get_yn (char *ques, t_stat deflt);
|
|||
char *get_sim_opt (int32 opt, char *cptr, t_stat *st);
|
||||
char *get_glyph (char *iptr, char *optr, char mchar);
|
||||
char *get_glyph_nc (char *iptr, char *optr, char mchar);
|
||||
char *get_glyph_quoted (char *iptr, char *optr, char mchar);
|
||||
t_value get_uint (char *cptr, uint32 radix, t_value max, t_stat *status);
|
||||
char *get_range (DEVICE *dptr, char *cptr, t_addr *lo, t_addr *hi,
|
||||
uint32 rdx, t_addr max, char term);
|
||||
t_value strtotv (const char *cptr, char **endptr, uint32 radix);
|
||||
t_stat fprint_val (FILE *stream, t_value val, uint32 rdx, uint32 wid, uint32 fmt);
|
||||
char *read_line (char *cptr, int32 size, FILE *stream);
|
||||
void fprint_reg_help (FILE *st, DEVICE *dptr);
|
||||
void fprint_set_help (FILE *st, DEVICE *dptr);
|
||||
void fprint_show_help (FILE *st, DEVICE *dptr);
|
||||
|
@ -165,6 +167,7 @@ extern FILE *sim_deb; /* debug file */
|
|||
extern FILEREF *sim_deb_ref; /* debug file file reference */
|
||||
extern UNIT *sim_clock_queue;
|
||||
extern int32 sim_is_running;
|
||||
extern char *sim_prompt; /* prompt string */
|
||||
extern volatile int32 stop_cpu;
|
||||
extern uint32 sim_brk_types; /* breakpoint info */
|
||||
extern uint32 sim_brk_dflt;
|
||||
|
|
|
@ -1640,7 +1640,7 @@ if ((std_input) && /* Not Background proces
|
|||
GetConsoleMode (std_input, &saved_mode); /* Save Mode */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
static t_stat sim_os_ttrun (void)
|
||||
{
|
||||
if ((std_input) && /* If Not Background process? */
|
||||
|
@ -2089,7 +2089,7 @@ static t_bool sim_os_ttisatty (void)
|
|||
return isatty (0);
|
||||
}
|
||||
|
||||
static static t_stat sim_os_poll_kbd (void)
|
||||
static t_stat sim_os_poll_kbd (void)
|
||||
{
|
||||
int status;
|
||||
unsigned char buf[1];
|
||||
|
|
|
@ -90,7 +90,6 @@ t_stat sim_ttrun (void);
|
|||
t_stat sim_ttcmd (void);
|
||||
t_stat sim_ttclose (void);
|
||||
t_bool sim_ttisatty (void);
|
||||
t_stat sim_os_poll_kbd (void);
|
||||
int32 sim_tt_inpcvt (int32 c, uint32 mode);
|
||||
int32 sim_tt_outcvt (int32 c, uint32 mode);
|
||||
|
||||
|
|
|
@ -562,7 +562,8 @@ struct sim_mtab {
|
|||
#define MTAB_VALO (0010 | MTAB_XTD) /* takes a value (optional) */
|
||||
#define MTAB_NMO (0020 | MTAB_XTD) /* only if named */
|
||||
#define MTAB_NC (0040 | MTAB_XTD) /* no UC conversion */
|
||||
#define MTAB_SHP (0100 | MTAB_XTD) /* show takes parameter */
|
||||
#define MTAB_QUOTE (0100 | MTAB_XTD) /* quoted string */
|
||||
#define MTAB_SHP (0200 | MTAB_XTD) /* show takes parameter */
|
||||
#define MODMASK(mptr,flag) (((mptr)->mask & (uint32)(flag)) == (uint32)(flag))/* flag mask test */
|
||||
|
||||
/* Search table */
|
||||
|
@ -579,7 +580,7 @@ struct sim_schtab {
|
|||
struct sim_brktab {
|
||||
t_addr addr; /* address */
|
||||
int32 typ; /* mask of types */
|
||||
int32 cnt; /* proceed count */
|
||||
int32 cnt; /* proceed count */
|
||||
char *act; /* action string */
|
||||
};
|
||||
|
||||
|
@ -721,7 +722,7 @@ extern int32 sim_asynch_latency;
|
|||
extern int32 sim_asynch_inst_latency;
|
||||
|
||||
/* Thread local storage */
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux)
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux) && !defined(__OpenBSD__)
|
||||
#define AIO_TLS __thread
|
||||
#elif defined(_MSC_VER)
|
||||
#define AIO_TLS __declspec(thread)
|
||||
|
|
373
sim_disk.c
373
sim_disk.c
|
@ -20,7 +20,7 @@
|
|||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Mark Pizzolato shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Mark Pizzolato.
|
||||
|
||||
|
||||
|
@ -163,8 +163,8 @@ int sched_policy;
|
|||
struct sched_param sched_priority;
|
||||
struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx;
|
||||
|
||||
/* Boost Priority for this I/O thread vs the CPU instruction execution
|
||||
thread which in general won't be readily yielding the processor when
|
||||
/* Boost Priority for this I/O thread vs the CPU instruction execution
|
||||
thread which in general won't be readily yielding the processor when
|
||||
this thread needs to run */
|
||||
pthread_getschedparam (pthread_self(), &sched_policy, &sched_priority);
|
||||
++sched_priority.sched_priority;
|
||||
|
@ -202,16 +202,16 @@ sim_debug (ctx->dbit, ctx->dptr, "_disk_io(unit=%d) exiting\n", (int)(uptr-ctx->
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* This routine is called in the context of the main simulator thread before
|
||||
processing events for any unit. It is only called when an asynchronous
|
||||
thread has called sim_activate() to activate a unit. The job of this
|
||||
/* This routine is called in the context of the main simulator thread before
|
||||
processing events for any unit. It is only called when an asynchronous
|
||||
thread has called sim_activate() to activate a unit. The job of this
|
||||
routine is to put the unit in proper condition to digest what may have
|
||||
occurred in the asynchrconous thread.
|
||||
|
||||
Since disk processing only handles a single I/O at a time to a
|
||||
|
||||
Since disk processing only handles a single I/O at a time to a
|
||||
particular disk device (due to using stdio for the SimH Disk format
|
||||
and stdio doesn't have an atomic seek+(read|write) operation),
|
||||
we have the opportunity to possibly detect improper attempts to
|
||||
and stdio doesn't have an atomic seek+(read|write) operation),
|
||||
we have the opportunity to possibly detect improper attempts to
|
||||
issue multiple concurrent I/O requests. */
|
||||
static void _disk_completion_dispatch (UNIT *uptr)
|
||||
{
|
||||
|
@ -534,7 +534,7 @@ t_stat sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread,
|
|||
{
|
||||
t_stat r;
|
||||
struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx;
|
||||
t_seccnt sread;
|
||||
t_seccnt sread = 0;
|
||||
|
||||
sim_debug (ctx->dbit, ctx->dptr, "sim_disk_rdsect(unit=%d, lba=0x%X, sects=%d)\n", (int)(uptr-ctx->dptr->units), lba, sects);
|
||||
|
||||
|
@ -715,20 +715,20 @@ else { /* Unaligned and/or partial sector transfers */
|
|||
((sects + lba - tlba) & (sspsts - 1)))
|
||||
switch (DK_GET_FMT (uptr)) { /* case on format */
|
||||
case DKUF_F_VHD: /* VHD format */
|
||||
sim_vhd_disk_rdsect (uptr, tlba + tsects - sspsts,
|
||||
tbuf + (tsects - sspsts) * ctx->sector_size,
|
||||
sim_vhd_disk_rdsect (uptr, tlba + tsects - sspsts,
|
||||
tbuf + (tsects - sspsts) * ctx->sector_size,
|
||||
NULL, sspsts);
|
||||
break;
|
||||
case DKUF_F_RAW: /* Raw Physical Disk Access */
|
||||
sim_os_disk_rdsect (uptr, tlba + tsects - sspsts,
|
||||
tbuf + (tsects - sspsts) * ctx->sector_size,
|
||||
sim_os_disk_rdsect (uptr, tlba + tsects - sspsts,
|
||||
tbuf + (tsects - sspsts) * ctx->sector_size,
|
||||
NULL, sspsts);
|
||||
break;
|
||||
default:
|
||||
r = SCPE_NOFNC;
|
||||
break;
|
||||
}
|
||||
sim_buf_copy_swapped (tbuf + (lba & (sspsts - 1)) * ctx->sector_size,
|
||||
sim_buf_copy_swapped (tbuf + (lba & (sspsts - 1)) * ctx->sector_size,
|
||||
buf, ctx->xfer_element_size, (sects * ctx->sector_size) / ctx->xfer_element_size);
|
||||
switch (DK_GET_FMT (uptr)) { /* case on format */
|
||||
case DKUF_F_VHD: /* VHD format */
|
||||
|
@ -774,7 +774,7 @@ switch (DK_GET_FMT (uptr)) { /* case on format */
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
This routine is called when the simulator stops and any time
|
||||
the asynch mode is changed (enabled or disabled)
|
||||
*/
|
||||
|
@ -812,7 +812,7 @@ return stat;
|
|||
}
|
||||
|
||||
|
||||
t_stat sim_disk_attach (UNIT *uptr, char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize,
|
||||
t_stat sim_disk_attach (UNIT *uptr, char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize,
|
||||
uint32 dbit, const char *dtype, uint32 pdp11tracksize, int completion_delay)
|
||||
{
|
||||
struct disk_context *ctx;
|
||||
|
@ -875,7 +875,7 @@ if (sim_switches & SWMASK ('C')) { /* create vhd disk & cop
|
|||
sim_switches = saved_sim_switches;
|
||||
return r;
|
||||
}
|
||||
if (!sim_quiet)
|
||||
if (!sim_quiet)
|
||||
printf ("%s%d: creating new virtual disk '%s'\n", sim_dname (dptr), (int)(uptr-dptr->units), gbuf);
|
||||
capac_factor = ((dptr->dwidth / dptr->aincr) == 16) ? 2 : 1; /* capacity units (word: 2, byte: 1) */
|
||||
vhd = sim_vhd_disk_create (gbuf, ((t_offset)uptr->capac)*capac_factor*((dptr->flags & DEV_SECTORS) ? 512 : 1));
|
||||
|
@ -1076,7 +1076,7 @@ else { /* normal */
|
|||
uptr->fileref = open_function (cptr, "wb+");/* open new file */
|
||||
if (uptr->fileref == NULL) /* open fail? */
|
||||
return _err_return (uptr, SCPE_OPENERR);/* yes, error */
|
||||
if (!sim_quiet)
|
||||
if (!sim_quiet)
|
||||
printf ("%s%d: creating new file\n", sim_dname (dptr), (int)(uptr-dptr->units));
|
||||
created = TRUE;
|
||||
}
|
||||
|
@ -1103,15 +1103,15 @@ if ((created) && (!copied)) {
|
|||
t_stat r = SCPE_OK;
|
||||
uint8 *secbuf = calloc (1, ctx->sector_size); /* alloc temp sector buf */
|
||||
|
||||
/*
|
||||
On a newly created disk, we write a zero sector to the last and the
|
||||
first sectors. This serves 3 purposes:
|
||||
1) it avoids strange allocation delays writing newly allocated
|
||||
/*
|
||||
On a newly created disk, we write a zero sector to the last and the
|
||||
first sectors. This serves 3 purposes:
|
||||
1) it avoids strange allocation delays writing newly allocated
|
||||
storage at the end of the disk during simulator operation
|
||||
2) it allocates storage for the whole disk at creation time to
|
||||
2) it allocates storage for the whole disk at creation time to
|
||||
avoid strange failures which may happen during simulator execution
|
||||
if the containing disk is full
|
||||
3) it leaves a Sinh Format disk at the intended size so it may
|
||||
3) it leaves a Sinh Format disk at the intended size so it may
|
||||
subsequently be autosized with the correct size.
|
||||
*/
|
||||
if (secbuf == NULL)
|
||||
|
@ -1970,10 +1970,17 @@ fsync ((int)((long)f));
|
|||
|
||||
static t_offset sim_os_disk_size_raw (FILE *f)
|
||||
{
|
||||
#if defined (DONT_DO_LARGEFILE)
|
||||
struct stat statb;
|
||||
|
||||
if (fstat ((int)((long)f), &statb))
|
||||
return (t_offset)-1;
|
||||
#else
|
||||
struct stat64 statb;
|
||||
|
||||
if (fstat64 ((int)((long)f), &statb))
|
||||
return (t_offset)-1;
|
||||
#endif
|
||||
return (t_offset)statb.st_size;
|
||||
}
|
||||
|
||||
|
@ -1996,7 +2003,7 @@ ssize_t bytesread;
|
|||
sim_debug (ctx->dbit, ctx->dptr, "sim_os_disk_rdsect(unit=%d, lba=0x%X, sects=%d)\n", (int)(uptr-ctx->dptr->units), lba, sects);
|
||||
|
||||
addr = ((off_t)lba) * ctx->sector_size;
|
||||
bytesread = pread((int)((long)uptr->fileref), buf, sects * ctx->sector_size, addr);
|
||||
bytesread = pread((int)((long)uptr->fileref), buf, sects * ctx->sector_size, addr);
|
||||
if (bytesread < 0) {
|
||||
if (sectsread)
|
||||
*sectsread = 0;
|
||||
|
@ -2016,7 +2023,7 @@ ssize_t byteswritten;
|
|||
sim_debug (ctx->dbit, ctx->dptr, "sim_os_disk_wrsect(unit=%d, lba=0x%X, sects=%d)\n", (int)(uptr-ctx->dptr->units), lba, sects);
|
||||
|
||||
addr = ((off_t)lba) * ctx->sector_size;
|
||||
byteswritten = pwrite((int)((long)uptr->fileref), buf, sects * ctx->sector_size, addr);
|
||||
byteswritten = pwrite((int)((long)uptr->fileref), buf, sects * ctx->sector_size, addr);
|
||||
if (byteswritten < 0) {
|
||||
if (sectswritten)
|
||||
*sectswritten = 0;
|
||||
|
@ -2172,9 +2179,9 @@ return NULL;
|
|||
#else
|
||||
|
||||
/*++
|
||||
This code follows the details specified in the "Virtual Hard Disk Image
|
||||
Format Specification", Version 1.0 October 11, 2006. This format
|
||||
specification is available for anyone to implement under the
|
||||
This code follows the details specified in the "Virtual Hard Disk Image
|
||||
Format Specification", Version 1.0 October 11, 2006. This format
|
||||
specification is available for anyone to implement under the
|
||||
"Microsoft Open Specification Promise" described at:
|
||||
http://www.microsoft.com/interop/osp/default.mspx.
|
||||
--*/
|
||||
|
@ -2184,75 +2191,75 @@ typedef t_int64 int64;
|
|||
|
||||
typedef struct _VHD_Footer {
|
||||
/*
|
||||
Cookies are used to uniquely identify the original creator of the hard disk
|
||||
image. The values are case-sensitive. Microsoft uses the “conectix” string
|
||||
to identify this file as a hard disk image created by Microsoft Virtual
|
||||
Server, Virtual PC, and predecessor products. The cookie is stored as an
|
||||
eight-character ASCII string with the “c” in the first byte, the “o” in
|
||||
Cookies are used to uniquely identify the original creator of the hard disk
|
||||
image. The values are case-sensitive. Microsoft uses the "conectix" string
|
||||
to identify this file as a hard disk image created by Microsoft Virtual
|
||||
Server, Virtual PC, and predecessor products. The cookie is stored as an
|
||||
eight-character ASCII string with the "c" in the first byte, the "o" in
|
||||
the second byte, and so on.
|
||||
*/
|
||||
char Cookie[8];
|
||||
/*
|
||||
This is a bit field used to indicate specific feature support. The following
|
||||
table displays the list of features.
|
||||
Any fields not listed are reserved.
|
||||
This is a bit field used to indicate specific feature support. The following
|
||||
table displays the list of features.
|
||||
Any fields not listed are reserved.
|
||||
|
||||
Feature Value:
|
||||
No features enabled 0x00000000
|
||||
Temporary 0x00000001
|
||||
Reserved 0x00000002
|
||||
|
||||
No features enabled.
|
||||
No features enabled.
|
||||
The hard disk image has no special features enabled in it.
|
||||
Temporary.
|
||||
This bit is set if the current disk is a temporary disk. A
|
||||
temporary disk designation indicates to an application that
|
||||
this disk is a candidate for deletion on shutdown.
|
||||
This bit is set if the current disk is a temporary disk. A
|
||||
temporary disk designation indicates to an application that
|
||||
this disk is a candidate for deletion on shutdown.
|
||||
Reserved.
|
||||
This bit must always be set to 1.
|
||||
All other bits are also reserved and should be set to 0.
|
||||
*/
|
||||
uint32 Features;
|
||||
/*
|
||||
This field is divided into a major/minor version and matches the version of
|
||||
the specification used in creating the file. The most-significant two bytes
|
||||
are for the major version. The least-significant two bytes are the minor
|
||||
version. This must match the file format specification. For the current
|
||||
This field is divided into a major/minor version and matches the version of
|
||||
the specification used in creating the file. The most-significant two bytes
|
||||
are for the major version. The least-significant two bytes are the minor
|
||||
version. This must match the file format specification. For the current
|
||||
specification, this field must be initialized to 0x00010000.
|
||||
The major version will be incremented only when the file format is modified
|
||||
in such a way that it is no longer compatible with older versions of the
|
||||
The major version will be incremented only when the file format is modified
|
||||
in such a way that it is no longer compatible with older versions of the
|
||||
file format.
|
||||
*/
|
||||
uint32 FileFormatVersion;
|
||||
/*
|
||||
This field holds the absolute byte offset, from the beginning of the file,
|
||||
to the next structure. This field is used for dynamic disks and differencing
|
||||
disks, but not fixed disks. For fixed disks, this field should be set to
|
||||
0xFFFFFFFF.
|
||||
This field holds the absolute byte offset, from the beginning of the file,
|
||||
to the next structure. This field is used for dynamic disks and differencing
|
||||
disks, but not fixed disks. For fixed disks, this field should be set to
|
||||
0xFFFFFFFF.
|
||||
*/
|
||||
uint64 DataOffset;
|
||||
/*
|
||||
This field stores the creation time of a hard disk image. This is the number
|
||||
This field stores the creation time of a hard disk image. This is the number
|
||||
of seconds since January 1, 2000 12:00:00 AM in UTC/GMT.
|
||||
*/
|
||||
uint32 TimeStamp;
|
||||
/*
|
||||
This field is used to document which application created the hard disk. The
|
||||
field is a left-justified text field. It uses a single-byte character set.
|
||||
If the hard disk is created by Microsoft Virtual PC, "vpc " is written in
|
||||
this field. If the hard disk image is created by Microsoft Virtual Server,
|
||||
This field is used to document which application created the hard disk. The
|
||||
field is a left-justified text field. It uses a single-byte character set.
|
||||
If the hard disk is created by Microsoft Virtual PC, "vpc " is written in
|
||||
this field. If the hard disk image is created by Microsoft Virtual Server,
|
||||
then "vs " is written in this field.
|
||||
Other applications should use their own unique identifiers.
|
||||
Other applications should use their own unique identifiers.
|
||||
*/
|
||||
char CreatorApplication[4];
|
||||
/*
|
||||
This field holds the major/minor version of the application that created
|
||||
This field holds the major/minor version of the application that created
|
||||
the hard disk image. Virtual Server 2004 sets this value to 0x00010000 and
|
||||
Virtual PC 2004 sets this to 0x00050000.
|
||||
*/
|
||||
uint32 CreatorVersion;
|
||||
/*
|
||||
This field stores the type of host operating system this disk image is
|
||||
This field stores the type of host operating system this disk image is
|
||||
created on.
|
||||
Host OS type Value
|
||||
Windows 0x5769326B (Wi2k)
|
||||
|
@ -2260,34 +2267,34 @@ typedef struct _VHD_Footer {
|
|||
*/
|
||||
uint8 CreatorHostOS[4];
|
||||
/*
|
||||
This field stores the size of the hard disk in bytes, from the perspective
|
||||
of the virtual machine, at creation time. This field is for informational
|
||||
purposes.
|
||||
This field stores the size of the hard disk in bytes, from the perspective
|
||||
of the virtual machine, at creation time. This field is for informational
|
||||
purposes.
|
||||
*/
|
||||
uint64 OriginalSize;
|
||||
/*
|
||||
This field stores the current size of the hard disk, in bytes, from the
|
||||
This field stores the current size of the hard disk, in bytes, from the
|
||||
perspective of the virtual machine.
|
||||
This value is same as the original size when the hard disk is created.
|
||||
This value can change depending on whether the hard disk is expanded.
|
||||
This value is same as the original size when the hard disk is created.
|
||||
This value can change depending on whether the hard disk is expanded.
|
||||
*/
|
||||
uint64 CurrentSize;
|
||||
/*
|
||||
This field stores the cylinder, heads, and sectors per track value for the
|
||||
hard disk.
|
||||
This field stores the cylinder, heads, and sectors per track value for the
|
||||
hard disk.
|
||||
Disk Geometry field Size (bytes)
|
||||
Cylinder 2
|
||||
Heads 1
|
||||
Sectors per track/cylinder 1
|
||||
|
||||
When a hard disk is configured as an ATA hard disk, the CHS values (that is,
|
||||
Cylinder, Heads, Sectors per track) are used by the ATA controller to
|
||||
determine the size of the disk. When the user creates a hard disk of a
|
||||
certain size, the size of the hard disk image in the virtual machine is
|
||||
smaller than that created by the user. This is because CHS value calculated
|
||||
from the hard disk size is rounded down. The pseudo-code for the algorithm
|
||||
used to determine the CHS values can be found in the appendix of this
|
||||
document.
|
||||
When a hard disk is configured as an ATA hard disk, the CHS values (that is,
|
||||
Cylinder, Heads, Sectors per track) are used by the ATA controller to
|
||||
determine the size of the disk. When the user creates a hard disk of a
|
||||
certain size, the size of the hard disk image in the virtual machine is
|
||||
smaller than that created by the user. This is because CHS value calculated
|
||||
from the hard disk size is rounded down. The pseudo-code for the algorithm
|
||||
used to determine the CHS values can be found in the appendix of this
|
||||
document.
|
||||
*/
|
||||
uint32 DiskGeometry;
|
||||
/*
|
||||
|
@ -2302,49 +2309,49 @@ typedef struct _VHD_Footer {
|
|||
*/
|
||||
uint32 DiskType;
|
||||
/*
|
||||
This field holds a basic checksum of the hard disk footer. It is just a
|
||||
one’s complement of the sum of all the bytes in the footer without the
|
||||
This field holds a basic checksum of the hard disk footer. It is just a
|
||||
one's complement of the sum of all the bytes in the footer without the
|
||||
checksum field.
|
||||
If the checksum verification fails, the Virtual PC and Virtual Server
|
||||
products will instead use the header. If the checksum in the header also
|
||||
fails, the file should be assumed to be corrupt. The pseudo-code for the
|
||||
algorithm used to determine the checksum can be found in the appendix of
|
||||
this document.
|
||||
If the checksum verification fails, the Virtual PC and Virtual Server
|
||||
products will instead use the header. If the checksum in the header also
|
||||
fails, the file should be assumed to be corrupt. The pseudo-code for the
|
||||
algorithm used to determine the checksum can be found in the appendix of
|
||||
this document.
|
||||
*/
|
||||
uint32 Checksum;
|
||||
/*
|
||||
Every hard disk has a unique ID stored in the hard disk. This is used to
|
||||
identify the hard disk. This is a 128-bit universally unique identifier
|
||||
(UUID). This field is used to associate a parent hard disk image with its
|
||||
Every hard disk has a unique ID stored in the hard disk. This is used to
|
||||
identify the hard disk. This is a 128-bit universally unique identifier
|
||||
(UUID). This field is used to associate a parent hard disk image with its
|
||||
differencing hard disk image(s).
|
||||
*/
|
||||
uint8 UniqueID[16];
|
||||
/*
|
||||
This field holds a one-byte flag that describes whether the system is in
|
||||
This field holds a one-byte flag that describes whether the system is in
|
||||
saved state. If the hard disk is in the saved state the value is set to 1.
|
||||
Operations such as compaction and expansion cannot be performed on a hard
|
||||
Operations such as compaction and expansion cannot be performed on a hard
|
||||
disk in a saved state.
|
||||
*/
|
||||
uint8 SavedState;
|
||||
/*
|
||||
This field contains zeroes. It is 427 bytes in size.
|
||||
This field contains zeroes. It is 427 bytes in size.
|
||||
*/
|
||||
uint8 Reserved1[11];
|
||||
/*
|
||||
This field is an extension to the VHD spec and includes a simh drive type
|
||||
This field is an extension to the VHD spec and includes a simh drive type
|
||||
name as a nul terminated string.
|
||||
*/
|
||||
uint8 DriveType[16];
|
||||
/*
|
||||
This field contains zeroes. It is 400 bytes in size.
|
||||
This field contains zeroes. It is 400 bytes in size.
|
||||
*/
|
||||
uint8 Reserved[400];
|
||||
} VHD_Footer;
|
||||
|
||||
/*
|
||||
For dynamic and differencing disk images, the “Data Offset” field within
|
||||
the image footer points to a secondary structure that provides additional
|
||||
information about the disk image. The dynamic disk header should appear on
|
||||
For dynamic and differencing disk images, the "Data Offset" field within
|
||||
the image footer points to a secondary structure that provides additional
|
||||
information about the disk image. The dynamic disk header should appear on
|
||||
a sector (512-byte) boundary.
|
||||
*/
|
||||
typedef struct _VHD_DynamicDiskHeader {
|
||||
|
@ -2353,79 +2360,79 @@ typedef struct _VHD_DynamicDiskHeader {
|
|||
*/
|
||||
char Cookie[8];
|
||||
/*
|
||||
This field contains the absolute byte offset to the next structure in the
|
||||
hard disk image. It is currently unused by existing formats and should be
|
||||
This field contains the absolute byte offset to the next structure in the
|
||||
hard disk image. It is currently unused by existing formats and should be
|
||||
set to 0xFFFFFFFF.
|
||||
*/
|
||||
uint64 DataOffset;
|
||||
/*
|
||||
This field stores the absolute byte offset of the Block Allocation Table
|
||||
(BAT) in the file.
|
||||
This field stores the absolute byte offset of the Block Allocation Table
|
||||
(BAT) in the file.
|
||||
*/
|
||||
uint64 TableOffset;
|
||||
/*
|
||||
This field stores the version of the dynamic disk header. The field is
|
||||
This field stores the version of the dynamic disk header. The field is
|
||||
divided into Major/Minor version. The least-significant two bytes represent
|
||||
the minor version, and the most-significant two bytes represent the major
|
||||
version. This must match with the file format specification. For this
|
||||
specification, this field must be initialized to 0x00010000.
|
||||
The major version will be incremented only when the header format is
|
||||
modified in such a way that it is no longer compatible with older versions
|
||||
the minor version, and the most-significant two bytes represent the major
|
||||
version. This must match with the file format specification. For this
|
||||
specification, this field must be initialized to 0x00010000.
|
||||
The major version will be incremented only when the header format is
|
||||
modified in such a way that it is no longer compatible with older versions
|
||||
of the product.
|
||||
*/
|
||||
uint32 HeaderVersion;
|
||||
/*
|
||||
This field holds the maximum entries present in the BAT. This should be
|
||||
equal to the number of blocks in the disk (that is, the disk size divided
|
||||
by the block size).
|
||||
This field holds the maximum entries present in the BAT. This should be
|
||||
equal to the number of blocks in the disk (that is, the disk size divided
|
||||
by the block size).
|
||||
*/
|
||||
uint32 MaxTableEntries;
|
||||
/*
|
||||
A block is a unit of expansion for dynamic and differencing hard disks. It
|
||||
is stored in bytes. This size does not include the size of the block bitmap.
|
||||
It is only the size of the data section of the block. The sectors per block
|
||||
must always be a power of two. The default value is 0x00200000 (indicating a
|
||||
A block is a unit of expansion for dynamic and differencing hard disks. It
|
||||
is stored in bytes. This size does not include the size of the block bitmap.
|
||||
It is only the size of the data section of the block. The sectors per block
|
||||
must always be a power of two. The default value is 0x00200000 (indicating a
|
||||
block size of 2 MB).
|
||||
*/
|
||||
uint32 BlockSize;
|
||||
/*
|
||||
This field holds a basic checksum of the dynamic header. It is a one’s
|
||||
complement of the sum of all the bytes in the header without the checksum
|
||||
This field holds a basic checksum of the dynamic header. It is a one's
|
||||
complement of the sum of all the bytes in the header without the checksum
|
||||
field.
|
||||
If the checksum verification fails the file should be assumed to be corrupt.
|
||||
*/
|
||||
uint32 Checksum;
|
||||
/*
|
||||
This field is used for differencing hard disks. A differencing hard disk
|
||||
stores a 128-bit UUID of the parent hard disk. For more information, see
|
||||
“Creating Differencing Hard Disk Images” later in this paper.
|
||||
This field is used for differencing hard disks. A differencing hard disk
|
||||
stores a 128-bit UUID of the parent hard disk. For more information, see
|
||||
"Creating Differencing Hard Disk Images" later in this paper.
|
||||
*/
|
||||
uint8 ParentUniqueID[16];
|
||||
/*
|
||||
This field stores the modification time stamp of the parent hard disk. This
|
||||
This field stores the modification time stamp of the parent hard disk. This
|
||||
is the number of seconds since January 1, 2000 12:00:00 AM in UTC/GMT.
|
||||
*/
|
||||
uint32 ParentTimeStamp;
|
||||
/*
|
||||
This field should be set to zero.
|
||||
This field should be set to zero.
|
||||
*/
|
||||
uint32 Reserved0;
|
||||
/*
|
||||
This field contains a Unicode string (UTF-16) of the parent hard disk
|
||||
filename.
|
||||
This field contains a Unicode string (UTF-16) of the parent hard disk
|
||||
filename.
|
||||
*/
|
||||
char ParentUnicodeName[512];
|
||||
/*
|
||||
These entries store an absolute byte offset in the file where the parent
|
||||
locator for a differencing hard disk is stored. This field is used only for
|
||||
differencing disks and should be set to zero for dynamic disks.
|
||||
These entries store an absolute byte offset in the file where the parent
|
||||
locator for a differencing hard disk is stored. This field is used only for
|
||||
differencing disks and should be set to zero for dynamic disks.
|
||||
*/
|
||||
struct VHD_ParentLocator {
|
||||
/*
|
||||
The platform code describes which platform-specific format is used for the
|
||||
file locator. For Windows, a file locator is stored as a path (for example.
|
||||
“c:\disksimages\ParentDisk.vhd”). On a Macintosh system, the file locator
|
||||
is a binary large object (blob) that contains an “alias.” The parent locator
|
||||
The platform code describes which platform-specific format is used for the
|
||||
file locator. For Windows, a file locator is stored as a path (for example.
|
||||
"c:\disksimages\ParentDisk.vhd"). On a Macintosh system, the file locator
|
||||
is a binary large object (blob) that contains an "alias." The parent locator
|
||||
table is used to support moving hard disk images across platforms.
|
||||
Some current platform codes include the following:
|
||||
Platform Code Description
|
||||
|
@ -2439,7 +2446,7 @@ typedef struct _VHD_DynamicDiskHeader {
|
|||
*/
|
||||
uint8 PlatformCode[4];
|
||||
/*
|
||||
This field stores the number of 512-byte sectors needed to store the parent
|
||||
This field stores the number of 512-byte sectors needed to store the parent
|
||||
hard disk locator.
|
||||
*/
|
||||
uint32 PlatformDataSpace;
|
||||
|
@ -2452,12 +2459,12 @@ typedef struct _VHD_DynamicDiskHeader {
|
|||
*/
|
||||
uint32 Reserved;
|
||||
/*
|
||||
This field stores the absolute file offset in bytes where the platform
|
||||
This field stores the absolute file offset in bytes where the platform
|
||||
specific file locator data is stored.
|
||||
*/
|
||||
uint64 PlatformDataOffset;
|
||||
/*
|
||||
This field stores the absolute file offset in bytes where the platform
|
||||
This field stores the absolute file offset in bytes where the platform
|
||||
specific file locator data is stored.
|
||||
*/
|
||||
} ParentLocatorEntries[8];
|
||||
|
@ -2513,7 +2520,7 @@ return (err ? SCPE_IOERR : SCPE_OK);
|
|||
}
|
||||
|
||||
static uint32
|
||||
CalculateVhdFooterChecksum(void *data,
|
||||
CalculateVhdFooterChecksum(void *data,
|
||||
size_t size)
|
||||
{
|
||||
uint32 sum = 0;
|
||||
|
@ -2587,8 +2594,8 @@ return value;
|
|||
|
||||
static
|
||||
int
|
||||
GetVHDFooter(const char *szVHDPath,
|
||||
VHD_Footer *sFooter,
|
||||
GetVHDFooter(const char *szVHDPath,
|
||||
VHD_Footer *sFooter,
|
||||
VHD_DynamicDiskHeader *sDynamic,
|
||||
uint32 **aBAT,
|
||||
uint32 *ModifiedTimeStamp,
|
||||
|
@ -2627,10 +2634,10 @@ if (((int64)position) == -1) {
|
|||
goto Return_Cleanup;
|
||||
}
|
||||
position -= sizeof(*sFooter);
|
||||
if (ReadFilePosition(File,
|
||||
sFooter,
|
||||
sizeof(*sFooter),
|
||||
NULL,
|
||||
if (ReadFilePosition(File,
|
||||
sFooter,
|
||||
sizeof(*sFooter),
|
||||
NULL,
|
||||
position)) {
|
||||
Return = errno;
|
||||
goto Return_Cleanup;
|
||||
|
@ -2643,10 +2650,10 @@ if ((sum != saved_sum) || (memcmp("conectix", sFooter->Cookie, sizeof(sFooter->C
|
|||
Return = EINVAL; /* File Corrupt */
|
||||
goto Return_Cleanup;
|
||||
}
|
||||
if (ReadFilePosition(File,
|
||||
&sHeader,
|
||||
sizeof(sHeader),
|
||||
NULL,
|
||||
if (ReadFilePosition(File,
|
||||
&sHeader,
|
||||
sizeof(sHeader),
|
||||
NULL,
|
||||
(uint64)0)) {
|
||||
Return = errno;
|
||||
goto Return_Cleanup;
|
||||
|
@ -2666,10 +2673,10 @@ if (((NtoHl(sFooter->DiskType) == VHD_DT_Dynamic) ||
|
|||
if ((sDynamic) &&
|
||||
((NtoHl(sFooter->DiskType) == VHD_DT_Dynamic) ||
|
||||
(NtoHl(sFooter->DiskType) == VHD_DT_Differencing))) {
|
||||
if (ReadFilePosition(File,
|
||||
sDynamic,
|
||||
sizeof (*sDynamic),
|
||||
NULL,
|
||||
if (ReadFilePosition(File,
|
||||
sDynamic,
|
||||
sizeof (*sDynamic),
|
||||
NULL,
|
||||
NtoHll (sFooter->DataOffset))) {
|
||||
Return = errno;
|
||||
goto Return_Cleanup;
|
||||
|
@ -2684,10 +2691,10 @@ if ((sDynamic) &&
|
|||
}
|
||||
if (aBAT) {
|
||||
*aBAT = (uint32*) malloc(512*((sizeof(**aBAT)*NtoHl(sDynamic->MaxTableEntries)+511)/512));
|
||||
if (ReadFilePosition(File,
|
||||
*aBAT,
|
||||
sizeof (**aBAT)*NtoHl(sDynamic->MaxTableEntries),
|
||||
NULL,
|
||||
if (ReadFilePosition(File,
|
||||
*aBAT,
|
||||
sizeof (**aBAT)*NtoHl(sDynamic->MaxTableEntries),
|
||||
NULL,
|
||||
NtoHll (sDynamic->TableOffset))) {
|
||||
Return = EINVAL; /* File Corrupt */
|
||||
goto Return_Cleanup;
|
||||
|
@ -2715,10 +2722,10 @@ if ((sDynamic) &&
|
|||
Pdata = (uint8*) calloc (1, PdataSize+2);
|
||||
if (!Pdata)
|
||||
continue;
|
||||
if (ReadFilePosition(File,
|
||||
Pdata,
|
||||
PdataSize,
|
||||
NULL,
|
||||
if (ReadFilePosition(File,
|
||||
Pdata,
|
||||
PdataSize,
|
||||
NULL,
|
||||
NtoHll (sDynamic->ParentLocatorEntries[j].PlatformDataOffset))) {
|
||||
free (Pdata);
|
||||
continue;
|
||||
|
@ -2742,16 +2749,16 @@ if ((sDynamic) &&
|
|||
strncpy (CheckPath+strlen(CheckPath), ParentName, sizeof (CheckPath)-(strlen (CheckPath)+1));
|
||||
}
|
||||
VhdPathToHostPath (CheckPath, CheckPath, sizeof (CheckPath));
|
||||
if ((0 == GetVHDFooter(CheckPath,
|
||||
&sParentFooter,
|
||||
if ((0 == GetVHDFooter(CheckPath,
|
||||
&sParentFooter,
|
||||
NULL,
|
||||
NULL,
|
||||
&ParentModificationTime,
|
||||
NULL,
|
||||
NULL,
|
||||
0)) &&
|
||||
(0 == memcmp (sDynamic->ParentUniqueID, sParentFooter.UniqueID, sizeof (sParentFooter.UniqueID))) &&
|
||||
((sDynamic->ParentTimeStamp == ParentModificationTime) ||
|
||||
((NtoHl(sDynamic->ParentTimeStamp)-NtoHl(ParentModificationTime)) == 3600) ||
|
||||
((sDynamic->ParentTimeStamp == ParentModificationTime) ||
|
||||
((NtoHl(sDynamic->ParentTimeStamp)-NtoHl(ParentModificationTime)) == 3600) ||
|
||||
(sim_switches & SWMASK ('O')))) {
|
||||
strncpy (szParentVHDPath, CheckPath, ParentVHDPathSize);
|
||||
break;
|
||||
|
@ -2854,9 +2861,9 @@ static FILE *sim_vhd_disk_open (const char *szVHDPath, const char *DesiredAccess
|
|||
|
||||
if (!hVHD)
|
||||
return (FILE *)hVHD;
|
||||
Status = GetVHDFooter (szVHDPath,
|
||||
&hVHD->Footer,
|
||||
&hVHD->Dynamic,
|
||||
Status = GetVHDFooter (szVHDPath,
|
||||
&hVHD->Footer,
|
||||
&hVHD->Dynamic,
|
||||
&hVHD->BAT,
|
||||
NULL,
|
||||
hVHD->ParentVHDPath,
|
||||
|
@ -2873,9 +2880,9 @@ static FILE *sim_vhd_disk_open (const char *szVHDPath, const char *DesiredAccess
|
|||
Status = errno;
|
||||
goto Cleanup_Return;
|
||||
}
|
||||
Status = GetVHDFooter (hVHD->ParentVHDPath,
|
||||
&ParentFooter,
|
||||
&ParentDynamic,
|
||||
Status = GetVHDFooter (hVHD->ParentVHDPath,
|
||||
&ParentFooter,
|
||||
&ParentDynamic,
|
||||
NULL,
|
||||
&ParentModifiedTimeStamp,
|
||||
NULL,
|
||||
|
@ -2926,9 +2933,9 @@ static FILE *sim_vhd_disk_merge (const char *szVHDPath, char **ParentVHD)
|
|||
|
||||
if (!hVHD)
|
||||
return (FILE *)hVHD;
|
||||
if (0 != (Status = GetVHDFooter (szVHDPath,
|
||||
&hVHD->Footer,
|
||||
&hVHD->Dynamic,
|
||||
if (0 != (Status = GetVHDFooter (szVHDPath,
|
||||
&hVHD->Footer,
|
||||
&hVHD->Dynamic,
|
||||
&hVHD->BAT,
|
||||
NULL,
|
||||
hVHD->ParentVHDPath,
|
||||
|
@ -2984,11 +2991,11 @@ static FILE *sim_vhd_disk_merge (const char *szVHDPath, char **ParentVHD)
|
|||
&BytesRead,
|
||||
BlockOffset))
|
||||
break;
|
||||
if (WriteVirtualDiskSectors (Parent,
|
||||
(uint8*)BlockData,
|
||||
BlockSectors,
|
||||
&SectorsWritten,
|
||||
SectorSize,
|
||||
if (WriteVirtualDiskSectors (Parent,
|
||||
(uint8*)BlockData,
|
||||
BlockSectors,
|
||||
&SectorsWritten,
|
||||
SectorSize,
|
||||
SectorsPerBlock*BlockNumber))
|
||||
break;
|
||||
if (!sim_quiet)
|
||||
|
@ -3190,7 +3197,7 @@ if (1) { /* CHS Calculation */
|
|||
cylinderTimesHeads = totalSectors / sectorsPerTrack;
|
||||
}
|
||||
else {
|
||||
sectorsPerTrack = 17;
|
||||
sectorsPerTrack = 17;
|
||||
cylinderTimesHeads = totalSectors / sectorsPerTrack;
|
||||
|
||||
heads = (cylinderTimesHeads + 1023) / 1024;
|
||||
|
@ -3390,7 +3397,7 @@ return szHostPath;
|
|||
}
|
||||
|
||||
static VHDHANDLE
|
||||
CreateDifferencingVirtualDisk(const char *szVHDPath,
|
||||
CreateDifferencingVirtualDisk(const char *szVHDPath,
|
||||
const char *szParentVHDPath)
|
||||
{
|
||||
uint32 BytesPerSector = 512;
|
||||
|
@ -3407,12 +3414,12 @@ char *FullVHDPath = NULL;
|
|||
size_t i, RelativeMatch, UpDirectories, LocatorsWritten = 0;
|
||||
int64 LocatorPosition;
|
||||
|
||||
if ((Status = GetVHDFooter (szParentVHDPath,
|
||||
&ParentFooter,
|
||||
&ParentDynamic,
|
||||
NULL,
|
||||
if ((Status = GetVHDFooter (szParentVHDPath,
|
||||
&ParentFooter,
|
||||
&ParentDynamic,
|
||||
NULL,
|
||||
&ParentTimeStamp,
|
||||
NULL,
|
||||
NULL,
|
||||
0)))
|
||||
goto Cleanup_Return;
|
||||
hVHD = CreateVirtualDisk (szVHDPath,
|
||||
|
@ -3806,7 +3813,7 @@ while (sects) {
|
|||
BlockOffset))
|
||||
goto Fatal_IO_Error;
|
||||
/* Write just the aligned sector which contains the updated BAT entry */
|
||||
BATUpdateBufferAddress = (uint8 *)hVHD->BAT - (size_t)NtoHll(hVHD->Dynamic.TableOffset) +
|
||||
BATUpdateBufferAddress = (uint8 *)hVHD->BAT - (size_t)NtoHll(hVHD->Dynamic.TableOffset) +
|
||||
(size_t)((((size_t)&hVHD->BAT[BlockNumber+1]) - (size_t)hVHD->BAT + (size_t)NtoHll(hVHD->Dynamic.TableOffset)) & ~(VHD_DATA_BLOCK_ALIGNMENT-1));
|
||||
if (BATUpdateBufferAddress < (uint8 *)hVHD->BAT) {
|
||||
BATUpdateBufferAddress = (uint8 *)hVHD->BAT;
|
||||
|
@ -3834,14 +3841,14 @@ while (sects) {
|
|||
if (((lba/SectorsPerBlock)*SectorsPerBlock + BlockSectors) > ((uint64)NtoHll (hVHD->Footer.CurrentSize))/SectorSize)
|
||||
BlockSectors = (uint32)(((uint64)NtoHll (hVHD->Footer.CurrentSize))/SectorSize - (lba/SectorsPerBlock)*SectorsPerBlock);
|
||||
if (ReadVirtualDiskSectors(hVHD->Parent,
|
||||
(uint8*) BlockData,
|
||||
(uint8*) BlockData,
|
||||
BlockSectors,
|
||||
NULL,
|
||||
SectorSize,
|
||||
(lba/SectorsPerBlock)*SectorsPerBlock))
|
||||
goto Fatal_IO_Error;
|
||||
if (WriteVirtualDiskSectors(hVHD,
|
||||
(uint8*) BlockData,
|
||||
(uint8*) BlockData,
|
||||
BlockSectors,
|
||||
NULL,
|
||||
SectorSize,
|
||||
|
|
26
sim_ether.c
26
sim_ether.c
|
@ -2009,41 +2009,41 @@ sim_debug(dev->dbit, dev->dptr, "Determining Address Conflict for MAC address: %
|
|||
be affected by an address conflict were physically present on a single
|
||||
Ethernet cable which might have been extended by a couple of repeaters).
|
||||
Since that time, essentially no networks are single collision domains.
|
||||
Thick and thinwire Ethernet cables don’t exist and very few networks
|
||||
Thick and thinwire Ethernet cables don't exist and very few networks
|
||||
even have hubs. Today, essentially all LANs are deployed using one
|
||||
or more layers of network switches. In a switched LAN environment, the
|
||||
switches on the LAN ‘learn’ which ports on the LAN source traffic from
|
||||
switches on the LAN "learn" which ports on the LAN source traffic from
|
||||
which MAC addresses and then forward traffic destined for particular
|
||||
MAC address to the appropriate ports. If a particular MAC address is
|
||||
already in use somewhere on the LAN, then the switches ‘know’ where
|
||||
already in use somewhere on the LAN, then the switches "know" where
|
||||
it is. The host based test using the loopback protocol is poorly
|
||||
designed to detect this condition. This test is performed by the host
|
||||
first changing the device’s Physical MAC address to the address which
|
||||
first changing the device's Physical MAC address to the address which
|
||||
is to be tested, and then sending a loopback packet FROM AND TO this
|
||||
MAC address with a loopback reply to be sent by a system which may be
|
||||
currently using the MAC address. If no reply is received, then the
|
||||
MAC address is presumed to be unused. The sending of this packet will
|
||||
result in its delivery to the right system since the switch port/MAC
|
||||
address tables know where to deliver packets destined to this MAC
|
||||
address, however the response it generates won’t be delivered to the
|
||||
system performing the test since the switches on the LAN won’t know
|
||||
address, however the response it generates won't be delivered to the
|
||||
system performing the test since the switches on the LAN won't know
|
||||
about the local port being the right target for packets with this MAC
|
||||
address. A better test design to detect these conflicts would be for
|
||||
the testing system to send a loopback packet FROM the current physical
|
||||
MAC address (BEFORE changing it) TO the MAC address being tested with
|
||||
the loopback response coming to the current physical MAC address of
|
||||
the device. If a response is received, then the address is in use and
|
||||
the attempt to change the device’s MAC address should fail. Since we
|
||||
can’t change the software running in these simulators to implement this
|
||||
better conflict detection approach, we can still ‘do the right thing’
|
||||
in the sim_ether layer. We’re already handling the loopback test
|
||||
the attempt to change the device's MAC address should fail. Since we
|
||||
can't change the software running in these simulators to implement this
|
||||
better conflict detection approach, we can still "do the right thing"
|
||||
in the sim_ether layer. We're already handling the loopback test
|
||||
packets specially since we always had to avoid receiving the packets
|
||||
which were being sent, but needed to allow for the incoming loopback
|
||||
packets to be properly dealt with. We can extend this current special
|
||||
handling to change outgoing ‘loopback to self’ packets to have source
|
||||
AND loopback destination addresses in the packets to be the host NIC’s
|
||||
handling to change outgoing "loopback to self" packets to have source
|
||||
AND loopback destination addresses in the packets to be the host NIC's
|
||||
physical address. The switch network will already know the correct
|
||||
MAC/port relationship for the host NIC’s physical address, so loopback
|
||||
MAC/port relationship for the host NIC's physical address, so loopback
|
||||
response packets will be delivered as needed.
|
||||
|
||||
Code in _eth_write and _eth_callback provide the special handling to
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
#endif
|
||||
|
||||
/* cygwin dowsn't have the right features to use the threaded network I/O */
|
||||
#if defined(__CYGWIN__)
|
||||
#if defined(__CYGWIN__) || defined(__ZAURUS__) // psco added check for Zaurus platform
|
||||
#define DONT_USE_READER_THREAD
|
||||
#endif
|
||||
|
||||
|
|
|
@ -224,13 +224,14 @@ FILE *sim_fopen (const char *file, const char *mode)
|
|||
#if defined (VMS)
|
||||
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
||||
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
|
||||
#elif defined (__linux) || defined (__linux__) || defined (__hpux)
|
||||
#elif (defined (__linux) || defined (__linux__) || defined (__hpux)) && !defined (DONT_DO_LARGEFILE)
|
||||
return fopen64 (file, mode);
|
||||
#else
|
||||
return fopen (file, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined (DONT_DO_LARGEFILE)
|
||||
/* 64b VMS */
|
||||
|
||||
#if ((defined (__ALPHA) || defined (__ia64)) && defined (VMS) && (__DECC_VER >= 60590001)) || \
|
||||
|
@ -328,7 +329,7 @@ return (t_offset)(ftello64 (st));
|
|||
|
||||
/* Apple OS/X */
|
||||
|
||||
#if defined (__APPLE__) || defined (__FreeBSD__)
|
||||
#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
|
||||
#define S_SIM_IO_FSEEK_EXT_ 1
|
||||
int sim_fseeko (FILE *st, t_offset xpos, int origin)
|
||||
{
|
||||
|
@ -341,6 +342,7 @@ return (t_offset)(ftello (st));
|
|||
}
|
||||
|
||||
#endif /* end Apple OS/X */
|
||||
#endif /* !DONT_DO_LARGEFILE */
|
||||
|
||||
/* Default: no OS-specific routine has been defined */
|
||||
|
||||
|
|
12
sim_fio.h
12
sim_fio.h
|
@ -38,13 +38,17 @@
|
|||
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||
|
||||
int32 sim_finit (void);
|
||||
#if defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||
defined (_WIN32) || defined (__APPLE__) || defined (__FreeBSD__)
|
||||
#if (defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||
defined (_WIN32) || defined (__APPLE__) || \
|
||||
defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)) && !defined (DONT_DO_LARGEFILE)
|
||||
typedef t_int64 t_offset;
|
||||
#else
|
||||
typedef int32 t_offset;
|
||||
#if !defined (DONT_DO_LARGEFILE)
|
||||
#define DONT_DO_LARGEFILE 1
|
||||
#endif
|
||||
#endif
|
||||
FILE *sim_fopen (const char *file, const char *mode);
|
||||
int sim_fseek (FILE *st, t_addr offset, int whence);
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
#include ".git-commit-id.h"
|
||||
#endif
|
||||
|
||||
#if !defined(SIM_GIT_COMMIT_ID)
|
||||
#define SIM_GIT_COMMIT_ID $Format:%H$
|
||||
#endif
|
||||
|
||||
/*
|
||||
The comment section below reflects the manual editing process which was in place
|
||||
prior to the use of the git source control system on at https://gihub.com/simh/simh
|
||||
|
|
44
sim_sock.c
44
sim_sock.c
|
@ -123,11 +123,38 @@ return;
|
|||
|
||||
/* UNIX, Win32, Macintosh, VMS, OS2 (Berkeley socket) routines */
|
||||
|
||||
static struct sock_errors {
|
||||
int32 value;
|
||||
char *text;
|
||||
} sock_errors[] = {
|
||||
{WSAEWOULDBLOCK, "Operation would block"},
|
||||
{WSAENAMETOOLONG, "File name too long"},
|
||||
{WSAEINPROGRESS, "Operation now in progress "},
|
||||
{WSAETIMEDOUT, "Connection timed out"},
|
||||
{WSAEISCONN, "Transport endpoint is already connected"},
|
||||
{WSAECONNRESET, "Connection reset by peer"},
|
||||
{WSAECONNREFUSED, "Connection refused"},
|
||||
{WSAEHOSTUNREACH, "No route to host"},
|
||||
{WSAEADDRINUSE, "Address already in use "},
|
||||
{WSAEACCES, "Permission denied"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
SOCKET sim_err_sock (SOCKET s, char *emsg, int32 flg)
|
||||
{
|
||||
int32 err = WSAGetLastError ();
|
||||
int32 i;
|
||||
|
||||
printf ("Sockets: %s error %d\n", emsg, err);
|
||||
for (i=0; (sock_errors[i].text) && (sock_errors[i].value != err); i++)
|
||||
;
|
||||
|
||||
if (sock_errors[i].value == err)
|
||||
printf ("Sockets: %s error %d - %s\n", emsg, err, sock_errors[i].text);
|
||||
else
|
||||
printf ("Sockets: %s error %d\n", emsg, err);
|
||||
sim_close_sock (s, flg);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
@ -735,6 +762,18 @@ if (preferred->ai_family == AF_INET6) {
|
|||
sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off));
|
||||
}
|
||||
#endif
|
||||
if (sim_switches & SWMASK ('U')) {
|
||||
int on = TRUE;
|
||||
|
||||
sta = setsockopt (newsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on));
|
||||
}
|
||||
#if defined (SO_EXCLUSIVEADDRUSE)
|
||||
else {
|
||||
int on = TRUE;
|
||||
|
||||
sta = setsockopt (newsock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&on, sizeof(on));
|
||||
}
|
||||
#endif
|
||||
sta = bind (newsock, preferred->ai_addr, preferred->ai_addrlen);
|
||||
p_freeaddrinfo(result);
|
||||
if (sta == SOCKET_ERROR) /* bind error? */
|
||||
|
@ -864,11 +903,12 @@ if (rd)
|
|||
else select ((int) sock + 1, NULL, rw_p, er_p, &tz);
|
||||
if (FD_ISSET (sock, er_p))
|
||||
return -1;
|
||||
if (FD_ISSET (sock, rw_p))
|
||||
if (FD_ISSET (sock, rw_p)) {
|
||||
if (0 == getpeername (sock, (struct sockaddr *)&peername, &peernamesize))
|
||||
return 1;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,12 @@
|
|||
#define WSAENAMETOOLONG ENAMETOOLONG
|
||||
#define WSAEINPROGRESS EINPROGRESS
|
||||
#define WSAETIMEDOUT ETIMEDOUT
|
||||
#define WSAEISCONN EISCONN
|
||||
#define WSAECONNRESET ECONNRESET
|
||||
#define WSAECONNREFUSED ECONNREFUSED
|
||||
#define WSAEHOSTUNREACH EHOSTUNREACH
|
||||
#define WSAEADDRINUSE EADDRINUSE
|
||||
#define WSAEACCES EACCES
|
||||
#define INVALID_SOCKET ((SOCKET)-1)
|
||||
#define SOCKET_ERROR -1
|
||||
#include <sys/types.h> /* for fcntl, getpid */
|
||||
|
|
|
@ -180,7 +180,7 @@ return sim_os_msec() - start_time;
|
|||
|
||||
const t_bool rtc_avail = TRUE;
|
||||
|
||||
uint32 sim_os_msec ()
|
||||
uint32 sim_os_msec (void)
|
||||
{
|
||||
uint32 quo, htod, tod[2];
|
||||
int32 i;
|
||||
|
@ -260,7 +260,7 @@ return 0;
|
|||
|
||||
const t_bool rtc_avail = TRUE;
|
||||
|
||||
uint32 sim_os_msec ()
|
||||
uint32 sim_os_msec (void)
|
||||
{
|
||||
if (sim_idle_rate_ms)
|
||||
return timeGetTime ();
|
||||
|
@ -330,7 +330,7 @@ return 0;
|
|||
|
||||
const t_bool rtc_avail = FALSE;
|
||||
|
||||
uint32 sim_os_msec ()
|
||||
uint32 sim_os_msec (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ return 0;
|
|||
|
||||
const t_bool rtc_avail = TRUE;
|
||||
|
||||
uint32 sim_os_msec ()
|
||||
uint32 sim_os_msec (void)
|
||||
{
|
||||
struct timeval cur;
|
||||
struct timezone foo;
|
||||
|
|
133
sim_tmxr.c
133
sim_tmxr.c
|
@ -65,6 +65,7 @@
|
|||
|
||||
tmxr_poll_conn - poll for connection
|
||||
tmxr_reset_ln - reset line (drops Telnet/tcp and serial connections)
|
||||
tmxr_detach_ln - reset line and close per line listener and outgoing destination
|
||||
tmxr_getc_ln - get character for line
|
||||
tmxr_poll_rx - poll receive
|
||||
tmxr_putc_ln - put character for line
|
||||
|
@ -369,7 +370,15 @@
|
|||
#define TNS_CRPAD 005 /* CR padding */
|
||||
#define TNS_DO 006 /* DO request pending rejection */
|
||||
|
||||
|
||||
static BITFIELD tmxr_modem_bits[] = {
|
||||
BIT(DTR), /* Data Terminal Ready */
|
||||
BIT(RTS), /* Request To Send */
|
||||
BIT(DCD), /* Data Carrier Detect */
|
||||
BIT(RNG), /* Ring Indicator */
|
||||
BIT(CTS), /* Clear To Send */
|
||||
BIT(DSR), /* Data Set Ready */
|
||||
ENDBITS
|
||||
};
|
||||
|
||||
/* Local routines */
|
||||
|
||||
|
@ -395,6 +404,8 @@ if (!lp->txbfd) /* if not buffered */
|
|||
lp->txbpr = lp->txbpi = lp->txcnt = 0; /* init transmit indexes */
|
||||
memset (lp->rbr, 0, TMXR_MAXBUF); /* clear break status array */
|
||||
lp->txdrp = 0;
|
||||
if (lp->mp->modem_control)
|
||||
lp->modembits = TMXR_MDM_CTS | TMXR_MDM_DSR;
|
||||
if (!lp->mp->buffered) {
|
||||
lp->txbfd = 0;
|
||||
lp->txbsz = TMXR_MAXBUF;
|
||||
|
@ -751,15 +762,15 @@ if (mp->last_poll_time == 0) { /* first poll initializa
|
|||
for (i=0; i < mp->lines; i++) {
|
||||
uptr = mp->ldsc[i].uptr ? mp->ldsc[i].uptr : mp->uptr;
|
||||
|
||||
if (!(mp->uptr->dynflags & TMUF_NOASYNCH)) { /* if asynch not disabled */
|
||||
uptr->dynflags |= UNIT_TM_POLL; /* tag as polling unit */
|
||||
if (!(mp->uptr->dynflags & TMUF_NOASYNCH)) { /* if asynch not disabled */
|
||||
uptr->dynflags |= UNIT_TM_POLL; /* tag as polling unit */
|
||||
sim_cancel (uptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((poll_time - mp->last_poll_time) < TMXR_CONNECT_POLL_INTERVAL)
|
||||
return -1; /* too soon to try */
|
||||
return -1; /* too soon to try */
|
||||
|
||||
tmxr_debug_trace (mp, "tmxr_poll_conn()");
|
||||
|
||||
|
@ -891,6 +902,13 @@ for (i = 0; i < mp->lines; i++) { /* check each line in se
|
|||
lp->conn = TRUE;
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Check for needed outgoing connection initiation */
|
||||
|
||||
if (lp->destination && (!lp->sock) && (!lp->connecting) && (!lp->serport) &&
|
||||
(!mp->modem_control || (lp->modembits & TMXR_MDM_DTR)))
|
||||
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||
|
||||
}
|
||||
|
||||
return -1; /* no new connections made */
|
||||
|
@ -946,7 +964,8 @@ lp->ipad = NULL;
|
|||
if ((lp->destination) && (!lp->serport)) {
|
||||
if (lp->connecting)
|
||||
sim_close_sock (lp->connecting, 0);
|
||||
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||
if ((!lp->mp->modem_control) || (lp->modembits & TMXR_MDM_DTR))
|
||||
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||
}
|
||||
tmxr_init_line (lp); /* initialize line state */
|
||||
/* Revise the unit's connect string to reflect the current attachments */
|
||||
|
@ -1055,7 +1074,7 @@ return SCPE_OK;
|
|||
*/
|
||||
t_stat tmxr_set_get_modem_bits (TMLN *lp, int32 bits_to_set, int32 bits_to_clear, int32 *incoming_bits)
|
||||
{
|
||||
int32 changed_modem_bits;
|
||||
int32 before_modem_bits, incoming_state;
|
||||
|
||||
tmxr_debug_trace_line (lp, "tmxr_set_get_modem_bits()");
|
||||
|
||||
|
@ -1063,28 +1082,38 @@ if ((bits_to_set & ~(TMXR_MDM_OUTGOING)) || /* Assure only settable bits
|
|||
(bits_to_clear & ~(TMXR_MDM_OUTGOING)) ||
|
||||
(bits_to_set & bits_to_clear)) /* and can't set and clear the same bits */
|
||||
return SCPE_ARG;
|
||||
changed_modem_bits = lp->modembits;
|
||||
before_modem_bits = lp->modembits;
|
||||
lp->modembits |= bits_to_set;
|
||||
lp->modembits &= bits_to_clear;
|
||||
changed_modem_bits ^= lp->modembits;
|
||||
if (incoming_bits) {
|
||||
if ((lp->sock) || (lp->serport)) {
|
||||
if (lp->modembits & TMXR_MDM_DTR)
|
||||
*incoming_bits = TMXR_MDM_DCD | TMXR_MDM_CTS | TMXR_MDM_DSR;
|
||||
else
|
||||
*incoming_bits = TMXR_MDM_RNG | TMXR_MDM_DCD | TMXR_MDM_CTS | TMXR_MDM_DSR;
|
||||
}
|
||||
lp->modembits &= ~(bits_to_clear | TMXR_MDM_INCOMING);
|
||||
if ((lp->sock) || (lp->serport)) {
|
||||
if (lp->modembits & TMXR_MDM_DTR)
|
||||
incoming_state = TMXR_MDM_DCD | TMXR_MDM_CTS | TMXR_MDM_DSR;
|
||||
else
|
||||
*incoming_bits = (lp->mp && lp->mp->master) ? (TMXR_MDM_CTS | TMXR_MDM_DSR) : 0;
|
||||
incoming_state = TMXR_MDM_RNG | TMXR_MDM_DCD | TMXR_MDM_CTS | TMXR_MDM_DSR;
|
||||
}
|
||||
else
|
||||
incoming_state = (lp->mp && lp->mp->master) ? (TMXR_MDM_CTS | TMXR_MDM_DSR) : 0;
|
||||
lp->modembits |= incoming_state;
|
||||
if (sim_deb && lp->mp && lp->mp->dptr) {
|
||||
sim_debug_bits (TMXR_DBG_MDM, lp->mp->dptr, tmxr_modem_bits, before_modem_bits, lp->modembits, FALSE);
|
||||
sim_debug (TMXR_DBG_MDM, lp->mp->dptr, " - Line %d\n", (int)(lp-lp->mp->ldsc));
|
||||
}
|
||||
if (incoming_bits)
|
||||
*incoming_bits = incoming_state;
|
||||
if (lp->mp && lp->mp->modem_control) { /* This API ONLY works on modem_control enabled multiplexers */
|
||||
if (bits_to_set | bits_to_clear) { /* Anything to do? */
|
||||
if (lp->serport)
|
||||
return sim_control_serial (lp->serport, bits_to_set, bits_to_clear, incoming_bits);
|
||||
if (lp->sock) {
|
||||
if ((lp->sock) || (lp->connecting)) {
|
||||
if (bits_to_clear&TMXR_MDM_DTR) /* drop DTR? */
|
||||
tmxr_reset_ln (lp);
|
||||
}
|
||||
else {
|
||||
if ((lp->destination) && /* Virtual Null Modem Cable */
|
||||
((bits_to_set ^ before_modem_bits) & /* and DTR being Raised */
|
||||
TMXR_MDM_DTR))
|
||||
lp->connecting = sim_connect_sock (lp->destination, "localhost", NULL);
|
||||
}
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -1476,6 +1505,13 @@ if (lp->serport) { /* close current serial connection *
|
|||
}
|
||||
}
|
||||
|
||||
t_stat tmxr_detach_ln (TMLN *lp)
|
||||
{
|
||||
tmxr_debug_trace_line (lp, "tmxr_detaach_ln()");
|
||||
_mux_detach_line (lp, TRUE, TRUE);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Open a master listening socket (and all of the other variances of connections).
|
||||
|
||||
A listening socket for the port number described by "cptr" is opened for the
|
||||
|
@ -1528,7 +1564,7 @@ while (*tptr) {
|
|||
if (0 == MATCH_CMD (gbuf, "LINE")) {
|
||||
if ((NULL == cptr) || ('\0' == *cptr))
|
||||
return SCPE_ARG;
|
||||
nextline = (int32) get_uint (cptr, 10, mp->lines, &r);
|
||||
nextline = (int32) get_uint (cptr, 10, mp->lines-1, &r);
|
||||
if ((r != SCPE_OK) || (mp->lines == 1))
|
||||
return SCPE_ARG;
|
||||
break;
|
||||
|
@ -2561,18 +2597,11 @@ return SCPE_OK;
|
|||
|
||||
t_stat tmxr_attach_ex (TMXR *mp, UNIT *uptr, char *cptr, t_bool async)
|
||||
{
|
||||
char* tptr = NULL;
|
||||
t_stat r;
|
||||
|
||||
tptr = (char *) calloc (1, 1);
|
||||
|
||||
if (tptr == NULL) /* no more mem? */
|
||||
return SCPE_MEM;
|
||||
r = tmxr_open_master (mp, cptr); /* open master socket */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
free (tptr); /* release buf */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
return r;
|
||||
}
|
||||
mp->uptr = uptr; /* save unit for polling */
|
||||
uptr->filename = _mux_attach_string (uptr->filename, mp);/* save */
|
||||
uptr->flags = uptr->flags | UNIT_ATT; /* no more errors */
|
||||
|
@ -2627,18 +2656,27 @@ else {
|
|||
fprintf(st, ", ");
|
||||
}
|
||||
tmxr_show_summ(st, NULL, 0, mp);
|
||||
fprintf(st, ", sessions=%d\n", mp->sessions);
|
||||
fprintf(st, ", sessions=%d", mp->sessions);
|
||||
if (mp->modem_control)
|
||||
fprintf(st, ", ModemControl=enabled");
|
||||
if (mp->notelnet)
|
||||
fprintf(st, ", Telnet=disabled");
|
||||
fprintf(st, "\n");
|
||||
for (j = 0; j < mp->lines; j++) {
|
||||
lp = mp->ldsc + j;
|
||||
if (mp->lines > 1) {
|
||||
fprintf (st, "Line: %d", j);
|
||||
if (mp->notelnet != lp->notelnet)
|
||||
fprintf (st, " - %telnet", lp->notelnet ? "no" : "");
|
||||
if (lp->uptr && (lp->uptr != lp->mp->uptr))
|
||||
fprintf (st, " - Unit: %s\n", sim_uname (lp->uptr));
|
||||
else
|
||||
fprintf (st, "\n");
|
||||
fprintf (st, " - Unit: %s", sim_uname (lp->uptr));
|
||||
fprintf (st, "\n");
|
||||
}
|
||||
if ((!lp->sock) && (!lp->connecting) && (!lp->serport) && (!lp->master))
|
||||
if ((!lp->sock) && (!lp->connecting) && (!lp->serport) && (!lp->master)) {
|
||||
if (mp->modem_control)
|
||||
tmxr_fconns (st, lp, -1);
|
||||
continue;
|
||||
}
|
||||
tmxr_fconns (st, lp, -1);
|
||||
tmxr_fstats (st, lp, -1);
|
||||
}
|
||||
|
@ -2672,17 +2710,17 @@ for (i = 0; i < mp->lines; i++) { /* loop thru conn */
|
|||
tmxr_report_disconnection (lp); /* report disconnection */
|
||||
tmxr_reset_ln (lp);
|
||||
}
|
||||
if (lp->connecting) {
|
||||
lp->sock = lp->connecting;
|
||||
lp->connecting = 0;
|
||||
tmxr_reset_ln (lp);
|
||||
}
|
||||
if (lp->serport) {
|
||||
sim_control_serial (lp->serport, 0, TMXR_MDM_DTR|TMXR_MDM_RTS, NULL);/* drop DTR and RTS */
|
||||
tmxr_close_ln (lp);
|
||||
}
|
||||
free (lp->destination);
|
||||
lp->destination = NULL;
|
||||
if (lp->connecting) {
|
||||
lp->sock = lp->connecting;
|
||||
lp->connecting = 0;
|
||||
tmxr_reset_ln (lp);
|
||||
}
|
||||
lp->conn = FALSE;
|
||||
}
|
||||
if (lp->master) {
|
||||
|
@ -2984,6 +3022,15 @@ if (lp->cnms) {
|
|||
else
|
||||
fprintf (st, " Line disconnected\n");
|
||||
|
||||
if (lp->mp->modem_control) {
|
||||
fprintf (st, " Modem Bits: %s%s%s%s%s%s\n", (lp->modembits & TMXR_MDM_DTR) ? "DTR " : "",
|
||||
(lp->modembits & TMXR_MDM_RTS) ? "RTS " : "",
|
||||
(lp->modembits & TMXR_MDM_DCD) ? "DCD " : "",
|
||||
(lp->modembits & TMXR_MDM_RNG) ? "RNG " : "",
|
||||
(lp->modembits & TMXR_MDM_CTS) ? "CTS " : "",
|
||||
(lp->modembits & TMXR_MDM_DSR) ? "DSR " : "");
|
||||
}
|
||||
|
||||
if ((lp->serport == 0) && (lp->sock))
|
||||
fprintf (st, " %s\n", (lp->notelnet) ? "Telnet disabled (RAW data)" : "Telnet protocol");
|
||||
if (lp->txlog)
|
||||
|
@ -3347,11 +3394,15 @@ int32 i, any;
|
|||
if (mp == NULL)
|
||||
return SCPE_IERR;
|
||||
for (i = any = 0; i < mp->lines; i++) {
|
||||
if ((mp->ldsc[i].sock != 0) || (mp->ldsc[i].serport != 0)) {
|
||||
any++;
|
||||
if ((mp->ldsc[i].sock != 0) ||
|
||||
(mp->ldsc[i].serport != 0) || mp->modem_control) {
|
||||
if ((mp->ldsc[i].sock != 0) || (mp->ldsc[i].serport != 0))
|
||||
any++;
|
||||
if (val)
|
||||
tmxr_fconns (st, &mp->ldsc[i], i);
|
||||
else tmxr_fstats (st, &mp->ldsc[i], i);
|
||||
else
|
||||
if ((mp->ldsc[i].sock != 0) || (mp->ldsc[i].serport != 0))
|
||||
tmxr_fstats (st, &mp->ldsc[i], i);
|
||||
}
|
||||
}
|
||||
if (any == 0)
|
||||
|
@ -3373,7 +3424,7 @@ return SCPE_OK;
|
|||
|
||||
|
||||
static struct {
|
||||
char value;
|
||||
u_char value;
|
||||
char *name;
|
||||
} tn_chars[] =
|
||||
{
|
||||
|
|
10
sim_tmxr.h
10
sim_tmxr.h
|
@ -66,10 +66,11 @@ typedef int SERHANDLE;
|
|||
#define TMXR_DTR_DROP_TIME 500 /* milliseconds to drop DTR for 'pseudo' modem control */
|
||||
#define TMXR_CONNECT_POLL_INTERVAL 1000 /* milliseconds between connection polls */
|
||||
|
||||
#define TMXR_DBG_XMT 0x10000 /* Debug Transmit Data */
|
||||
#define TMXR_DBG_RCV 0x20000 /* Debug Received Data */
|
||||
#define TMXR_DBG_ASY 0x40000 /* Debug Asynchronous Activities */
|
||||
#define TMXR_DBG_TRC 0x80000 /* Debug trace routine calls */
|
||||
#define TMXR_DBG_XMT 0x010000 /* Debug Transmit Data */
|
||||
#define TMXR_DBG_RCV 0x020000 /* Debug Received Data */
|
||||
#define TMXR_DBG_MDM 0x040000 /* Debug Modem Signals */
|
||||
#define TMXR_DBG_ASY 0x080000 /* Debug Asynchronous Activities */
|
||||
#define TMXR_DBG_TRC 0x100000 /* Debug trace routine calls */
|
||||
|
||||
/* Modem Control Bits */
|
||||
|
||||
|
@ -151,6 +152,7 @@ struct tmxr {
|
|||
|
||||
int32 tmxr_poll_conn (TMXR *mp);
|
||||
t_stat tmxr_reset_ln (TMLN *lp);
|
||||
t_stat tmxr_detach_ln (TMLN *lp);
|
||||
int32 tmxr_getc_ln (TMLN *lp);
|
||||
void tmxr_poll_rx (TMXR *mp);
|
||||
t_stat tmxr_putc_ln (TMLN *lp, int32 chr);
|
||||
|
|
Loading…
Add table
Reference in a new issue