Skip to content

SWCHA tests #57

Description

@JetSetIlly

There's a very nice test for SWCHB in the AtariAge comment below. It cycles through all input combinations are produces either a blue screen (passes) or a red screen (fails).

https://forums.atariage.com/topic/167173-what-does-the-game-select-switch-actually-do/#findComment-2068829

Is there a SWCHA equivalent for this test? There is an test for SWCHA called TestSWCHA_IndvBits.zip which gopher2600 passes, but I would like a more comprehensive test similar to the SWCHB test.

@ale-79

From a comment in the code, my current truth table is this.

//	SWCHA_W   SWACNT   <input>      SWCHA
//	   0        0         1           1            ^SWCHA_W & ^SWACNT & <input>
//	   0        0         0           0
//	   0        1         1           0
//	   0        1         0           0
//	   1        0         1           1            SWCHA_W & ^SWACNT & <input>
//	   1        0         0           0
//	   1        1         1           1            SWCHA_W & SWACNT & <input>
//	   1        1         0           0

Taking each column to be a, b and c 

//	(^a & ^b & c) | (a & ^b & c) | (a & b & c)
//	(a & c & (^b|b)) | (^a & ^b & c)
//	(a & c) | (^a & ^b & c)

SWCHA_W is what's last been written by the CPU and is what's coming from the connected peripheral/controller. The last column, SWCHA is the output.

This comment dates back to April 2022. I did a poor job of recording how I created this but it would have been through observation of results from a real console (using something like this swcha_test2.bin.zip)

@ale-79 is this something you have knowledge of?

The reason this has come up is because confusion over how the Starpath demo unit works. I don't see how SWCHA can hold a 1 if SWCNT is set to 1 and the value of <input> is uncertain.

https://forums.atariage.com/topic/390261-starpath-demonstration-unit-rom-dump/page/3/#comment-5851035

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions