Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconstruct Comanche 044 from Comanche 051 #1134

Closed
thewonderidiot opened this issue Dec 4, 2020 · 38 comments
Closed

Reconstruct Comanche 044 from Comanche 051 #1134

thewonderidiot opened this issue Dec 4, 2020 · 38 comments
Assignees

Comments

@thewonderidiot
Copy link
Collaborator

thewonderidiot commented Dec 4, 2020

Branch

comanche044

Changed Bugger Words from Closest Program (Comanche 051)

Bugger word mismatch in bank 02; actual 51322 != expected 73065 (diff = 21543)
Bugger word mismatch in bank 01; actual 50017 != expected 50116 (diff = 00077)
Bugger word mismatch in bank 04; actual 53747 != expected 62734 (diff = 06765)
Bugger word mismatch in bank 05; actual 74460 != expected 74466 (diff = 00006)
Bugger word mismatch in bank 06; actual 63024 != expected 63035 (diff = 00011)
Bugger word mismatch in bank 07; actual 73341 != expected 73403 (diff = 00042)
Bugger word mismatch in bank 11; actual 44621 != expected 44661 (diff = 00040)
Bugger word mismatch in bank 12; actual 51003 != expected 51215 (diff = 00212)
Bugger word mismatch in bank 13; actual 74727 != expected 74770 (diff = 00041)
Bugger word mismatch in bank 14; actual 56756 != expected 47777 (diff = 06757)
Bugger word mismatch in bank 15; actual 67323 != expected 70265 (diff = 00742)
Bugger word mismatch in bank 16; actual 55656 != expected 70262 (diff = 12404)
Bugger word mismatch in bank 17; actual 65302 != expected 50463 (diff = 14617)
Bugger word mismatch in bank 20; actual 77241 != expected 77251 (diff = 00010)
Bugger word mismatch in bank 22; actual 65672 != expected 47471 (diff = 16201)
Bugger word mismatch in bank 24; actual 55773 != expected 56001 (diff = 00006)
Bugger word mismatch in bank 25; actual 72651 != expected 72660 (diff = 00007)
Bugger word mismatch in bank 26; actual 64710 != expected 51445 (diff = 13243)
Bugger word mismatch in bank 30; actual 40077 != expected 40124 (diff = 00025)
Bugger word mismatch in bank 31; actual 66412 != expected 66431 (diff = 00017)
Bugger word mismatch in bank 32; actual 66036 != expected 65511 (diff = 00325)
Bugger word mismatch in bank 33; actual 54404 != expected 54370 (diff = 00014)
Bugger word mismatch in bank 34; actual 52350 != expected 52401 (diff = 00031)
Bugger word mismatch in bank 35; actual 72661 != expected 60005 (diff = 12654)
Bugger word mismatch in bank 36; actual 77660 != expected 41504 (diff = 36154)
Bugger word mismatch in bank 37; actual 73017 != expected 66760 (diff = 04037)
Bugger word mismatch in bank 40; actual 62422 != expected 41412 (diff = 21010)
Bugger word mismatch in bank 41; actual 04445 != expected 70442 (diff = 63775)
Bugger word mismatch in bank 42; actual 77543 != expected 41156 (diff = 36365)
Bugger word mismatch in bank 43; actual 02714 != expected 02716 (diff = 00002)
make: *** [Makefile:21: diffComanche044sums] Error 30

Known Differences

  • Reduction of P34/P35 Run Time. This involved lots of use of NN, which should all be removed. Comanche 45 should work just like Colossus 249 here.
  • Display Change for Entry Programs P64 and P65 (Comanche 51 introduced N74).
  • Change from 1968/1969 Ephemeris Data to 1969/1970 Ephemeris Data
  • Modify V67 Loads and Display to ft and ft/sec
  • N99 changed from NM to feet in R1
  • Short SPS burn constants were fully moved to erasable. In Comanche 044, only EK1VAL and FANG were in erasable. K1VAL and K2VAL were still in fixed.
  • N55 changed (Comanche 44 should be the same as Colossus 249)
  • STARSAV3 was introduced in Comanche 51 to resolve an erasable conflict. Noun 88 and things referencing it changed from using STAR to using STARSAV3.
  • Changed Selective Max RCS Rate from 4°/s to 2°/s (last two numbers in MANTABLE).
  • TVC DAP initial errors, CSM alone. This one is more ambiguous, but there are some helpful asterisks present.

Resources

Notes

There's very, very few asterisks in the Comanche 55 listing. I think at least one of the subroutine differences may have been deletions, rather than changes/additions. Some of the changes between 44 and 51 are masked by the changes made from 51 to 55 (addition of the R-2 lunar potential model), and others are masked by changes in close proximity in the revisions between 44 and 51.

There is a very large number of banks that changed (30!), but I think this number is misleading. Most of the banks only have very small differences in the bugger words, which suggests that the code in those banks didn't change, but rather offsets in a bank they reference changed.

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 5, 2020

ALARM AND ABORT

The following chunk of three DOWNFLAGs was added between C44 and C51:

		TC	DOWNFLAG
		ADRES	STATEFLG
		
		TC	DOWNFLAG
		ADRES	REINTFLG
		
		TC	DOWNFLAG
		ADRES	NODOFLAG

As shown by Norton:
image

This mirrors the addition of the FLAGS subroutine between Luminary 69 and 99. Removing these completely corrects fixed memory.

@thewonderidiot
Copy link
Collaborator Author

PINBALL GAME BUTTONS AND LIGHTS

A BANKCALL to CHKPOOH was added to the beginning of VBTSTLTS. Removing it resolves bank 41.
image

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 5, 2020

P20-P25

The WWPOS and WWVEL limiting in V6N99INP and V67XXX in Comanche 44 match Colossus 249. It makes use of 1/SQRT3 instead of FT99999.

V6N99INP	DLOAD	DMP
			WWPOS
			1/SQRT3
		LXA,1	DLOAD
			MPAC
			WWVEL
		DMP	LXA,2
			1/SQRT3
			MPAC
V67XXX		LXA,1	SXA,1
			S2
			QPRET
		EXIT
		TC	POSTJUMP
		CADR	INTWAKE
V06N99A		VN	0699
1/SQRT3		2DEC	0.5773502
V67DEC2		2DEC	2 B-14

Implementing the above completely resolves bank 40.
image

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 5, 2020

PINBALL NOUN TABLES

Three major changes were made to the noun tables between Comanche 44 and 51:

  • Noun 74 was added (it was SPARE in 45)
  • POSITION9 (used in Noun 99) was changed from XXX.XX NAUT MI using DP4 to XXXXX. FT using DP3. The input and output scale factors were changed accordingly.
  • Noun 88 was changed to use STARSAV3 instead of STAR. However, unlike Colossus 249, it appears that this noun was already DPFRAC instead of FRAC.

These changes all together resolve bank 42.

@thewonderidiot
Copy link
Collaborator Author

P61-P67

V06N68 was changed to V06N74. The Comanche 44 implementation exactly matches Colossus 249.

@thewonderidiot
Copy link
Collaborator Author

STAR TABLES

This log section exactly matches Colossus 249.

@thewonderidiot
Copy link
Collaborator Author

PLANETARY INERTIAL ORIENTATION

COSI, SINI, NODDOT, FDOT, BDOT, NODIO, FSUBO, BSUBO, and WEARTH all have their Colossus 249 values.

@thewonderidiot
Copy link
Collaborator Author

STABLE ORBIT - P38-P39

The following three words to set NN to 2 were added to P78 between Comanche 44 and 51:

		SSP
		        NN
		        2

image

@thewonderidiot
Copy link
Collaborator Author

P34-P35, P74-P75

There are a lot of changes in this section relating to using NN instead of constants. Furthermore, DISPLAYE was changed to use GOFLASH instead of GOFLASHR.

The setting of NN in P34/P74A was added between 44 and 51 and must be removed:

		TC	INTPRET
		SSP	EXIT
			NN
			0

image

DISPLAYE changed from using GOFLASH to using GOFLASHR between 44 and 51, and lost its blanking of R1. The Comanche 44 implementation matches Colossus 249:

DISPLAYE	EXTEND
		QXCH	NORMEX
		CAF	V06N55
		TCR	BANKCALL
		CADR	GOFLASHR
		TCF	GOTOPOOH
		TC	NORMEX
		TCF	-5
		CAF	BIT1		# BLANK R1
		TCR	BLANKET
		TCF	ENDOFJOB

image

The implementation of S34/35.2 similarly matches Colossus 249. Comanche 51 got some conditional logic here based on the value of NN that must be removed.

S34/35.2 	STQ	VLOAD
			SUBEXIT
			VPASS3
		PDVL	PDDL
			RPASS3
			INTIME
		PDDL	PDDL
			TPASS4
			ZEROVECS
		PUSH	CALL
			INTINT		# GET TARGET VECTOR
S3435.25	STOVL	RTARG

I believe that Norton shows this here, although he seems to be simplifying what's happening by quite a bit:
image

A bit further down in NOPIE, Comanche 44 references DECTWO instead of NN, again mirroring Colossus 249:

		SLOAD	SETPD
			DECTWO
			0D
		PDDL	PDVL
			EPSFOUR

image

There's one more change in this file that I don't have direct evidence for but believe also happened. If all of the above changes for NN are applied to the Colossus 249 memory layout, bank 35 ends up overflowing. It appears the Colossus team worked around this by moving S34/35.1 into bank 36 via the new tag "S3435LOC". For Colossus 44, we can therefore remove the lines

		SETLOC	S3435LOC
		BANK

before S34/35.1 and the lines

		SETLOC	CSI/CDH
		BANK

after it.

@thewonderidiot
Copy link
Collaborator Author

TAGS FOR RELATIVE SETLOC AND BLANK BANK CARDS

As mentioned for P34-P35, P74-P75, the tag S3435LOC was added to make room in bank 35 for the new NN stuff. This should be removed for Comanche 44.

@thewonderidiot
Copy link
Collaborator Author

GROUND TRACKING DETERMINATION PROGRAM - P21

In P21VSAVE, a shift was apparently added, changing

		STORE	P21BASEV	# ..VEL B-7  OR B-5
		ABVAL	
		STOVL	P21VEL		# /VEL/ FOR N73 DSP

to

		STORE	P21BASEV	# ..VEL B-7  OR B-5
		ABVAL	SL*
			0,2
		STOVL	P21VEL		# /VEL/ FOR N73 DSP

This code doesn't exist in Colossus 249, so there's nothing to compare against directly. Norton shows the change here like this:
image

While that could mean a lot of things, deleting the shift entirely drastically improves bank alignment, so it seems pretty clear this is what happened.

@thewonderidiot
Copy link
Collaborator Author

P30,P37

At this point in the reconstruction, it's possible to start using inter-bank references for banks with low differences to try to pinpoint offset errors in other banks. Doing this with the upper banks identifies a possible offset in P30,P37, and a diff between Colossus 249 and Comanche 55 turns up the following INHINT in COMPTGO:

		TS	NVWORD1
		INHINT
		CAF	ONE
		TC	WAITLIST
		EBANK=	TIG
		2CADR	CLOKTASK

Colossus has this INHINT, while Comanche 55 does not. While Norton doesn't show this as a change, adding the INHINT back in greatly improves the alignment for a lot of banks.

@thewonderidiot
Copy link
Collaborator Author

RCS-CSM DIGITAL AUTOPILOT

The max rate entries of MANTABLE were changed from 4 deg/s to 2 deg/s between 44 and 51. These need to be taken back to their Colossus 249 values.

MANTABLE	DEC	.0071111
		DEC	-.0071111
		DEC	.028444
		DEC	-0.028444
		DEC	.071111
		DEC	-.071111
		DEC	.568889
		DEC	-.568889

image

@thewonderidiot
Copy link
Collaborator Author

GIMBAL LOCK AVOIDANCE

As above, the final entry of ARATE was changed from 4 deg/s to 2 deg/s. This, too, should match Colossus 249.

ARATE		2DEC	.0022222222	# = .05 DEG/SEC

		2DEC	.0088888889	# = .2 DEG/SEC
		
		2DEC	.0222222222	# = .5 DEG/SEC
		
		2DEC	.1777777777	# = 4 DEG/SEC		$ 22.5 DEG/SEC

image

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 5, 2020

P11

Between C45 and C51, the following chunk of code was moved from REP11A to MATRXJOB:

		ZL			# STORE DP GIMBAL
		CA	CDUX		# ANGLES FOR ATTITUDE
		DXCH	OGC		# ERROR DISPLAY
		ZL			# AFTER L.O.
		CA	CDUY
		DXCH	IGC
		ZL
		CA	CDUZ
		DXCH	MGC
		TC	INTPRET		#	-
		VLOAD	VSR1		# SCALE OGC B-1
			OGC
		STORE	OGC

image

Moving it back resolves bank 34. The coding matches Colossus 249.

@thewonderidiot
Copy link
Collaborator Author

P51-P53

The following chunk of code was moved from P51A to P51B between revs 44 and 51:

		TC	INTPRET
		RTB	VLOAD
			SET1/PDT
			ZEROVEC
		STORE	GCOMP
		SET	EXIT
			DRIFTFLG

The coding in both locations matches Colossus 249.
image
image

The display logic in R56A changed slightly between 44 and 51, with the addition of the new R56A1 label. The coding here also matches Colossus 249.

		CAF	VB53		# DISPLAY V53 REQUESTING ALTERNATE MARK
		TC	BANKCALL
		CADR	GOMARK2
		TCF	GOTOPOOH	# V34-TERMINATE
		TCF	R56A +2		# V33-DONT PROCEED - JUST ENTER TO MARK

image

Finally, in Comanche 44, PLANET used STAR instead of STARSAV3.

		VLOAD	VXSC
			STAR
			1/SQR3
		UNIT	GOTO
			CORPLAN			

image

@thewonderidiot
Copy link
Collaborator Author

P40-P47

The following chunk of code in S40.1 was (part of) the change between revs 44 and 45, so it must be removed:

		VLOAD	ABVAL		# EXTERNAL DELTA-V
			DELVSIN
		STORE	DELVSAB		# COMPUTE FOR P30/P40 INTERFACE
					#	THUS PERMITTING MODULE-ONLY CHANGE

Just below that, an asterisk marks where a DMP was changed to a DMPR between revs 45 and 51:
image

In S40.130, Comanche 44 represents a halfway-point for moving of the engine parameters K1VAL, K2VAL, K3VAL, and FANG to be padloads. Specifically, K1VAL and FANG were made into padloads for Comanche 44, but K2VAL and K3VAL remained as fixed memory constants. To complicate matters a bit, their value was changed from the Colossus 249 values. Luckily the Comanche 44 values are shown in the GSOP, and @indy91 calcluated new constants from them, as follows:

K1VAL		=	EK1VAL		# DP PAD LOAD B+23 NEWTON-SEC/E+2
K2VAL		2DEC	222.411081 B-23	#  5000 LB-SEC, SC.AT B+23 NEWTON-SEC/E+2
K3VAL		2DEC	11.3429651 B-9	# 25500 LBS, SC.AT B+9 NEWTONS/E+4

@thewonderidiot
Copy link
Collaborator Author

TVCINITIALIZE

Here's where we start to get into the more speculative work. Changes were made to TVCINITIALIZE, and summed up with the unhelpful PCR title "TVC DAP initial errors, CSM alone".

Norton shows the changes as follows:
image

At first glance it seems like perhaps this entire chunk might have been added, but deleting it wholesale changes the remaining bugger words after making all of the above changes from this:

Bugger word mismatch in bank 16; actual 50022 != expected 70262 (diff = 20240)
Bugger word mismatch in bank 17; actual 45613 != expected 50463 (diff = 02650)
Bugger word mismatch in bank 21; actual 54655 != expected 54665 (diff = 00010)
Bugger word mismatch in bank 43; actual 02712 != expected 02716 (diff = 00004)

to this:

Bugger word mismatch in bank 16; actual 50121 != expected 70262 (diff = 20141)
Bugger word mismatch in bank 17; actual 51355 != expected 50463 (diff = 00672)
Bugger word mismatch in bank 21; actual 54727 != expected 54665 (diff = 00042)
Bugger word mismatch in bank 43; actual 02737 != expected 02716 (diff = 00021)

which makes bank 17 a little bit better, but other things worse. Looking through the lists of changes, this is the only apparent thing left to be fixed in bank 17, so this is likely not the answer.

The listing, fortunately, contains some asterisk marks that hold vital clues:
image
image

This shows everything from ATTINIT to ATTINIT +5 was changed or added, as well as the TS DELYBAR just before and the TCF ATTINIT +5 a bit further down. Notably, the main marked chunk is checking whether the LM is attached and skipping initialization if it is. This lines up reasonably well with the PCR title. It stands to follow, then, that perhaps in Comanche 44, the initialization was done in both cases instead of only CSM alone, and the check was the new addition. If the check is removed, the TCF ATTINIT +5 would need to become TCF ATTINIT +1, explaining the change on that line. I don't have an explanation for the mark on TS DELYBAR, though. Perhaps it was a comment?

Anyways, removing the four marked instructions at the beginning of ATTINIT and changing the +5s to +1s has the following effect on the banksums:

Bugger word mismatch in bank 16; actual 50036 != expected 70262 (diff = 20224)

In other words, not only does it make bank 17 correct, but the resulting alignment change also fixes the remaining errors in all but bank 16. So I think this is most likely to be the correct solution.

@thewonderidiot
Copy link
Collaborator Author

ERASABLE ASSIGNMENTS

Before we move on to fixing the remaining bank 16 errors, erasable definitions need to be cleaned up. Specifically, the definitions of STARSAV3, EK2VAL, and EK3VAL must all be removed.

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 6, 2020

P20-P25, revisited

The only remaining bank with errors is 16, and the only remaining thing Norton has marked in that bank is the small routine LDPLANET, right at the beginning:
image

This little routine doesn't exist at all in Colossus 249. In Comanche 44, it would have referenced STAR instead of STARSAV3. However, this alone is not sufficient to correct the large error remaining in bank 16.

It is, however, the most suspicious section of code remaining, and after systematically ruling out changes throughout the rest of bank 16, I came back to LDPLANET and started playing with it. It turns out that if you change the pairing of its interpretive instructions from this:

		VLOAD
			STAR
		VXSC	UNIT
			1/SQR3
		STORE	STARSAV2

to this:

		VLOAD   VXSC
			STAR
			1/SQR3
		UNIT
		STORE	STARSAV2

then the bank error goes from 17302 to exactly 0.

Admittedly, this is a bit of a stretch, and there's no hard evidence that it was done whatsoever other than the fact that it makes the checksum correct. But the two codings are completely equivalent, so they really wouldn't have had a good reason to change it. My only guesses are that either (a) the person liking the change liked the top formulation better, or (b) these lines had some comments that were made obsolete by the STARSAV3 change, and the pairing got jumbled while the cards were being repunched. Interestingly, Artemis 72 uses the latter formulation that I'm proposing here, although it is a later program.

I don't have any other ideas at the moment, though, so until we unearth more documentation (or manage to get a snapshot of LDPLANET in Margaret's Comanche 44 listing) this might be the best we can do.

@rburkey2005
Copy link
Member

Speaking of which, when I last attempted to nag Margaret about this, about a month ago, my email was returned as undeliverable. Nor has she ever spontaneously contacted me, unprompted by me. I.e., there's no longer any way to reach her, that I know of, and no reason to suspect she'll contact us.

@rburkey2005
Copy link
Member

@thewonderidiot Would it be worthwhile, do you suppose, to add ##-style comments to the source code at places where the reconstruction differs from Comanche 51? (I admit that I didn't check extensively, but I did look specifically in P20-P25, and didn't see any.)

@thewonderidiot
Copy link
Collaborator Author

I didn't put any in since there's a lot, but I can go through and do that. I want to get Comanche 45 going first though... that change is stumping me and it's simple enough that I want to try to crowdsource the search for it through the mailing list.

@rburkey2005
Copy link
Member

rburkey2005 commented Dec 6, 2020 via email

@rburkey2005
Copy link
Member

I'm going to experiment myself by adding the comments. I will probably poop out before getting very far, but it will be interesting to try.

@rburkey2005
Copy link
Member

@thewonderidiot Regarding P51-P53, I've found something confusing at the end of routine R56A (just prior to the label R56B). In the Norton doc (p. OPTC-20), this is not marked as a change, and both the Comanche 44 and 55 source code have the identical instruction TCF R56A +2 here. However, the Norton doc describes it as "otherwise, proceed to the 5th line of R56". Which is obviously (I think) not the same thing. To me, this seems like a botched way of saying R56A +5 (i.e., R56A1). Which if true, would be a problem.

@rburkey2005
Copy link
Member

@thewonderidiot I'm confused about FRAC vs DPFRAC for STAR. How does one know? I want to verify that it's DFRAC in Comanche 44, but I apparently never learned enough about it to know where to look. Also, STAR was 2 words rather than 1 even in Colossus 249, so does that mean it was processed as single precision even though it was allocated as double precision?

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 12, 2020

Norton refers to line numbers within the Programmed Guidance Equations document itself, rather than the listing. The fifth (code) line of R56 there is indeed R56A +2, which I believe agrees with the line in the code you're looking at.
image

Unfortunately, you're not going to find a direct source for FRAC vs. DPFRAC, since all of the lines in the Norton doc that specify scaling also specify the variable (which changed from STAR to STARSAV3, thus masking any other possible changes). The biggest clue that I can find (which is admittedly still kind of a stretch) is that the handling of STAR in Comanche 44 appears to have been the same as STARSAV3 was in Comanche 55. Notably, in PLANET in P51-P53.agc, Colossus 249 has

		VLOAD	UNIT
			STAR
		GOTO
			CORPLAN

while Comanche 44 had

		VLOAD	VXSC
			STAR
			1/SQR3
		UNIT	GOTO
			CORPLAN			

So why the change there unless the scaling changed? We can say that that VXSC 1/SQR3 was almost certainly there because 1/SQR3 is not shown as a Comanche 55 addition:
image
(That change bar is just below, showing the deletion of 1/SQRT3)

Beyond that, this is simply one of those situations where the bugger words tell the story -- so far as I can tell there's no possible way to make the bank 42 checksum correct if Comanche 44 still has FRAC for STAR. I was actually stuck on this one for quite a while before I started trying to undo some of the changes I had made on my first pass, like going back to DPFRAC for noun 88.

@rburkey2005
Copy link
Member

rburkey2005 commented Dec 12, 2020 via email

@rburkey2005
Copy link
Member

Regarding the "5th line of R56" thing, the explanation about how Norton counts the lines resolves some of the problem, but not all of it. The 5th line of R56 is indeed the program label R56A1. But the TC R56A +2 is still not a jump to R56A1. So there is still a discrepancy between the Norton pseudocode and the Comanche 55 source code there.

@thewonderidiot
Copy link
Collaborator Author

I'm not following. The 5th line of R56 is TS = 0, just before Perform CLEANDSP. In both Comanche 44 and Comanche 55, that is referring to this line:

R56A		TC	BANKCALL
		CADR	SXTMARK +2	# INHIBIR EXT VB ACT AND FIND VAC AREA
		
		CAF	ZERO		## <--- 5th line of R56 in Norton
		TC	BANKCALL
		CADR	CLEANDSP

@rburkey2005
Copy link
Member

Stupid me. The change bar (for R56A1) is immediately following TS=0 rather than at it. I couldn't get that idea out of my head. Thanks.

@rburkey2005
Copy link
Member

I've finished the first draft of the annotations, though they're only available at the staging site right now rather than the main site: https://virtualagc.github.io/virtualagc/listings/Comanche044/MAIN.agc.html. I'll post them on the main site in a few days if there's not any disqualifying feedback. Every difference between Comanche 44 and 51 is annotated (except for the handful of differences that are comments about changes between 51 and 55). My justifications are usually my own, since I only fell back on issue #1134 when I couldn't figure out a justification for myself. I thought that made a more-useful validation of the process. However, there very seldom seems to be much difference between my explanations and the ones here.

Each annotation begins with the word "Reconstruction", so they're relatively easy to find.

It's best viewed in Chrome, because (at least for me) Chrome correctly follows all of my links into the exact pages of PDFs that I want to reference. Some other browsers didn't do that for me, and insisted on downloading the entire PDF every time. Certainly they're a lot better viewed in Chrome than in the source-code files. 😄

Anyhow, feedback please!

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 13, 2020

ALARM AND ABORT

## <b>Reconstruction:</b>  At this point in COMANCHE 51, there's a sequence of interpretive
## instructions which have been removed in COMANCHE 44, namely:<br>

Those are basic instructions, not interpretive. 😉

these instructions were added some time between COMANCHE 45/2 and COMANCHE 55

Generally speaking for all of these, it's more accurate to say that any changes would have been added between 45 and 51. We know the 51-55 changes (gravity model) and 45/2 was a branch (whose difference from 45 is identical to the 51-55 changes).

ERASABLE ASSIGNMENTS

## That reference
## <i>also</i> indicates a change in the variable FANG; this appears to me to be an error, and
## that FANG usage is precisely the same in Comanche 44 through 55.  (A change of 

The address of FANG changed because EK2VAL and EK3VAL were inserted between it and EK1VAL. Norton shows the addresses, thus that line did change.

GROUND TRACKING DETERMINATION PROGRAM - P21

## (The indicated change,
## from Comanche 45/2 to Comanche 55, is that an absolute value is taken, shifted right by
## two bits, and then stored.  This is an error, in that the only actual change is the 
## shift; the absolute value and storage remain unchanged.)		

That's not an error. The section in question is:
image
And it was almost certainly shown in the previous iteration of this document as

P21VEL = |P21BASEV| (B7 earth, B5 moon)

But to show the shift and have a comment for it, he had to break it up into a few lines, using Temporary Storage. Throughout this document Norton is using the bars to show differences from the previous version of this document, not differences in the code from the previous listing. They're largely the same, but there are also some black bars on places where the code didn't change, but Norton decided to add some comments or something.

P30,P37

## Perhaps it was removed between Comanche 44 and Comanche 45/2.	

Nope, we know the changes between 44 and 45 (COM-4 fix) and between 45 and 45/2 (gravity model). Besides, this INHINT is in bank 35, which is located in a module that wasn't remanufactured between 44 and 45/2. (Plus, 45/2 was a branch and nothing that went into it impacted any later versions). This change was also made between 45 and 51.

P34-P35, P74-P75

## This is related to the fact that Comanche 51/55 wants to use the GOFLASH
## routine rather than the GOFLASHR routine, presumably because GOFLASH
## has the simpler interface and thus saves some words of memory with a shorter
## calling sequence.  The contemporary documentation does not call

The difference between the two is that GOFLASH blocks the job waiting for input, while GOFLASHR returns immediately to the following instructions, and spawns off a new job to handle input once a button is pressed. Comanche 44 uses GOFLASHR and then calls BLANKET with BIT1 to clear the first line on the DSKY, before ending the job with ENDOFJOB. They got rid of that first line clearing for Comanche 51, thus removing the need to use GOFLASHR instead of GOFLASH.

P40-P47

## <b>Reconstruction:</b> A block of interpretive instructions appearing at this
## point in Comanche 51 has been removed in Comanche 44,<br>
## <pre>
##     VLOAD   ABVAL
##             DELVSIN
##     STORE   DELVSAB
##     SETPD   VLOAD

The SETPD VLOAD code is the same in Comanche 44 and 51 -- the line merely lost its comment between the two. It may also be worth pointing out that this is (part of) the rev 45 change.

## these instructions relate to the pseudocode<br>
## <pre>
##     TS = K<sub>thetcon</sub>|<u>V</u><sub>tig</sub> * <u>R</u><sub>tig</sub>|
##     BURNANG = TS  DELVSAB  MASS<sub>dp</sub> / (CAPF |<u>R</u><sub>tig</sub>|<sup>2</sup>)
## </pre>

Nope, those three lines related to this one in Norton:
image

## <b>Reconstruction:</b> At this point in Comanche 51, the DMPR interpretive instruction
## is used in place of DMP.  As justification, we offer the comments in the preceding annotation,
## above.

This change is unrelated to the DELVSAB fix above. This one is a fix for anomaly COM-10.
image

PINBALL NOUN TABLES

## <i>except</i> that the comment maintains that the variable is DPFRAC in Comanche 2 
## instead of merely FRAC as in Colossus 249. There is no simple way to justify this claim,
## as it is a <i>conclusion</i> drawn from examining the specific interpretive code that
## processes STAR variable, which differs between Colossus 249 and Comanche 44.  At any

That's ancillary evidence, but really the conclusion was drawn from the line

		OCT	32655			# 88	DPFRAC FOR EACH

below, which encodes three instances of DPFRAC in octal. Colossus 249 has

		OCT	02041			# 88	FRAC FOR EACH

And that word needs to be 32655 for the checksum to be correct.

TVCINITIALIZE

## This significance of the page from the GSOP document is that it mentions an applicable 
## Program Change Request, PCR 747, titled "Remove TVC DAP Initial Attitude Errors".  While
## we don't have the full text of the PCR, the title at least tells us the motivation for
## the changes.

Actually, that PCR is the single biggest argument against the changes I made, and gave Niklas and I quite a bit of trouble while working on this. We figured from that title that the entire ATTINIT chunk needed to be deleted. Whatever PCR 747 is, it went in between Colossus 249 and Comanche 44. The PCR that describes this change is PCR 749, "TVC DAP initial errors, CSM
alone." That one happened between 45 and 51.

@rburkey2005
Copy link
Member

rburkey2005 commented Dec 13, 2020

@thewonderidiot Regarding the DELVSAB=|DELVSIN| change in P40-P47. Obviously I was very careless with that annotation, since it's pretty obvious the pseudocode doesn't match the code. But it it makes the justification much trickier.

Should my justification be something like the following? The addresses are off by a few after a certain point in this file. Diff'ing with Colossus 249 you find a stray set of instructions. Comparing to the pseudocode you find that they match DELVSAB=|...|. Noting that the Norton page is rev 2 and that there's no change bar, you conclude that the change occurred prior to rev 45/2.

Later ... in thinking about it, I've gone ahead and written it up pretty much like that.

@rburkey2005
Copy link
Member

I've now modified the annotations per the feedback given above. I don't know if there's the patience to wade through them again for yet another check. If so, only the specific annotations referenced above have been changed, and that makes it go a lot quicker. (Two or three new annotations have been added via hyperlinks, at points where there was no actual change, to provide some supporting data.)

I did not try to generically change every place where I had said there was a change from Comanche 55 to saying instead that it was a change from Comanche 51. That's partly because I generally only referenced 55 when I thought I had a specific reason to do so; but also because it's a big hassle. Perhaps I'll revisit that later.

Again, I'll keep the changed pages in staging-area website for a few days, and only migrate them to the main website later.

@thewonderidiot
Copy link
Collaborator Author

thewonderidiot commented Dec 13, 2020

I think the justification for DELVSAB=|DELVSIN| is much easier if you use the COM-4 anomaly report as justification for the change.
COM-4 states that the fix was to calculate VG magnitude (DELVSAB) in P40,P41, and the handwritten note at the bottom states that they were directed by NASA to remanufacture module 3 for Colossus 2 (which was done for revision 45). The three lines in question are calculating a velocity magnitude and also have a comment about doing so for a "MODULE REMAKE", which pretty easily identifies them as the revision 45 change. Thus, they can't have been in rev 44.

@rburkey2005
Copy link
Member

@thewonderidiot Done! The succeeding annotation (COM 10) was also tweaked, because I had mistakenly said it related to a problem fixed in Comanche 49, whereas it was actually reported in Comanche 49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants