Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
aacf9528a2
16 changed files with 388 additions and 161 deletions
|
@ -265,6 +265,7 @@
|
|||
<ClCompile Include="source\Debugger\Debugger_Parser.cpp" />
|
||||
<ClCompile Include="source\Debugger\Debugger_Range.cpp" />
|
||||
<ClCompile Include="source\Debugger\Debugger_Symbols.cpp" />
|
||||
<ClCompile Include="source\DiskFormatTrack.cpp" />
|
||||
<ClCompile Include="source\NTSC.cpp" />
|
||||
<ClCompile Include="source\NTSC_CharSet.cpp" />
|
||||
<ClCompile Include="source\SAM.cpp" />
|
||||
|
@ -564,4 +565,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -9,6 +9,13 @@ https://github.com/AppleWin/AppleWin/issues/new
|
|||
Tom Charlesworth
|
||||
|
||||
|
||||
1.27.3.0 - 14 Apr 2018
|
||||
----------------------
|
||||
. [Bug #308] SSC: For TCP mode, support DSR, DCD & CTS status bits.
|
||||
. SSC: Now DTR must also be set to enable interrupts (in addition to the respective Tx/Rx interrupt bit).
|
||||
. SSC: When reading the Status register, throttle calls to GetCommModemStatus() to a maximum of once every 8ms.
|
||||
|
||||
|
||||
1.27.2.0 - 12 Apr 2018
|
||||
----------------------
|
||||
. [Change #522] SSC: Support ACIA's TX Empty interrupt for both COM and TCP modes.
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/*
|
||||
.15 Cleanup: HELP CALC examples and See also.
|
||||
.14 Fixed: HELP JSR wasn't color-coding syntax.
|
||||
.13 Added: PROFILE LIST now shows how many clock cycles were executed.
|
||||
.12 GH-PR#480:
|
||||
GH#462: Default to Shift+Left Click to toggle diasm columns
|
||||
GH#462: Default to Shift+Left Click to toggle disasm columns
|
||||
Use 'disasm click <n>' to reconfigure this
|
||||
GH#473: Fixed bug caused by Util_MemoryTextFile, Line 51 not zero-terminating buffer by invalidating it.
|
||||
GH#476: Fixed off-by-one bug wrapping in debugger console
|
||||
|
|
195
docs/Debugger_Wishlist.txt
Normal file
195
docs/Debugger_Wishlist.txt
Normal file
|
@ -0,0 +1,195 @@
|
|||
Requests (Wishlist):
|
||||
====================
|
||||
|
||||
- HELP CD: Document examples
|
||||
Helps needs to list:
|
||||
SEE: HELP PWD
|
||||
|
||||
- Allow EQUs to be directly entered in
|
||||
|
||||
Foo EQU $1234
|
||||
|
||||
Need to check if we have 3 params, 2nd param is EQU, 3rd param is address
|
||||
|
||||
- Fix BUG: 0:1 Doesn't work
|
||||
Work-around, use two hex digits for the address:
|
||||
00:1
|
||||
|
||||
- Debugger: wildcard search support for symbols
|
||||
SYMBASIC MICRO*
|
||||
|
||||
- Debugger:Ability to turn on/off alternative odd/even background coloring in disasm
|
||||
DISASM ROWCOLOR 0
|
||||
DISASM ROWCOLOR 0
|
||||
Why? Default to a custom (black?) background, and then have ANALYSE color-code
|
||||
the background line color to make it easier to visualize sections.
|
||||
i.e. See BrkDown reverse engineering PDF -- TODO: Need link
|
||||
|
||||
- Debugger: FUNC address:address
|
||||
Markup function block, with alternating background colors
|
||||
|
||||
FUNC 300:31F
|
||||
FUNC 320:33F
|
||||
|
||||
- Debugger: Ability to hide Regs panel
|
||||
DISASM REGS 0 // Hide Regs and Breakpoints
|
||||
DISASM REGS 1 // Show Regs only
|
||||
DISASM REGS 2 // Show Breakpoints only
|
||||
DISASM REGS 3 // Show Regs and Breakpoints (DEFAULT)
|
||||
|
||||
- Debugger: SPRITE <ADDR> <WIDTH> <HEIGHT> [SPAN]
|
||||
|
||||
- Debugger: HGRX <addr>
|
||||
view address as HGR
|
||||
i.e. HGRX 6000
|
||||
i.e. HGRX 8000
|
||||
|
||||
- Debugger: Color code commands in light blue
|
||||
Currently, everything is in white, making it hard to see input and output
|
||||
|
||||
- Debugger: Command history
|
||||
Once any non-whitespace character has been entered, Up arrow and Down arrow
|
||||
should scroll through prev and next command history respectively
|
||||
|
||||
- Debugger: Command line editing
|
||||
Left Arrow Move Cursor Left
|
||||
Right Arrow Move Cursor Right
|
||||
Ctrl-A Beginning of Line
|
||||
Ctrl-D Delete Character
|
||||
Ctrl-E End of Line
|
||||
|
||||
- Debugger: List symbol table
|
||||
SYMASM LIST
|
||||
SYMUSER1 LIST
|
||||
|
||||
- Debugger: Document: Add help example to list all symbol tables
|
||||
HELP SYMMAIN
|
||||
SYMMAIN *
|
||||
|
||||
- Debugger: Markup Byte with C_ prefix instead of B_
|
||||
DB 123
|
||||
Will auto-generate symbol in SYMASM
|
||||
B_123
|
||||
This should be:
|
||||
G_123
|
||||
|
||||
- Debugger: ANALYSE <range>
|
||||
Utility to help in automatic disassembly.
|
||||
Like "Sourcer" or "BrkDown"
|
||||
Automatically markup labels for
|
||||
* JSR
|
||||
* JMP
|
||||
* RTS
|
||||
* Branches
|
||||
* LD? abs
|
||||
* LD? abs,X
|
||||
* LD? abs,Y
|
||||
* etc.
|
||||
Should respect existing `X <range>` as data
|
||||
|
||||
Auto-generated labels:
|
||||
|
||||
B_#### = Branch target address
|
||||
F_#### = Function (or F_, or J_, or L_), new command: DF
|
||||
G_#### = Global Byte
|
||||
P_#### = Pointer
|
||||
R_#### = Function return
|
||||
Z_## = Zero Page
|
||||
|
||||
Don't know how to generate:
|
||||
A_#### = Data Address
|
||||
W_#### = Data Word
|
||||
|
||||
- Debugger: Document: SYMASM and SYMUSER differences
|
||||
SYMASM data symbols placed here via DB Foo = 100
|
||||
SYMUSER func symbols placed here via SYM Bar = 200
|
||||
|
||||
- Debugger: Symbol tables for DOS 3.3 and ProDOS
|
||||
SYMUSER2 -> SYMDOS33
|
||||
SYMSOURCE2 -> SYMPRODOS
|
||||
|
||||
- Debugger: Autoexec !
|
||||
.AWD = Microsoft Fax
|
||||
.A2D = Apple 2 Debug
|
||||
.AW2 = AppleWin Disk = icon of app, disk image(s)
|
||||
|
||||
RUN AppleWin.a2d // Official AppleWin Supplied Debug Config
|
||||
RUN Debugger.a2d // User supplied AppleWin Debug Config
|
||||
|
||||
- Debugger: Custom Soft switches
|
||||
|
||||
SOFT CLEAR
|
||||
SOFT ADD C050
|
||||
SOFT ADD 50
|
||||
SOFT LIST
|
||||
SOFT LOAD
|
||||
SOFT SAVE
|
||||
|
||||
- New Debugger features:
|
||||
> 1 SCR shows what the Apple monitor should look like at the current point
|
||||
> 2 MDS same as ME but shows strings (ie "ABC" instead of "c1 c2 c3"
|
||||
> 3 TS text search (and may be a hex search function too ?"
|
||||
|
||||
- Incorporate Laine Houghton's modifications to debugger (?)
|
||||
|
||||
- Source level debugging using WordPad & Merlin asm output (tell WordPad to FIND / GOTO line).
|
||||
|
||||
|
||||
|
||||
Implemented:
|
||||
============
|
||||
|
||||
* [x] Debugger V2.9.0.14: Cycle Profiling, use PROFILE RESET, and PROFILE LIST.
|
||||
|
||||
. DONE: v16.0.0.0 DEBUGGER: (use F7): RESET button to break into the Monitor (preserving memory).
|
||||
|
||||
. DONE: v16.0.0.0: DEBUGGER: Ability to search and modify for a value in memory in order to cheat in some games.
|
||||
|
||||
. DONE: v16.0.0.0: DEBUGGER: Hex search in debugger
|
||||
|
||||
* [x] Version: ?
|
||||
Debugger: Turn off target columns in dis-assembly
|
||||
Use:
|
||||
DISASM TARGET 0 // off
|
||||
DISASM TARGET 1 // show target byte
|
||||
DISASM TARGET 2 // show target address
|
||||
DISASM TARGET 3 // Show target address and byte (DEFAULT)
|
||||
|
||||
. Debugger: BLOAD with no arguments should print current save path
|
||||
. Debugger: FIX BLOAD with bad path!! (should use path of last disk load!)
|
||||
. Debugger: FIX BSAVE with bad path!! (should use path of last disk load!)
|
||||
. Debugger: merlin "filename",S6,D1
|
||||
. Debugger: COLOR RESET
|
||||
. Debugger: COLOR SAVE ["filename"]
|
||||
. Debugger: COLOR LOAD ["filename"]
|
||||
|
||||
. DONE: help f
|
||||
. DONE: help m
|
||||
. DONE: BC:##
|
||||
. DONE: BD:##
|
||||
. DONE: BE:##
|
||||
. DONE: help f
|
||||
. DONE: help m
|
||||
. DONE: EA:##
|
||||
. DONE: E8:##
|
||||
. DONE: a:##
|
||||
. DONE: d:##
|
||||
. DONE: Debugger 2.6.1.19: ADD: AppleSoft symbols to Symbol Table
|
||||
|
||||
. DONE: v16.0.0.0: Video: PrintScreen (save to disk with auto file numbering.)
|
||||
. DONE: v16.0.0.0: Debugger: TEXT show current 40-col text page
|
||||
. DONE: v16.0.0.0: Debugger: TEXT80 show current 80-col text page
|
||||
. DONE: v16.0.0.0: Debugger: GR show current lo-res graphics page
|
||||
. DONE: v16.0.0.0: Debugger: HGR show current hi-res graphis page
|
||||
. DONE: v16.0.0.0: Debugger: DGR show current double hi-res graphics page
|
||||
. DONE: v16.0.0.0: Debugger: TEXT1 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: TEXT2 Show 40 Column Text Page 2
|
||||
. DONE: v16.0.0.0: Debugger: TEXT81 1 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: TEXT82 2 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: HGR1 show Hi-Res Page 1
|
||||
. DONE: v16.0.0.0: Debugger: HGR2 show Hi-Res Page 2
|
||||
. DONE: v16.0.0.0: Debugger: DHGR1 show Double Hi-Res Page 1
|
||||
. DONE: v16.0.0.0: Debugger: DHGR2 show Double Hi-Res Page 2
|
||||
. DONE: Debugger: shift+ins to paste from clipboard (use Ctrl-V to paste.)
|
||||
|
||||
|
|
@ -1,27 +1,6 @@
|
|||
Requests (Wishlist):
|
||||
====================
|
||||
|
||||
- Debugger: Symbol tables for DOS 3.3 and ProDOS
|
||||
SYMUSER2 -> SYMDOS33
|
||||
SYMSOURCE2 -> SYMPRODOS
|
||||
|
||||
- Debugger: Autoexec !
|
||||
.AWD = Microsoft Fax
|
||||
.A2D = Apple 2 Debug
|
||||
.AW2 = AppleWin Disk = icon of app, disk image(s)
|
||||
|
||||
RUN AppleWin.a2d // Official AppleWin Supplied Debug Config
|
||||
RUN Debugger.a2d // User supplied AppleWin Debug Config
|
||||
|
||||
- Debugger: Custom Soft switches
|
||||
|
||||
SOFT CLEAR
|
||||
SOFT ADD C050
|
||||
SOFT ADD 50
|
||||
SOFT LIST
|
||||
SOFT LOAD
|
||||
SOFT SAVE
|
||||
|
||||
. DONE
|
||||
Hard Disk light/indicator
|
||||
Right now the "- Caps" in the bottom right wastes too much space.
|
||||
|
@ -29,9 +8,6 @@ Requests (Wishlist):
|
|||
This would free up room to add a hard drive light indicator to the right.
|
||||
https://groups.google.com/d/msg/comp.emulators.apple2/grpSWHii8Ak/IorwTvbLxtgJ
|
||||
|
||||
. Debugger: wildcard search support for symbols
|
||||
SYMBASIC MICRO*
|
||||
|
||||
. Video: Full Screen Debugger Colors
|
||||
Amber, F7, F7 - wrong palette?
|
||||
|
||||
|
@ -41,43 +17,6 @@ Requests (Wishlist):
|
|||
- Disk map!!!
|
||||
http://www.lazilong.com/apple_II/adfs/screenshots/beagle_block.html
|
||||
|
||||
. Debugger: BLOAD with no arguments should print current save path
|
||||
. Debugger: FIX BLOAD with bad path!! (should use path of last disk load!)
|
||||
. Debugger: FIX BSAVE with bad path!! (should use path of last disk load!)
|
||||
. Debugger: merlin "filename",S6,D1
|
||||
. Debugger: COLOR RESET
|
||||
. Debugger: COLOR SAVE ["filename"]
|
||||
. Debugger: COLOR LOAD ["filename"]
|
||||
|
||||
. DONE: help f
|
||||
. DONE: help m
|
||||
. DONE: BC:##
|
||||
. DONE: BD:##
|
||||
. DONE: BE:##
|
||||
. DONE: help f
|
||||
. DONE: help m
|
||||
. DONE: EA:##
|
||||
. DONE: E8:##
|
||||
. DONE: a:##
|
||||
. DONE: d:##
|
||||
. DONE: Debugger 2.6.1.19: ADD: AppleSoft symbols to Symbol Table
|
||||
|
||||
. DONE: v16.0.0.0: Video: PrintScreen (save to disk with auto file numbering.)
|
||||
. DONE: v16.0.0.0: Debugger: TEXT show current 40-col text page
|
||||
. DONE: v16.0.0.0: Debugger: TEXT80 show current 80-col text page
|
||||
. DONE: v16.0.0.0: Debugger: GR show current lo-res graphics page
|
||||
. DONE: v16.0.0.0: Debugger: HGR show current hi-res graphis page
|
||||
. DONE: v16.0.0.0: Debugger: DGR show current double hi-res graphics page
|
||||
. DONE: v16.0.0.0: Debugger: TEXT1 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: TEXT2 Show 40 Column Text Page 2
|
||||
. DONE: v16.0.0.0: Debugger: TEXT81 1 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: TEXT82 2 Show 40 Column Text Page 1
|
||||
. DONE: v16.0.0.0: Debugger: HGR1 show Hi-Res Page 1
|
||||
. DONE: v16.0.0.0: Debugger: HGR2 show Hi-Res Page 2
|
||||
. DONE: v16.0.0.0: Debugger: DHGR1 show Double Hi-Res Page 1
|
||||
. DONE: v16.0.0.0: Debugger: DHGR2 show Double Hi-Res Page 2
|
||||
. DONE: Debugger: shift+ins to paste from clipboard (use Ctrl-V to paste.)
|
||||
|
||||
Priority:
|
||||
. Shift keys map to button#2
|
||||
. DONE: Right-click on drive icon to eject disk
|
||||
|
@ -108,10 +47,7 @@ Post 1.12.6.0:
|
|||
Post 1.12.5.0:
|
||||
- Option to associate (or not) file types with AW.
|
||||
- Option for the emulator to not lock the disks while they are in the (virtual) drives.
|
||||
- New Debugger features:
|
||||
> 1 SCR shows what the Apple monitor should look like at the current point
|
||||
> 2 MDS same as ME but shows strings (ie "ABC" instead of "c1 c2 c3"
|
||||
> 3 TS text search (and may be a hex search function too ?"
|
||||
|
||||
- Default monochrome mode to green
|
||||
- Associate .aws with AppleWin.
|
||||
|
||||
|
@ -125,25 +61,20 @@ Post 1.12.4.2:
|
|||
|
||||
Post 1.12.4.1:
|
||||
- Option to make any pc joystick button working as the 'Turbo' (i.e. Scroll Lock).
|
||||
. DONE: v16.0.0.0: DEBUGGER: Ability to search and modify for a value in memory in order to cheat in some games.
|
||||
- FastMath card support.
|
||||
- Ability to view page1/2 & switch mode (Text/GR/HGR/DHGR)
|
||||
- Add an 80 X 80 or 40X40 text mode
|
||||
- Send data back and forth between emu apple 2 and VisualBasic
|
||||
- Resizeable , scalable window
|
||||
- Incorporate Laine Houghton's modifications to debugger (?)
|
||||
- Make a documented interface so others can program Apple II peripheral card Emu plugins.
|
||||
- Source level debugging using WordPad & Merlin asm output (tell WordPad to FIND / GOTO line).
|
||||
- Emulate a video capture card: get an image from a webcam, de-rez it to HGR, and display it on the HGR screen.
|
||||
- AppleCrate emulation between several open AppleWin emulators.
|
||||
- Access PC files from PRODOS or DOS instead of DSK images? : Not doing (user CiderPress instead)
|
||||
. DONE: v16.0.0.0: DEBUGGER: Hex search in debugger
|
||||
|
||||
Post 1.12.4.0:
|
||||
- Ability to send files to the PC from a disk image in AppleWin : Not doing (user CiderPress instead)
|
||||
- Ability to load files from the PC to a disk image in AppleWin : Not doing (user CiderPress instead)
|
||||
- When you are using the mouse as a cursor / joystick, as well as the markers on the screen border, enable the user to also add a dot (or cross hair) to the screen wherever the mouse pointer is.
|
||||
. DONE: v16.0.0.0 DEBUGGER: (use F7): RESET button to break into the Monitor (preserving memory).
|
||||
- Ability to send Apple's stdout to clipboard or file (and vice versa).
|
||||
|
||||
Initial:
|
||||
|
|
|
@ -63,15 +63,11 @@
|
|||
i.e. 00:20 20 20 20 ... for page $20</li>
|
||||
</ul>
|
||||
-modem<br>
|
||||
Shorthand for passing -dtr -dcd -dsr<br>
|
||||
Shorthand for passing -dcd<br>
|
||||
Use with GBBS Pro (or any other BBS package). See the <a href="http://www.callapple.org/documentation/books/gbbs-pro-2-2/">GBBS Pro 2.2</a> book from Call-A.P.P.L.E.
|
||||
<br><br>
|
||||
-dtr<br>
|
||||
Support SSC's DTR (Data Terminal Ready) control bit<br><br>
|
||||
-dcd<br>
|
||||
Support SSC's DCD (Data Carrier Detect) status bit<br><br>
|
||||
-dtr<br>
|
||||
Support SSC's DSR (Data Set Ready) status bit<br><br>
|
||||
For the SSC's 6551's Status register's DCD bit, use this switch to force AppleWin to use the state of the MS_RLSD_ON bit from GetCommModemStatus().<br><br>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
|
|
@ -84,7 +84,11 @@
|
|||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Clock">
|
||||
<param name="Local" value="Clock.html">
|
||||
<param name="Local" value="clock.html">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Super Serial Card">
|
||||
<param name="Local" value="card-ssc.html">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Uthernet network card">
|
||||
|
|
86
help/card-ssc.html
Normal file
86
help/card-ssc.html
Normal file
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Super Serial Card</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
</head>
|
||||
<body style="FONT-FAMILY: verdana; BACKGROUND-COLOR: rgb(255,255,255)" alink="#008000"
|
||||
link="#008000" vlink="#008000">
|
||||
<h2 style="COLOR: rgb(0,128,0)">Super Serial Card</h2>
|
||||
<hr size="4">
|
||||
<h3>Super Serial Card:</h3>
|
||||
<p>AppleWin emulates a Super Serial Card (aka SSC) in slot-2, with the jumper block in the MODEM position.</p>
|
||||
<p>The SSC can be configured to communicate externally either via the host PC's COM serial port or TCP port 1977.</p>
|
||||
|
||||
<p>See the <a href="cfg-config.html">Configuration</a> tab's 'Serial Port' menu to select a COM serial port or the TCP port.</p>
|
||||
|
||||
<p>The SSC currently has these <strong>hardcoded</strong> DIP switch settings:</p>
|
||||
<ul>
|
||||
<li>DIP SW1:
|
||||
<ul>
|
||||
<li>Baud rate = 9600
|
||||
<li>Mode = CIC (ie. SSC's Communication Mode)
|
||||
</ul>
|
||||
<li>DIP SW2:
|
||||
<ul>
|
||||
<li>1 stop-bit
|
||||
<li>8-bit byte size
|
||||
<li>No parity
|
||||
<li>Linefeed off
|
||||
<li>Interrupts enabled
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<p>Notes:</p>
|
||||
<ul>
|
||||
<li>The SSC emulation supports both Rx and Tx interrupts (for both COM and TCP modes), RTS/CTS, DSR/DTR, and the undocumented 115200 baud rate.
|
||||
<li>For the TCP mode it doesn't matter what baud rate, stop-bit, byte size and parity are set to.
|
||||
<ul>
|
||||
<li>It always uses an unthrottled data-rate of 8-bit bytes (no stop-bit, no parity).
|
||||
<li>When there's an active TCP connection, then the 6551's Status register has DCD,DSR bits clear (active low), and DIPSW2 has CTS bit clear (active low). When there's no TCP connection, then all these bits are set (inactive).
|
||||
</ul>
|
||||
<li>The TCP mode can expose buggy Rx interrupt handling code where the 6551's Status register is read more than once in the Interrupt Service Routine (ISR).
|
||||
<ul>
|
||||
<li>Details: TCP mode doesn't throttle the serial data-rate, so after reading the Status register (to clear the Rx interrupt) the Rx interrupt may get asserted immediately if there is more data in the TCP receive buffer, resulting in a missed interrupt (and therefore missed Rx data).
|
||||
</ul>
|
||||
<li>The 6551's Command register's DSR (bit0) must be set, to enable interrupts (Rx, Tx) along with the respective Rx and/or Tx bits (bit3:1). This is part of the 6551 specification, but (DSR bit) has only been enforced by AppleWin since 1.27.4.
|
||||
</ul>
|
||||
|
||||
<p>Unsupported features are:</p>
|
||||
<ul>
|
||||
<li>Can't configure the DIP switches (not a problem, since most functions can be set in software).
|
||||
<li>6551 ACIA Command register: Echo mode(bit4=1) and Transmit BRK (bit3:2=3).
|
||||
<li>6551 ACIA Control register: external clock (bit4=0).
|
||||
<li>6551 ACIA baud rates: 50, 75, 109.92, 134.58, 150 all map to 110 baud.
|
||||
<li>6551 ACIA baud rate: 1800 maps to 2400 baud.
|
||||
<li>6551 ACIA baud rate: 3600 maps to 4800 baud.
|
||||
<li>6551 ACIA baud rate: 7200 maps to 9600 baud.
|
||||
<li>6551 ACIA Status register's error bits: overrun, framing and parity (these are all hardcoded to 0).
|
||||
<li>6551 ACIA Status register's DCD bit (Data Carrier Detect). This is just set the same as DSR.
|
||||
<ul>
|
||||
<li>NB. Use command line -dcd to force AppleWin to use the state of the MS_RLSD_ON bit from GetCommModemStatus().
|
||||
</ul>
|
||||
<li>NMOS 6551 ACIA CTS bug: transmission of an already-started frame will stop immediately when CTS is taken false, the byte will be lost, and the TxD line will go to marking.
|
||||
<ul>
|
||||
<li>NB. The CMOS 6551's will finish the frame, so assume that AppleWin emulates a CMOS 6551.
|
||||
</ul>
|
||||
<li>AppleWin's 6502/65C02 emulation doesn't emulate the false read for STA $C088,X (where X=$20).
|
||||
<ul>
|
||||
<li>Don't do this to write to the 6551's Transmit register.
|
||||
<li>On AppleWin this is fine, but on real hardware (in full duplex mode) you may falsely read (and clear) the 6551's Receive register.
|
||||
<li>Instead (like the SSC's firmware) do this: STA $BFFF,Y (where Y=$A9).
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h4>Using TCP mode with the Apple // Game Server:</h4>
|
||||
The TCP interface to the SSC can be used by the <a href="https://sourceforge.net/projects/a2gameserver">Apple // Game Server</a> (AGS).<br>
|
||||
For details see the notes that comes with AGS, but in summary:<br>
|
||||
<ul>
|
||||
<li>Boot the Apple II to AppleSoft (ie. power on and hit Ctrl-Reset) and type IN#2.
|
||||
<li>From a Windows DOS box, start AGS with "localhost 1977 apple2e". This will boot the emulated Apple II from AGS.
|
||||
<li>Nb. Only Enhanced Apple //e is working at the moment.
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -55,14 +55,8 @@
|
|||
<br>
|
||||
|
||||
<strong>Serial Port:</strong><br>
|
||||
This option will remap the emulated Apple's serial port to your PC's
|
||||
serial port (or TCP port 1977). The Apple Super Serial Card (SSC) is emulated in slot-2.<br>
|
||||
The TCP interface to the Apple SSC can be used by the <a href="http://sourceforge.net/projects/a2gameserver">Apple // Game Server</a>.
|
||||
For details see the notes that comes with AGS:<br>
|
||||
<li>Boot the Apple II to AppleSoft (ie. power on and hit Ctrl-Reset) and type IN#2.
|
||||
<li>From a Windows DOS box, start AGS with "localhost 1977 apple2e". This will boot the emulated Apple II from AGS.
|
||||
<li>Nb. Only Enhanced Apple //e is working at the moment.
|
||||
<br>
|
||||
This option will remap the emulated Apple's serial port to your PC's serial port (or TCP port 1977).<br>
|
||||
See <a href="card-ssc.html">Super Serial Card</a> for more details.<br>
|
||||
<br>
|
||||
|
||||
<strong>Ethernet Settings...:</strong><br>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<li><a href="savestate.html">Save-state Files</a>
|
||||
<li><a href="sound.html">Sound</a>
|
||||
<li><a href="clock.html">Clock</a>
|
||||
<li><a href="card-ssc.html">Super Serial card</a>
|
||||
<li><a href="uthernet.html">Uthernet network card</a>
|
||||
<li><a href="CommandLine.html">Command line</a>
|
||||
<li><a href="configuration.html">AppleWin Configuration</a>
|
||||
|
|
|
@ -252,8 +252,8 @@ DISK_ICON ICON "DISK.ICO"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,27,2,0
|
||||
PRODUCTVERSION 1,27,2,0
|
||||
FILEVERSION 1,27,3,0
|
||||
PRODUCTVERSION 1,27,3,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -271,12 +271,12 @@ BEGIN
|
|||
VALUE "Comments", "https://github.com/AppleWin"
|
||||
VALUE "CompanyName", "AppleWin"
|
||||
VALUE "FileDescription", "Apple //e Emulator for Windows"
|
||||
VALUE "FileVersion", "1, 27, 2, 0"
|
||||
VALUE "FileVersion", "1, 27, 3, 0"
|
||||
VALUE "InternalName", "APPLEWIN"
|
||||
VALUE "LegalCopyright", " 1994-2018 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
|
||||
VALUE "OriginalFilename", "APPLEWIN.EXE"
|
||||
VALUE "ProductName", "Apple //e Emulator"
|
||||
VALUE "ProductVersion", "1, 27, 2, 0"
|
||||
VALUE "ProductVersion", "1, 27, 3, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -1210,24 +1210,10 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
|||
{
|
||||
g_bMultiMon = true;
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-dcd") == 0) // GH#386
|
||||
else if ((strcmp(lpCmdLine, "-dcd") == 0) || (strcmp(lpCmdLine, "-modem") == 0)) // GH#386
|
||||
{
|
||||
sg_SSC.SupportDCD(true);
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-dsr") == 0) // GH#386
|
||||
{
|
||||
sg_SSC.SupportDSR(true);
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-dtr") == 0) // GH#386
|
||||
{
|
||||
sg_SSC.SupportDTR(true);
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-modem") == 0) // GH#386
|
||||
{
|
||||
sg_SSC.SupportDCD(true);
|
||||
sg_SSC.SupportDSR(true);
|
||||
sg_SSC.SupportDTR(true);
|
||||
}
|
||||
else // unsupported
|
||||
{
|
||||
LogFileOutput("Unsupported arg: %s\n", lpCmdLine);
|
||||
|
|
|
@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#define ALLOW_INPUT_LOWERCASE 1
|
||||
|
||||
// See /docs/Debugger_Changelog.txt for full details
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,12);
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,15);
|
||||
|
||||
|
||||
// Public _________________________________________________________________________________________
|
||||
|
@ -223,6 +223,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
ProfileOpcode_t g_aProfileOpcodes[ NUM_OPCODES ];
|
||||
ProfileOpmode_t g_aProfileOpmodes[ NUM_OPMODES ];
|
||||
unsigned __int64 g_nProfileBeginCycles = 0; // g_nCumulativeCycles // PROFILE RESET
|
||||
|
||||
TCHAR g_FileNameProfile[] = TEXT("Profile.txt"); // changed from .csv to .txt since Excel doesn't give import options.
|
||||
int g_nProfileLine = 0;
|
||||
|
@ -8386,7 +8387,15 @@ void ProfileFormat( bool bExport, ProfileFormat_e eFormatMode )
|
|||
, static_cast<unsigned int>(nOpmodeTotal) );
|
||||
pText = ProfileLinePush();
|
||||
|
||||
sprintf( pText, "\n" );
|
||||
sprintf( pText, "===================\n" );
|
||||
pText = ProfileLinePush();
|
||||
|
||||
unsigned int cycles = static_cast<unsigned int>(g_nCumulativeCycles - g_nProfileBeginCycles);
|
||||
sprintf( pText
|
||||
, "Cycles: " DELIM "%s%9u\n"
|
||||
, sSeperator2
|
||||
, pColorNumber
|
||||
, cycles );
|
||||
pText = ProfileLinePush();
|
||||
}
|
||||
#undef DELIM
|
||||
|
@ -8409,6 +8418,8 @@ void ProfileReset()
|
|||
g_aProfileOpmodes[ iOpmode ].m_iOpmode = iOpmode;
|
||||
g_aProfileOpmodes[ iOpmode ].m_nCount = 0;
|
||||
}
|
||||
|
||||
g_nProfileBeginCycles = g_nCumulativeCycles;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -899,7 +899,7 @@ Update_t CmdHelpSpecific (int nArgs)
|
|||
ConsolePrintFormat( sText, "%s G[G] C600 F000:FFFF", CHC_EXAMPLE );
|
||||
break;
|
||||
case CMD_JSR:
|
||||
ConsoleColorizePrint( sText, " %sUsage%s: %s[symbol | address]" );
|
||||
ConsoleColorizePrint( sText, " Usage: [symbol | address]" );
|
||||
ConsoleBufferPush( " Pushes PC on stack; calls the named subroutine." );
|
||||
break;
|
||||
case CMD_NOP:
|
||||
|
@ -1318,12 +1318,15 @@ Update_t CmdHelpSpecific (int nArgs)
|
|||
// Output
|
||||
case CMD_OUTPUT_CALC:
|
||||
ConsoleColorizePrint( sText, " Usage: <address | symbol | expression >" );
|
||||
ConsoleBufferPush( " Expression is one of: + - * / % ^ ~" );
|
||||
ConsoleBufferPush( " Operator is one of: + - * / % ^ ~" );
|
||||
ConsoleBufferPush( " Output order is: Hex Bin Dec Char" );
|
||||
ConsoleBufferPush( " Note: symbols take piority." );
|
||||
ConsoleBufferPush( " Note: symbols take priority." );
|
||||
ConsoleBufferPush( " Note: #A (if you don't want the accumulator value)" );
|
||||
ConsoleBufferPush( " Note: #F (if you don't want the flags value)" );
|
||||
Help_Examples();
|
||||
ConsoleBufferPush( "Note: #A (if you don't want the accumulator value)" );
|
||||
ConsoleBufferPush( "Note: #F (if you don't want the flags value)" );
|
||||
ConsolePrintFormat( sText, "%s CALC 5 + #A", CHC_EXAMPLE );
|
||||
ConsolePrintFormat( sText, "%s CALC 80 * 2", CHC_EXAMPLE );
|
||||
ConsoleColorizePrint( sText, " See also: " CHC_COMMAND "HELP OP" );
|
||||
break;
|
||||
case CMD_OUTPUT_ECHO:
|
||||
ConsoleColorizePrint( sText, " Usage: string" );
|
||||
|
|
|
@ -47,11 +47,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
#define TCP_SERIAL_PORT 1977
|
||||
|
||||
// Default: 19200-8-N-1
|
||||
// Default: 9600-8-N-1
|
||||
SSC_DIPSW CSuperSerialCard::m_DIPSWDefault =
|
||||
{
|
||||
// DIPSW1:
|
||||
CBR_19200,
|
||||
CBR_9600, // Use 9600, as a 1MHz Apple II can only handle up to 9600 bps [Ref.1]
|
||||
FWMODE_CIC,
|
||||
|
||||
// DIPSW2:
|
||||
|
@ -68,9 +68,7 @@ CSuperSerialCard::CSuperSerialCard() :
|
|||
m_aySerialPortChoices(NULL),
|
||||
m_uTCPChoiceItemIdx(0),
|
||||
m_uSlot(0),
|
||||
m_bCfgSupportDCD(false),
|
||||
m_bCfgSupportDSR(false),
|
||||
m_bCfgSupportDTR(false)
|
||||
m_bCfgSupportDCD(false)
|
||||
{
|
||||
memset(m_ayCurrentSerialPortName, 0, sizeof(m_ayCurrentSerialPortName));
|
||||
m_dwSerialPortItem = 0;
|
||||
|
@ -100,7 +98,7 @@ void CSuperSerialCard::InternalReset()
|
|||
// . NB. MOS6551 datasheet: Hardware reset: b#00000010 (so ACIA not init'd on IN#2!)
|
||||
UpdateCommandReg(0);
|
||||
|
||||
m_uBaudRate = CBR_19200; // Undefined, as CONTROL.CLK_SOURCE=0=External clock is not supported for SSC - so nominally use 19200
|
||||
m_uBaudRate = m_kDefaultBaudRate; // Undefined, as CONTROL.CLK_SOURCE=0=External clock is not supported for SSC - so nominally AppleWin default
|
||||
m_uStopBits = ONESTOPBIT;
|
||||
m_uByteSize = 8;
|
||||
m_uParity = NOPARITY;
|
||||
|
@ -119,6 +117,7 @@ void CSuperSerialCard::InternalReset()
|
|||
|
||||
m_uDTR = DTR_CONTROL_DISABLE;
|
||||
m_uRTS = RTS_CONTROL_DISABLE;
|
||||
m_dwModemStatus = m_kDefaultModemStatus;
|
||||
}
|
||||
|
||||
CSuperSerialCard::~CSuperSerialCard()
|
||||
|
@ -172,7 +171,7 @@ UINT CSuperSerialCard::BaudRateToIndex(UINT uBaudRate)
|
|||
|
||||
_ASSERT(0);
|
||||
LogFileOutput("SSC: BaudRateToIndex(): unsupported rate: %d\n", uBaudRate);
|
||||
return BaudRateToIndex(CBR_19200); // nominally use 19200
|
||||
return BaudRateToIndex(m_kDefaultBaudRate); // nominally use AppleWin default
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -439,7 +438,7 @@ BYTE __stdcall CSuperSerialCard::SSC_IOWrite(WORD PC, WORD uAddr, BYTE bWrite, B
|
|||
//===========================================================================
|
||||
|
||||
// 6551 ACIA Command Register ($C08A+s0)
|
||||
// . EG. 0x09 = "no parity, enable IRQ" - b7:5(No parity), b4 (No echo), b3:1(Enable TX,RX IRQs), b0(DTR: Enable Rx/Tx) [Ref.2]
|
||||
// . EG. 0x09 = "no parity, enable IRQ" [Ref.2] - b7:5(No parity), b4 (No echo), b3:1(Enable TX,RX IRQs), b0(DTR: Enable receiver and all interrupts)
|
||||
enum { CMD_PARITY_MASK = 3<<6,
|
||||
CMD_PARITY_ODD = 0<<6, // Odd parity
|
||||
CMD_PARITY_EVEN = 1<<6, // Even parity
|
||||
|
@ -453,7 +452,7 @@ enum { CMD_PARITY_MASK = 3<<6,
|
|||
CMD_TX_IRQ_DIS_RTS_LOW = 2<<2,
|
||||
CMD_TX_IRQ_DIS_RTS_LOW_BRK = 3<<2, // Transmit BRK
|
||||
CMD_RX_IRQ_DIS = 1<<1, // 1=IRQ interrupt disabled
|
||||
CMD_DTR = 1<<0, // Data Terminal Ready: 1=Enable Rx/Tx (!DTR low)
|
||||
CMD_DTR = 1<<0, // Data Terminal Ready: Enable(1) or disable(0) receiver and all interrupts (!DTR low)
|
||||
};
|
||||
|
||||
BYTE __stdcall CSuperSerialCard::CommProgramReset(WORD, WORD, BYTE, BYTE, ULONG)
|
||||
|
@ -513,7 +512,7 @@ void CSuperSerialCard::UpdateCommandReg(BYTE command)
|
|||
break;
|
||||
}
|
||||
|
||||
if (m_DIPSWCurrent.bInterrupts)
|
||||
if (m_DIPSWCurrent.bInterrupts && m_uCommandByte & CMD_DTR)
|
||||
{
|
||||
m_bTxIrqEnabled = (m_uCommandByte & CMD_TX_MASK) == CMD_TX_IRQ_ENA_RTS_LOW;
|
||||
m_bRxIrqEnabled = (m_uCommandByte & CMD_RX_IRQ_DIS) == 0;
|
||||
|
@ -524,11 +523,8 @@ void CSuperSerialCard::UpdateCommandReg(BYTE command)
|
|||
m_bRxIrqEnabled = false;
|
||||
}
|
||||
|
||||
if (m_bCfgSupportDTR) // GH#386
|
||||
{
|
||||
// Data Terminal Ready (DTR) setting (0=set DTR high (indicates 'not ready'))
|
||||
m_uDTR = (m_uCommandByte & CMD_DTR) ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE;
|
||||
}
|
||||
// Data Terminal Ready (DTR) setting (0=set DTR high (indicates 'not ready')) (GH#386)
|
||||
m_uDTR = (m_uCommandByte & CMD_DTR) ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE;
|
||||
}
|
||||
|
||||
BYTE __stdcall CSuperSerialCard::CommCommand(WORD, WORD, BYTE write, BYTE value, ULONG)
|
||||
|
@ -563,7 +559,7 @@ BYTE __stdcall CSuperSerialCard::CommControl(WORD, WORD, BYTE write, BYTE value,
|
|||
// Plus running in "fast" mode) cannot handle 19.2 kbps, and even 9600
|
||||
// bps on these machines requires either some highly optimised code or
|
||||
// a decent buffer in the device being accessed. The faster Apples
|
||||
// have no difficulty with this speed, however.
|
||||
// have no difficulty with this speed, however. [Ref.1]
|
||||
|
||||
case 0x00: m_uBaudRate = CBR_115200; break; // Internal clk: undoc'd 115.2K (or 16x external clock)
|
||||
case 0x01: // fall through [50 bps]
|
||||
|
@ -630,6 +626,12 @@ BYTE __stdcall CSuperSerialCard::CommReceive(WORD, WORD, BYTE, BYTE, ULONG)
|
|||
if (!m_qTcpSerialBuffer.empty())
|
||||
{
|
||||
// NB. See CommTcpSerialReceive() above, for a note explaining why there's no need for a critical section here
|
||||
|
||||
// If receiver is disabled then transmitting device should not send data
|
||||
// . For COM serial connection this is handled by DTR/DTS flow-control (which enables the receiver)
|
||||
if ((m_uCommandByte & CMD_DTR) == 0) // Receiver disable, so prevent receiving data
|
||||
return 0;
|
||||
|
||||
result = m_qTcpSerialBuffer.front();
|
||||
m_qTcpSerialBuffer.pop_front();
|
||||
|
||||
|
@ -639,7 +641,7 @@ BYTE __stdcall CSuperSerialCard::CommReceive(WORD, WORD, BYTE, BYTE, ULONG)
|
|||
m_vbRxIrqPending = true;
|
||||
}
|
||||
}
|
||||
else if (m_hCommHandle != INVALID_HANDLE_VALUE) // COM
|
||||
else if (m_hCommHandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
EnterCriticalSection(&m_CriticalSection);
|
||||
{
|
||||
|
@ -689,6 +691,10 @@ BYTE __stdcall CSuperSerialCard::CommTransmit(WORD, WORD, BYTE, BYTE value, ULON
|
|||
if (!CheckComm())
|
||||
return 0;
|
||||
|
||||
// If transmitter is disabled then: Is data just discarded or does it get transmitted if transmitter is later enabled?
|
||||
if ((m_uCommandByte & CMD_TX_MASK) == CMD_TX_IRQ_DIS_RTS_HIGH) // Transmitter disable, so just discard for now
|
||||
return 0;
|
||||
|
||||
if (m_hCommAcceptSocket != INVALID_SOCKET)
|
||||
{
|
||||
BYTE data = value;
|
||||
|
@ -744,11 +750,20 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
|
|||
if (!CheckComm())
|
||||
return ST_DSR | ST_DCD | ST_TX_EMPTY;
|
||||
|
||||
DWORD modemStatus = 0;
|
||||
if ((m_hCommHandle != INVALID_HANDLE_VALUE) && (m_bCfgSupportDCD || m_bCfgSupportDSR))
|
||||
DWORD modemStatus = m_kDefaultModemStatus;
|
||||
if (m_hCommHandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
// Do this outside of the critical section (don't know how long it takes)
|
||||
GetCommModemStatus(m_hCommHandle, &modemStatus); // Returns 0x30 = MS_DSR_ON|MS_CTS_ON
|
||||
modemStatus = m_dwModemStatus; // Take a copy of this volatile variable
|
||||
if (!m_bCfgSupportDCD) // Default: DSR state is mirrored to DCD (GH#553)
|
||||
{
|
||||
modemStatus &= ~MS_RLSD_ON;
|
||||
if (modemStatus & MS_DSR_ON)
|
||||
modemStatus |= MS_RLSD_ON;
|
||||
}
|
||||
}
|
||||
else if (m_hCommListenSocket != INVALID_SOCKET && m_hCommAcceptSocket != INVALID_SOCKET)
|
||||
{
|
||||
modemStatus = MS_RLSD_ON | MS_DSR_ON | MS_CTS_ON;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -776,17 +791,8 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
|
|||
|
||||
//
|
||||
|
||||
BYTE DSR = 0;
|
||||
BYTE DCD = 0;
|
||||
|
||||
if ((m_hCommHandle != INVALID_HANDLE_VALUE) && (m_bCfgSupportDCD || m_bCfgSupportDSR)) // GH#386
|
||||
{
|
||||
if (m_bCfgSupportDSR)
|
||||
DSR = (modemStatus & MS_DSR_ON) ? 0x00 : ST_DSR;
|
||||
|
||||
if (m_bCfgSupportDCD)
|
||||
DCD = (modemStatus & MS_RLSD_ON) ? 0x00 : ST_DCD;
|
||||
}
|
||||
BYTE DSR = (modemStatus & MS_DSR_ON) ? 0x00 : ST_DSR; // DSR is active low (see SY6551 datasheet) (GH#386)
|
||||
BYTE DCD = (modemStatus & MS_RLSD_ON) ? 0x00 : ST_DCD; // DCD is active low (see SY6551 datasheet) (GH#386)
|
||||
|
||||
//
|
||||
|
||||
|
@ -798,7 +804,7 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
|
|||
BYTE uStatus =
|
||||
IRQ
|
||||
| DSR
|
||||
| DCD // Need 0x00 to allow ZLink to start up
|
||||
| DCD
|
||||
| TX_EMPTY
|
||||
| RX_FULL;
|
||||
|
||||
|
@ -855,13 +861,11 @@ BYTE __stdcall CSuperSerialCard::CommDipSw(WORD, WORD addr, BYTE, BYTE, ULONG)
|
|||
|
||||
BYTE SW2_5 = m_DIPSWCurrent.bLinefeed ? 0 : 1; // SW2-5 (LF: yes-ON(0); no-OFF(1))
|
||||
|
||||
BYTE CTS = 0; // GH#311
|
||||
BYTE CTS = 1; // Default to CTS being false. (Support CTS in DIPSW: GH#311)
|
||||
if (CheckComm() && m_hCommHandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DWORD modemStatus = 0;
|
||||
if (GetCommModemStatus(m_hCommHandle, &modemStatus))
|
||||
CTS = (modemStatus & MS_CTS_ON) ? 0 : 1; // CTS is true when 0
|
||||
}
|
||||
CTS = (m_dwModemStatus & MS_CTS_ON) ? 0 : 1; // CTS active low (see SY6551 datasheet)
|
||||
else if (m_hCommListenSocket != INVALID_SOCKET)
|
||||
CTS = (m_hCommAcceptSocket != INVALID_SOCKET) ? 0 : 1;
|
||||
|
||||
// SSC-54:
|
||||
sw = SW2_1<<7 | // b7 : SW2-1
|
||||
|
@ -1039,10 +1043,18 @@ void CSuperSerialCard::CheckCommEvent(DWORD dwEvtMask)
|
|||
LeaveCriticalSection(&m_CriticalSection);
|
||||
}
|
||||
}
|
||||
else if (dwEvtMask & EV_TXEMPTY)
|
||||
|
||||
if (dwEvtMask & EV_TXEMPTY)
|
||||
{
|
||||
TransmitDone();
|
||||
}
|
||||
|
||||
if (dwEvtMask & (EV_RLSD|EV_DSR|EV_CTS))
|
||||
{
|
||||
// For Win7-64: takes 1-2msecs!
|
||||
// Don't read from main emulation thread, otherwise a tight 6502 polling loop can kill emulator performance!
|
||||
GetCommModemStatus(m_hCommHandle, const_cast<DWORD*>(&m_dwModemStatus));
|
||||
}
|
||||
}
|
||||
|
||||
DWORD WINAPI CSuperSerialCard::CommThread(LPVOID lpParameter)
|
||||
|
@ -1050,8 +1062,7 @@ DWORD WINAPI CSuperSerialCard::CommThread(LPVOID lpParameter)
|
|||
CSuperSerialCard* pSSC = (CSuperSerialCard*) lpParameter;
|
||||
char szDbg[100];
|
||||
|
||||
BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_TXEMPTY | EV_RXCHAR);
|
||||
// BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_RXCHAR); // Just RX
|
||||
BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_RLSD | EV_DSR | EV_CTS | EV_TXEMPTY | EV_RXCHAR);
|
||||
if (!bRes)
|
||||
{
|
||||
sprintf(szDbg, "SSC: CommThread(): SetCommMask() failed\n");
|
||||
|
|
|
@ -43,8 +43,6 @@ public:
|
|||
void SetSerialPortName(const char* pSerialPortName);
|
||||
bool IsActive() { return (m_hCommHandle != INVALID_HANDLE_VALUE) || (m_hCommListenSocket != INVALID_SOCKET); }
|
||||
void SupportDCD(bool bEnable) { m_bCfgSupportDCD = bEnable; } // Status
|
||||
void SupportDSR(bool bEnable) { m_bCfgSupportDSR = bEnable; } // Status
|
||||
void SupportDTR(bool bEnable) { m_bCfgSupportDTR = bEnable; } // Control
|
||||
|
||||
void CommTcpSerialAccept();
|
||||
void CommTcpSerialReceive();
|
||||
|
@ -98,6 +96,7 @@ private:
|
|||
static SSC_DIPSW m_DIPSWDefault;
|
||||
SSC_DIPSW m_DIPSWCurrent;
|
||||
|
||||
static const UINT m_kDefaultBaudRate = CBR_9600;
|
||||
UINT m_uBaudRate;
|
||||
UINT m_uStopBits;
|
||||
UINT m_uByteSize;
|
||||
|
@ -139,12 +138,11 @@ private:
|
|||
BYTE* m_pExpansionRom;
|
||||
UINT m_uSlot;
|
||||
|
||||
// Modem
|
||||
bool m_bCfgSupportDCD;
|
||||
bool m_bCfgSupportDSR;
|
||||
bool m_bCfgSupportDTR;
|
||||
UINT m_uDTR;
|
||||
// Modem (end)
|
||||
|
||||
static const DWORD m_kDefaultModemStatus = 0; // MS_RLSD_OFF(=DCD_OFF), MS_DSR_OFF, MS_CTS_OFF
|
||||
volatile DWORD m_dwModemStatus; // Updated by CommThread when any of RLSD|DSR|CTS changes / Read by main thread - CommStatus()& CommDipSw()
|
||||
|
||||
UINT m_uRTS;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue