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

SSC: Applewin + ADTpro #707

Closed
Keatah opened this issue Oct 18, 2019 · 12 comments
Closed

SSC: Applewin + ADTpro #707

Keatah opened this issue Oct 18, 2019 · 12 comments
Labels
Milestone

Comments

@Keatah
Copy link

@Keatah Keatah commented Oct 18, 2019

FWIW:

ADTpro is no longer able to transfer files or even read a directory FROM Applewin's simulated Apple II & SuperSerialCard THROUGH Com0Com's virtual serial port TO the locally hosted ADTpro server.

It of course works fine in older Applewin versions. Is it useful? For demonstration purposes, absolutely.

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Oct 19, 2019

Thanks. I wasn't aware of com0com before, but it sounds useful for testing too.

Can you let me know the latest working AppleWin?

Ref: http://com0com.sourceforge.net/com0com/ReadMe.txt

@tomcw tomcw added the Peripheral label Oct 19, 2019
@Keatah

This comment has been minimized.

Copy link
Author

@Keatah Keatah commented Oct 19, 2019

Last working AppleWin version - 1.27.1.0

1.27.2.0 and later seem to fail. I am able call up a remote directory via ADTpro client running on AppleWin one single time. That's it. Never had the issue on real hardware or older pre-1.27.1.0 versions.

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Oct 26, 2019

Confirmed this issue using:

  • com0com-3.0.0.0-i386-and-x64-signed.zip
    • gives me COM2 and COM11 (NB. AppleWin 1.29.4.0 or less, only works with COM1-COM9)
  • ADTPro-2.0.3

And I confirmed that 1.27.1.0 works (eg. directory, transfer a disk from Apple to host PC), using the default 115200-8-N-1 SSC settings.

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Oct 27, 2019

Here's the SSC transmit function:

2B64:AD 00 C0  LDA KEYBOARD
2B67:C9 9B     CMP #$9B    
2B69:F0 3A     BEQ $2BA5   
2B6B:AD A9 C0  LDA $C0A9   ; STATUS reg
2B6E:29 50     AND #$50    ; DSR|TX_EMPTY
2B70:C9 10     CMP #$10    ; TX_EMPTY (Nb. DSR low = ready)
2B72:D0 F0     BNE $2B64   
2B74:68        PLA         
2B75:8D A8 C0  STA $C0A8   ; TX reg
2B78:60        RTS         
@tomcw tomcw changed the title Applewin + ADTpro SSC: Applewin + ADTpro Nov 1, 2019
@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 1, 2019

1.27.1.0 vs 1.27.2.0:

1.27.1.0 has:

  • UpdateCommState()
    • dcb.fDtrControl = 0 (or = m_uDTR but only if m_bCfgSupportDTR is true via cmd-line)
    • dcb.fRtsControl = 0
  • STATUS reg
    • DCD = 0
    • DSR = 0
    • TX_EMPTY always = 1

Even 1.27.1.0 fails to (S)END (eg. TEST.DSK), failing on block 44/280. Strangely it works in debug-stepping g mode!

tomcw added a commit that referenced this issue Nov 2, 2019
. Wrap m_vbTxEmpty in a mutex
. Check WriteFile() result & log error
@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

@sicklittlemonkey sicklittlemonkey commented Nov 2, 2019

Nice. Concurrency issues are rare in this kind of app! ; - )

audetto added a commit to audetto/AppleWin that referenced this issue Nov 3, 2019
. Wrap m_vbTxEmpty in a mutex
. Check WriteFile() result & log error
audetto added a commit to audetto/AppleWin that referenced this issue Nov 3, 2019
@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 3, 2019

Added specific test for SSC using COM port: AppleWin/AppleWin-Test@02a11dc

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 3, 2019

Hi Nick - yeah, I guess the work I did around 1.27.1 was mainly tested on the TCP path (for SSC) and not the COM path. Also the old 1.27.1 code having hardcoded SSC.STATUS.TX_EMPTY=1 didn't help either! (as it masked this race-condition).

Anyway, I've added a new SSC COM-specific test now (using com0com virtual port pair).

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 3, 2019

ADTPro is good for soak testing:

  • sending (A2->PC) a 32MB HDD image over the SSC at 115200 baud takes 3019secs (~50mins!) :-)
  • receiving takes 3251secs
@tomcw tomcw added this to the 1.29.5 milestone Nov 3, 2019
@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 18, 2019

@Keatah: This is fixed in AppleWin 1.29.6.0 here - can you confirm?

@Keatah

This comment has been minimized.

Copy link
Author

@Keatah Keatah commented Nov 18, 2019

Seems to be working fine so far. Ran a few transfers and directory requests.

@tomcw

This comment has been minimized.

Copy link
Contributor

@tomcw tomcw commented Nov 21, 2019

Thanks for confirming. I'll close this issue.

@tomcw tomcw closed this Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.