Compare commits

...

59 Commits
0.31 ... master

Author SHA1 Message Date
David Schmidt
7e788187b2
Merge pull request #10 from roadriverrail/master
Network support on modern Linux machines
2020-11-14 11:08:51 -05:00
David Schmidt
d1b556c5c5
Fix from Kent Dickey on the WAI instruction
Fantavision hangs when it starts on KEGS-based emulators (which includes GSport and GSplus) due to a bug in the way KEGS handles the WAI instruction.  Fantavision masks interrupts with SEI, sets a SHR line interrupt, and then does a WAI instruction.  This hangs KEGS since it expects an actual interrupt to end the WAI, but there won't be one since interrupts are masked.  I never realized this was a valid WAI use case.

The fix is easy.  In `instable.h`, change:
```
instcb_SYM              /*  WAI */
        g_wait_pending = 1;
        CYCLES_FINISH
```
(There may be some stale #ifdef ASM code, just ignore that) to:
```
instcb_SYM              /*  WAI */
        if(g_irq_pending) {
                g_wait_pending = 0;
                INC_KPC_1;
        } else {
                g_wait_pending = 1;
        }
```
Kent
2020-08-19 15:24:31 -04:00
Rhett Aultman
b3de3bb4c7 Network support on modern Linux machines
This commit introduces two changes:

* The vars for Linux have been modernized to support building an i386
binary on an x86-64 environment, as x86-64 is the overwhelmingly most
common case these days.

* Vars were introduced to enable Uthernet emulation on Linux.
Instructions on its use are provided in the README.
2020-08-08 19:42:00 -04:00
david-schmidt
3e26fb1ecd Update to latest cygwin libraries 2017-10-10 15:49:24 -04:00
david-schmidt
721a604e9f Aim URLs at Github 2017-10-05 13:33:15 -04:00
David Schmidt
5a36db0663 Update README.md 2017-10-05 13:26:43 -04:00
david-schmidt
409106ed09 Help Maven understand the difference between https and http 2017-10-05 13:23:08 -04:00
david-schmidt
dc00a783cc Rebuilding web content 2017-10-05 13:14:24 -04:00
david-schmidt
1be45607fa Merge branch 'master' of https://github.com/david-schmidt/gsport.git 2017-10-05 13:00:33 -04:00
david-schmidt
8193b7c4d5 Host documentation at Github 2017-10-05 12:59:40 -04:00
David Schmidt
31692f5fa6 Update README.md 2017-10-05 12:23:59 -04:00
david-schmidt
876b4519d0 Front-page items after move to Github 2017-10-05 11:25:17 -04:00
David Schmidt
ec6f8bfbb4 Update to latest text of GPL 2.0 2017-10-05 13:29:07 +00:00
Nick Westgate
bfb8ad621d Fixed Windows joystick support. Has nobody ever used this? <:-| 2017-10-05 10:00:05 +00:00
Nick Westgate
8dda6fd620 Fix F4 can exit app after Alt-Tab 2017-04-16 10:18:11 +00:00
David Schmidt
d83331d9ee Close up a brace for MS URL 2016-01-26 19:34:28 +00:00
Peter
f50274816d Remove an unused variable to cleanup a compiler warning. 2016-01-26 19:10:18 +00:00
Peter
6159ff50c0 Document the steps for building with Visual Studio. Cygwin works too on MS Windows if you prefer. 2016-01-26 19:06:27 +00:00
Peter
9a48a8c099 Update the Visual Studio project files for compatibility with the latest free "2015 Community" edition. If you use an older edition (like 2013), the Visual Studio IDE will present a warning but allow you to continue. 2016-01-26 18:52:33 +00:00
Nick Westgate
1462ff0dfb Corrected some of the standard 16 colours for TEXT/LORES/HIRES/DHIRES with RGB values extracted from ROM 3 IIgs video signals by Koichi Nishida. 2015-10-01 10:04:36 +00:00
Christopher Mason
cddea99bd5 Missed one string. 2015-07-12 00:00:59 +00:00
Christopher Mason
3d256ecb15 Hide virtual printer menus if not building with SDL. Minor formatting changes to menus (consistent casing of "ImageWriter") and clarify that the other virtual printer is an Epson. 2015-07-08 21:35:07 +00:00
Christopher Mason
eda058cd0b Fix Ensoniq DOC swap mode behavior so Ninjaforce's NinjaTracker plays looped instruments correctly. 2015-06-06 02:49:33 +00:00
Peter
6ff24f85d0 Configure the "enable AppleTalk diagnostic messages" flag earlier so that initialization messages get printed. 2015-05-05 18:02:27 +00:00
Christopher Mason
79e49b9915 Enable collate function in Windows printer dialog.
Note, this requires that the printer driver internally supports multiple copies and collation. Otherwise the function will not be available to the user.
2015-05-02 04:51:52 +00:00
Christopher Mason
eeec76ecaf Improve handling of Windows printer dialog when printing to a native printer.
-If printing with multipage mode on, user will be prompted with the Windows printer dialog with each print job. If multipage mode is off, user will be prompted every time printer is reset to avoid being prompted for every page.

-Improved error handling when user clicks "Cancel" on the print dialog. An error dialog is shown and the Virtual Imagewriter falls back to bitmap output.
2015-05-02 04:15:12 +00:00
Christopher Mason
4eb6157e11 Force re-creation of the virtual Imagewriter whenever the user enters the control panel. No need to manually select the "Apply Changes" menu item anymore. Moved printer reset function to the main menu so user can reset the virtual Imagewriter quickly and easily if they have a problem. 2015-04-29 19:59:07 +00:00
Peter
9cc8c5645f Improve the performance of AppleTalk.
Prior to this patch, network boot to the desktop at 8 MHz CPU (with "turbo" AppleTalk timing) took 2:08.  After this patch, the same network boot takes 1:17.

Previously, the bridge processed packets from within the emulator's 60 Hz update loop.  This bottlenecks network performance, so this patch increases the update rate.
2015-04-14 01:25:47 +00:00
Peter
1b370205c1 Change the status lines on Windows to use white text on a black background.
r355 changed the window background from white to black (which looks good in full screen mode), and this revision changes the status lines similarly for consistency.
2015-03-15 20:45:16 +00:00
Christopher Mason
3563ed395e Added typedef USHORT so non-Windows platforms can properly compile scc_socket_driver.c. 2015-03-14 17:57:47 +00:00
Nick Westgate
93ee32f993 Improved error handling for SCC socket dial with port number. 2015-02-12 20:05:42 +00:00
Christopher Mason
5cc387205e Always show mouse cursor when printer selection dialog is shown. Previously the cursor was hidden when under GS/OS or when the mouse was "captured" via F8. 2015-02-09 02:23:14 +00:00
Nick Westgate
514a316566 Fix VS warning that should be an error! 2015-02-08 08:47:42 +00:00
Nick Westgate
383f658123 Added SCC socket dial with port number code from Andrew Roughan. Fixed socket closing for Windows. 2015-02-08 06:00:40 +00:00
Christopher Mason
199e2f9a76 Add support to Imagewriter for multiple page sizes and banner printing. 2015-02-08 04:55:32 +00:00
Nick Westgate
502b3f50d9 Integer-only scaled full-screen mode on Windows. (Non-integer scaling can be enabled in the source.) Doing this fixed an existing bug where full-screen restore swapped window position X and Y. 2015-02-06 02:12:28 +00:00
Christopher Mason
a823643faa Fix page margins in Windows once and for all. Clip the source bitmap by the equivalent amount given by the printer driver. Also set the default left margin of the emulated Imagewriter to 1/4 inch. 2015-02-04 05:39:25 +00:00
Christopher Mason
766a0744d8 Add menu item to allow user to apply changes to emulated Imagewriter without restarting GSport. To use, make changes and then select "Apply Changes". 2015-02-03 00:02:45 +00:00
Nick Westgate
fa8313dd1c Fix 5.25 track stepping bug. The only test case is that Mabel's Mansion now boots. 2015-02-02 09:51:26 +00:00
Christopher Mason
753d907315 Slight tweak to pixel resize function for low resolution output. 2015-02-01 20:38:39 +00:00
Christopher Mason
05e6b4c389 Fix Windows printer output to be centered regardless of the margin offsets imposed by a printer driver.
Switch emulated Imagewriter to using page units equivalent to Postscript points (1/72th of an inch) vs 1/10th of an inch. This is to aid in adding additional paper size support in the future.
2015-02-01 20:13:14 +00:00
Peter
e3b7bcd23e Fix a mis-located #endif that would cause the C compiler to skip ImageWriter related function prototypes. Missing prototypes triggered several compiler warnings. 2015-01-07 02:20:23 +00:00
Christopher Mason
ce319c9370 Speed up serial transfer to Virtual Imagewriter. 2014-12-16 21:56:24 +00:00
Christopher Mason
7e57fdbe9c Fix annoying Ensoniq DOC bug that was causing out-of-tune notes in Synthlab and Diversi-Tune. 2014-08-31 03:17:37 +00:00
Christopher Mason
fdead45d01 Implement RLE and ASCII85 encoding on color Postscript output in the Imagewriter emulator. Fix B&W Postscript output scaling bug. 2014-07-30 03:55:12 +00:00
Christopher Mason
4c064fd973 Add vars_x86linux_sdl so folks can build virtual printer support under Linux X11. 2014-07-23 01:28:17 +00:00
David Schmidt
ae7f849af1 Update build instructions for Raspberry Pi 2014-07-10 20:24:35 +00:00
David Schmidt
2432232a60 Trim up the emulated printer documentation 2014-06-26 17:24:08 +00:00
David Schmidt
7e21d64bf0 Update web assets for latest Maven 2014-06-26 16:35:45 +00:00
David Schmidt
8266911a0c Add Christopher Mason's emulated Imagewriter LQ/II doc 2014-06-26 16:34:03 +00:00
David Schmidt
764d461650 Add images for Imagewriter printing 2014-06-26 16:33:06 +00:00
Peter
b36637b133 Remove the AppleTalk "notes.txt" file because the content has migrated to "appletalk.apt". 2014-06-22 20:02:15 +00:00
Peter
c5c82a8c3b Fix two minor typos in the AppleTalk documentation. 2014-06-22 20:00:06 +00:00
David Schmidt
f6925df523 Update version number on site 2014-06-22 13:14:49 +00:00
David Schmidt
a384976235 Re-order release details to put Appletalk first, assign version and date 2014-06-22 13:12:36 +00:00
David Schmidt
ad5e769d90 Better page naming 2014-06-22 02:01:15 +00:00
David Schmidt
e249a055e1 Update web assets for latest maven 2014-06-21 21:46:26 +00:00
David Schmidt
b31c745d6f Update website creation scripts for new content 2014-06-21 21:31:59 +00:00
David Schmidt
7b565978dc Update web documentation to include Peter Neubauer's AppleTalk implementation 2014-06-21 21:28:06 +00:00
89 changed files with 2470 additions and 450 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.project
/GSport.app

View File

@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -277,4 +277,63 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

26
README.md Normal file
View File

@ -0,0 +1,26 @@
# GSport: an Apple IIgs Emulator
GSport is a portable (in the programming sense) Apple IIgs emulator, based on the KEGS cross-platform IIgs emulator by Kent Dickey. The base emulator builds and runs on all of the same platforms that KEGS did, and the new capabilities are being integrated as contributors have time and interest. Full documentation is available at the GSport website [here.](https://david-schmidt.github.io/gsport/)
[![alt](https://raw.githubusercontent.com/david-schmidt/gsport/master/doc/web/src/site/resources/images/gsport.png)](https://david-schmidt.github.io/gsport/) [![Download Link](https://raw.githubusercontent.com/david-schmidt/gsport/master/doc/web/src/site/resources/images/download.png)](https://github.com/david-schmidt/gsport/releases)
## Now with network support on Linux!
The GSPort project has been updated to support building for modern 64-bit Linux systems, including support for
networking via the Uthernet emulation! This has only been tested on a Ubuntu 18.04 machine and may require some
tweaking, but the following steps have worked:
* Make sure multiarch support is enabled
* Download the i386 libraries, especially libX11, libXext, and libpcap (e.g. `sudo apt install libpcap-dev:i386`, etc)
* `cd src`, `ln -s vars_x86linux vars`, and `make`, and you're on your way
One important note is that the Uthernet emulation relies on sending layer 2 frames in the raw and the use of
promiscuous mode to discover frames addressed to the MAC of the emulated Uthernet card. Because of this *wifi is not
supported*! I repeat **wifi is not supported**! It's highly encouraged you start out running this on a machine with
only one active interface, and that interface should be wired Ethernet.
## Project Goals
The main goal for GSport is to provide a free, open ecosystem for the continuation of cross-platform development of IIgs emulation.
Some interesting advances that initially spawned this project are Uthernet and printer support. Now that those objectives are met, we will move on to the next objectives. Do you have something that you wish a GS emulator did? Dive in and contribute!

1
doc/web/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target/

View File

@ -4,4 +4,4 @@
@REM
call c:\dev\env
rmdir /q /s target
call mvn site
call mvn site

View File

@ -1,8 +1,11 @@
cd target\site
perl -i.orig -p ..\..\removeMaven.re appletalk.html
perl -i.orig -p ..\..\removeMaven.re developing.html
perl -i.orig -p ..\..\removeMaven.re ethernet.html
perl -i.orig -p ..\..\removeMaven.re history.html
perl -i.orig -p ..\..\removeMaven.re index.html
perl -i.orig -p ..\..\removeMaven.re operating.html
perl -i.orig -p ..\..\removeMaven.re printer.html
erase *.orig
cd ..\..
xcopy /y target\site\* /s ..\..\docs

View File

@ -1,9 +1,11 @@
#!/bin/sh
cd target/site
perl -i.orig -p ../../removeMaven.re developing.html
perl -i.orig -p ../../removeMaven.re ethernet.html
perl -i.orig -p ../../removeMaven.re history.html
perl -i.orig -p ../../removeMaven.re index.html
perl -i.orig -p ../../removeMaven.re operating.html
perl -i.orig -p ../../removeMaven.re printer.html
cd ../..
#!/bin/sh
cd target/site
perl -i.orig -p ../../removeMaven.re appletalk.html
perl -i.orig -p ../../removeMaven.re developing.html
perl -i.orig -p ../../removeMaven.re ethernet.html
perl -i.orig -p ../../removeMaven.re history.html
perl -i.orig -p ../../removeMaven.re index.html
perl -i.orig -p ../../removeMaven.re operating.html
perl -i.orig -p ../../removeMaven.re printer.html
rm *.orig
cd ../..

View File

@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gsport</groupId>
<artifactId>doc</artifactId>
<version>Website</version>
<version>0.31</version>
<name>GSport</name>
<url>http://maven.apache.org/maven2</url>
<url>https://github.com/david-schmidt/gsport</url>
<inceptionYear>2010</inceptionYear>
<organization>
<name>GSport Contributors</name>
@ -18,4 +18,19 @@
</distributionManagement>
<build>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.6</version>
<reportSets>
<reportSet>
<reports><!-- select reports -->
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,6 +1,7 @@
s@\<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"\>@<a href="http://sourceforge.net/projects/gsport"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=315628&amp;type=13" width="120" height="30" alt="Get GSport at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>@ig;s@\<img alt="Built by Maven" src="\./images/logos/maven-feather.png"\>\</img\>@<p>@ig;
s@href="http://sourceforge.net/projects/gsport/files/"@href="http://sourceforge.net/projects/gsport/files/" target\="_new"@ig;
s@\<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"\>@<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>@ig;s@\<img alt="Built by Maven" src="\./images/logos/maven-feather.png"\>\</img\>@<p>@ig;
s@href="https://github.com/david-schmidt/gsport/releases"@href="http://sourceforge.net/projects/gsport/files/" target\="_new"@ig;
s@\</body\>@\<!-- Piwik --\> \<script type\=\"text\/javascript\"\> var pkBaseURL \= \(\(\"https:\" \=\= document.location.protocol\) ? \"https:\/\/sourceforge.net\/apps\/piwik\/gsport\/\" : \"http:\/\/sourceforge.net\/apps\/piwik\/gsport\/\"\); document.write\(unescape\(\"%3Cscript src\='\" + pkBaseURL + \"piwik.js' type\='text\/javascript'%3E%3C\/script%3E\"\)\); \<\/script\>\<script type\=\"text\/javascript\"\> try { var piwikTracker \= Piwik.getTracker\(pkBaseURL + \"piwik.php\", 1\);piwikTracker.trackPageView\(\); piwikTracker.enableLinkTracking\(\);} catch\( err \) {} \<\/script\>\<noscript\>\<p\>\<img src\=\"http:\/\/sourceforge.net\/apps\/piwik\/gsport\/piwik.php?idsite\=1\" style\=\"border:0\" alt\=\"\"\/\>\<\/p\>\<\/noscript\>\<!-- End Piwik Tag --\>@ig;
s@<img src="images/download.png" />@<a href="http://sourceforge.net/projects/gsport/files/" target\="_new"><img src="images/download.png" /></a>@ig;
s@<img src="images/gsport.png" />@<a href="http://sourceforge.net/projects/gsport/files/" target\="_new"><img src="images/gsport.png" /></a>@ig;
s@<img src="images/download.png" alt="" />@<a href="https://github.com/david-schmidt/gsport/releases" target\="_new"><img src="images/download.png" /></a>@ig;
s@<img src="images/gsport.png" />@<a href="https://github.com/david-schmidt/gsport/releases" target\="_new"><img src="images/gsport.png" /></a>@ig;
s@\<img class="poweredBy" alt="Built by Maven" src="\./images/logos/maven-feather.png" \/\>@@ig;
s@http://github.com@https://github.com@ig;

View File

@ -0,0 +1,109 @@
-----
GSport AppleTalk
-----
Peter Neubauer
-----
AppleTalk Emulation and Bridging for GSport
GSport now emulates the AppleTalk networking hardware found in the real Apple IIgs and bridges the networking packets to EtherTalk v2. GSport supports file
sharing, printer sharing, and network booting features using Apple's original AppleTalk software, such as that shipped with GS/OS 6.0.1. Note that the
original AppleTalk software is not directly compatible with modern software, and you will need a compatible file server, such as netatalk or A2SERVER.
* Introduction
The Apple IIgs shipped with a fantastic but often overlooked feature -- AppleTalk networking. AppleTalk is a low-cost, easy-to-maintain network technology that
enables network booting, file sharing, and printer sharing between your Apple IIgs, Workstation Card equipped Apple IIe, and classic Macintosh machines. As of
March 2014, GSport is the first modern emulator with support for AppleTalk. Now, you can just "drag and drop" files between your machines without thinking about
disk images, FTP, or serial cables. You can develop new software with an emulator and quickly test on real hardware. You don't need to think much about version
control. Rather, you can update the file once on your file server, and all of your emulated and real machines have the new file. You can download the latest
Apple II software and immediately run it.
Beware that Apple changed the meaning of the word "AppleTalk." Originally, AppleTalk implied a physical layer using 3-pin MiniDIN shielded cables connected in a
bus topology. As other physical layers such as Ethernet and TokenTalk became more affordable, Apple defined new terms. The term AppleTalk no longer implied
MiniDIN cabling. Rather, AppleTalk became the overall term for Apple's approach to networking. LocalTalk refers to AppleTalk using the original MiniDIN physical
and link layers. EtherTalk refers to AppleTalk using the Ethernet link and physical layers. TokenTalk refers to AppleTalk using the TokenRing link and physical
layers. As the Internet became popular, Apple revised their approach to networking to use TCP/IP for the network and transport layers. The "Internet modernized"
AppleTalk (AppleTalk IP) replaces many key services of the older AppleTalk and is incompatible with the previous incarnation of AppleTalk. The IIgs only supports
AppleTalk using LocalTalk. The GSport emulation converts LocalTalk to EtherTalk but does <<not>> support AppleTalk over IP.
* Using It
First, you need an AppleShare-compatible server. A classic Mac or "netatalk" server could provide this function. For simplicity, I recommend Ivan Drucker's
A2SERVER ({{{http://appleii.ivanx.com/a2server/}http://appleii.ivanx.com/a2server/}}), which is a pre-configured and easy-to-use package with "netatalk" and other useful tools. You may run A2SERVER in
a VirtualBox virtual machine, on an existing Linux server, or on a Raspberry Pi. File and print sharing functions built-in to modern computers are not directly
compatible.
Second, you need GSport 0.3 or later with ROM03 running on a Windows or Linux (x86 or Raspberry Pi) machine. Start GSport and press F4 to access the configuration
menu. If necessary, select a ROM03 image. Select the "Ethernet Card Configuration" menu option. Change "AppleTalk Bridging" to "On". Change "Use Interface
Number" to select the network where you have attached your AppleShare server or A2SERVER. Exit the GSport configuration menu.
You may run GSport and netatalk (or A2SERVER) on the same machine:
On Windows:
[[]] Configure A2SERVER in a VirtualBox virtual machine. The A2SERVER project provides a pre-configured virtual machine as well as manual installation directions.
[[]] Install the "Microsoft Loopback Adapter" following directions from Microsoft.
See {{{http://blogs.msdn.com/b/ukvsts/archive/2009/02/27/adding-the-ms-loopback-adapter-on-windows-7.aspx}http://blogs.msdn.com/b/ukvsts/archive/2009/02/27/adding-the-ms-loopback-adapter-on-windows-7.aspx}} and
{{{http://technet.microsoft.com/en-us/library/cc708322%28v=ws.10%29.aspx}http://technet.microsoft.com/en-us/library/cc708322%28v=ws.10%29.aspx}}.
[[]] In the VirtualBox Manager, open "Settings" for the A2SERVER virtual machine. Select the "Network" section. Change the "Attached to" option to "Bridged Adapter"
and "Name" to "Microsoft Loopback Adapter". Under the "Advanced" sub-section, make sure "Promiscuous Mode" is "Allow All".
[[]] Restart A2SERVER.
[[]] Restart GSport. Under the "Ethernet Card Configuration" menu, change "Use Interface Number" to select the "MS LoopBack Driver".
On Linux:
(Directions are forthcoming.)
Finally, party like it is 1989. Your GS is now connected to the AppleTalk network. Refer to Apple's documentation included with GS/OS System 5 and 6 for further
directions.
* Internal Overview
GSport with AppleTalk networking is functionally equivalent to a real Apple IIgs with a LocalTalk/EtherTalk bridge. Originally, AppleTalk employed the "LocalTalk"
physical layer, which requires special hardware not found on modern computers. GSport converts LocalTalk to EtherTalk, a somewhat more modern physical layer using
familiar Ethernet cabling. Internally, GSport emulates the Zilog SCC chip in the IIgs, communicates with unmodified Apple-provided networking software built-in to
the IIgs and GS/OS, and converts the network traffic to EtherTalk.
* Limitations
* The IIgs hardware and GSport only support AppleTalk using LocalTalk. Neither are compatible with file or print sharing functions in modern computers. Instead,
run a compatible network server, such as A2SERVER, Netatalk 2.x, or AppleShare.
* A wireless network may not work because many wireless adapters drop EtherTalk packets. Instead, use a wired Ethernet connection.
* AppleTalk bridging has been tested with System 6.0.1 and System 5.0.2 on ROM03. Booting from a local disk or from the network works. Other ROM revisions and
system software may not work.
* The SCC baud rate is incorrect because the GSport does not emulate line coding. Still, emulated network speed should be close to the 230.4kbps speed of a real
LocalTalk network.
* The bridge supports Windows using Visual Studio, Cygwin, and Linux (x86 and Raspberry Pi). Other platforms should be straightforward, but I do not have a suitable
build environment.
* The bridge requires an AppleTalk router on the network. The bridge should work in both a routerless and router-filled network, and future revisions will remove
this limitation.
* The bridge works with simple networks consisting of a single network on a single segment with a single zone. The bridge should function with all valid network
configurations and hardware routers, and future revisions will remove this limitation. Other configurations might not work, and I welcome reports.
* The bridge implements the non-extended method for acquiring the network number. Interoperability would likely be better using the extended method, but this method
is much more complex.
* Credits
Thanks to Gursharan Sidhu, Richard Andrews, and Alan Oppenheimer for creating and documenting AppleTalk.
Thanks to Kent Dickey and the GSport contributors for GSport and the original SCC emulation.
Thanks to David Schmenk for testing, encouragement, and Raspberry Pi support.
Thanks to Ivan Drucker for A2SERVER.
Thanks to the Gus emulator engineers for showing that AppleTalk emulation is possible.
Thanks to James Littlejohn for discussions about extending the capabilities of the Apple IIgs.

View File

@ -1,7 +1,7 @@
-----
Developing GSport
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
Developing GSport
@ -26,6 +26,12 @@ The Win32 code in GSport is leveraged from KEGS32.
GSport can be compiled with {{{http://www.mingw.org/}Mingw}}
and {{{http://www.cygwin.com/}Cygwin}} as well as via standard Microsoft compiler suites.
In order to compile with the standard Microsoft compiler suites, download and
install {{{https://www.visualstudio.com/downloads/download-visual-studio-vs}Microsoft Visual Studio Community 2015 from Microsoft's website}}.
The build process requires Perl, such as {{{http://www.activestate.com/activeperl}ActiveState ActivePerl}}.
Within Visual Studio, open the "gsport.sln" solution file. Set the "gsport" project as the "StartUp Project",
and choose "Build Solution" from the "Build" menu.
In order to compile with Cygwin:
------------------
@ -117,6 +123,8 @@ come out.
* libxext-dev: <<<sudo apt-get install libxext-dev>>>
* libpcap-dev: <<<sudo apt-get install libpcap-dev>>>
[]
@ -234,6 +242,6 @@ make
* You'll probably want a monospaced TrueType font file easily accessible to add as part of the GSport configuration
* Run through the emulated printer {{{printer.html}configuration}} steps
* Run through the emulated printer {{{./printer.html}configuration}} steps
[]

View File

@ -1,7 +1,7 @@
-----
GSport Ethernet
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
GSport Emulated Ethernet

View File

@ -1,15 +1,17 @@
-----
GSport History
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
GSport Release History
* Unreleased - in SVN now
* Version 0.31 - 6/22/2014
New functionality:
* Added {{{./appletalk.html}AppleTalk}} networking emulation with bridging to EtherTalk
* Added clipboard text paste capability (OSX, Windows)
* Emulated serial ports are individually configurable as either
@ -17,9 +19,6 @@ GSport Release History
* Added Imagewriter LQ printer emulation
* Added AppleTalk networking emulation with bridging to EtherTalk.
Related, there are improvements and bug fixes to the SCC emulation.
[]
Bug fixes:
@ -31,7 +30,7 @@ GSport Release History
* Fixed crash when parallel.rom is missing
* Fix for real joysticks: unless the joystick is moving, gsport
sets the values to zero.
sets the values to zero
[]

View File

@ -1,7 +1,7 @@
-----
GSport Project Page
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
GSport
@ -23,5 +23,5 @@ of cross-platform development of IIgs emulation.
Some interesting advances that initially spawned this project are Uthernet and printer support.
As those objectives are met, we will move on to the next objectives.
Do you have something that you wish a GS emulator did?
Submit a request {{{http://sourceforge.net/tracker/?group_id=315628&atid=1327836}here,}}
or better yet - dive in and {{{https://sourceforge.net/project/memberlist.php?group_id=315628}contribute!}}
Submit an issue {{{https://github.com/david-schmidt/gsport/issues}here,}}
or better yet - dive in and {{{https://github.com/david-schmidt/gsport}contribute!}}

View File

@ -1,7 +1,7 @@
-----
Operating GSport
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
Operating GSport
@ -39,7 +39,7 @@ Hit the "F4" key and see below for how to tell GSport what disk images to use.
Tip: Hitting "F8" locks the mouse in the window (and hides the host cursor)
until you hit "F8" again.
See the the {{{developing.html}developing}} page for information about developing GSport and compiliing it for yourself.
See the the {{{./developing.html}developing}} page for information about developing GSport and compiliing it for yourself.
* Configuration Panel

View File

@ -1,19 +1,22 @@
-----
GSport Printer
GSport Printers
-----
David Schmidt (david__schmidt at users dot souceforge dot net)
David Schmidt (1110325+david-schmidt@users.noreply.github.com)
-----
GSport Emulated Printer
GSport Emulated Printers
There are several different ways of using the virtual printer output.
Common scenarios are detailed below:
There are two classes of printers emulated by GSport: an Epson LQ connected by a virtual serial card in slot 1,
and an Apple Imagewriter LQ or Imagewriter II attached to serial port 1.
Set up for common printing scenarios is detailed below:
* Windows {{{printer.html#Bitmap}Bitmap or Postscript}} (B&W) - when you want a graphical file saved on the host computer
* Emulated {{{./printer.html#Imagewriter}Imagewriter LQ/II}} - when you want to emulate an Imagewriter LQ or Imagewriter II specifically in slot 1
* Direct to {{{printer.html#Host}host printer}} - when you want a real, paper-based copy immediately (or, a Postscript file with an appropriate printer driver)
* Windows {{{./printer.html#Bitmap}Bitmap or Postscript}} (B&W) - when you want a graphical file saved on the host computer
* {{{printer.html#Text}Text File}} - when you want a file of plain text saved on the host computer
* Direct to {{{./printer.html#Host}host printer}} - when you want a real, paper-based copy immediately (or, a Postscript file with an appropriate printer driver)
* {{{./printer.html#Text}Text File}} - when you want a file of plain text saved on the host computer
[]
@ -30,6 +33,41 @@ Most applications are good about sending form feeds at page end, so this issue d
Printing emulation won't work if no fonts at all are defined.
Any other mono-spaced TrueType font you have may also be used.
* Emulated {Imagewriter} LQ/II
In GSport's internal control panel:
[[]] Under "Serial Port Configuration" set Port 0 to "Virtual Imagewriter"
[images/printerI1.png]
[[]] Under "Virtual Imagewriter Configuration" you need to configure fonts. GSport comes with a fixed width font installed and pre-configured. Set any proportional font you wish to use. If you plan on using native Windows printer output or Postscript, set Multipage Files to "Yes". The default printer timeout of 2 seconds is fine if you are running the machine in 8Mhz or unlimited speed modes. Set it higher if you are running at 1Mhz or 2.8Mhz since the printer may time out while the computer is "thinking" during print jobs.
[images/printerI2.png]
[]
Printer DPI should be set to at least 720x720dpi for Imagewriter LQ resolution output (mostly GS/OS). Use 1440x1440dpi if you have a high resolution inkjet printer and plan on printing pure text documents. It also minimizes scaling artifacts when printing graphics.
Printer Type just changes the self ID string sent by the printer when the "ESC-?" command is sent. This is used by the driver included in GS/OS to determine what type of printer is connected and whether a color ribbon is installed. Set it to Imagewriter LQ in most cases.
<<Save your settings and restart GSport to apply your configuration changes!>>
(This will likely be fixed in a future release.)
In the native IIgs control panel:
[[]] Under "Slots", Slot 1 should be set to "Printer Port"
[[]] Under "Printer Port" leave everything at its default setting, but set baud rate to 19200. It is highly recommended that you install the QuickPort CDA and set the port speed to "57600". Since we are using the SCC emulation, the speed that data is transferred to the virtual printer is limited by the baud rate set by the emulated environment.
[]
8-bit and non-Printer Manager IIgs applications (like Printshop GS) should work without a problem after configuring them to print to an Imagewriter connected to slot 1. When printing text in programs like Appleworks, be sure to set page margins. By default, the emulator starts printing at the upper left hand corner of the virtual "page".
GS/OS requires configuration in the "DC Printer" control panel. Make sure you install the printer drivers from your GS/OS disk set. Set the port to "Printer" and type to "Imagewriter.LQ". If you have Harmonie, use its "Printer57.6" port driver as it greatly speeds up printing (the built in port driver appears to be hard coded to 19200 baud max). Do not use its "Printer.HAR" port driver as it sends junk text to the printer for some reason. Harmonie's "IWriterLQ.HAR" and "Imagewriter.HAR" drivers have been tested and are fully compatible with the printer emulator. They do not query the printer with ESC-?, so the setting of Printer Type in the GSport control panel doesn't matter with these. Both Harmonie and Pointless are highly recommended for the best quality output in GS/OS.
The printer emulator supports all Imagewriter II and LQ functions documented in Apple's official reference manuals. Mousetext and custom character definitions are NOT supported. This is consistent with a real Imagewriter LQ. Only the Imagewriter II supported those functions.
* Windows {Bitmap} or Postscript
To set up GSport to write .BMP or .PS files for each "page" produced, apply the following settings:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -8,17 +8,18 @@
</bannerRight>
<body>
<links>
<item name="Download" href="http://sourceforge.net/projects/gsport/files"/>
<item name="Sourceforge Project Page" href="http://sourceforge.net/projects/gsport/"/>
<item name="Download" href="http://github.com/david-schmidt/gsport/releases"/>
<item name="Project Development Page" href="http://github.com/david-schmidt/gsport"/>
</links>
<menu name="GSport">
<item name="Main" href="index.html"/>
<item name="Download" href="http://sourceforge.net/projects/gsport/files"/>
<item name="Download" href="http://github.com/david-schmidt/gsport/releases"/>
<item name="Operating" href="operating.html"/>
<item name="Developing" href="developing.html"/>
<item name="Emulated Appletalk" href="appletalk.html"/>
<item name="Emulated Ethernet" href="ethernet.html"/>
<item name="Emulated Printer" href="printer.html"/>
<item name="Emulated Printers" href="printer.html"/>
<item name="History" href="history.html"/>
</menu>

148
docs/appletalk.html Normal file
View File

@ -0,0 +1,148 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - GSport AppleTalk</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="Peter Neubauer" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<strong>Emulated Appletalk</strong>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>AppleTalk Emulation and Bridging for GSport<a name="AppleTalk_Emulation_and_Bridging_for_GSport"></a></h2>
<p>GSport now emulates the AppleTalk networking hardware found in the real Apple IIgs and bridges the networking packets to EtherTalk v2. GSport supports file sharing, printer sharing, and network booting features using Apple's original AppleTalk software, such as that shipped with GS/OS 6.0.1. Note that the original AppleTalk software is not directly compatible with modern software, and you will need a compatible file server, such as netatalk or A2SERVER.</p>
<div class="section">
<h3>Introduction<a name="Introduction"></a></h3>
<p>The Apple IIgs shipped with a fantastic but often overlooked feature -- AppleTalk networking. AppleTalk is a low-cost, easy-to-maintain network technology that enables network booting, file sharing, and printer sharing between your Apple IIgs, Workstation Card equipped Apple IIe, and classic Macintosh machines. As of March 2014, GSport is the first modern emulator with support for AppleTalk. Now, you can just &quot;drag and drop&quot; files between your machines without thinking about disk images, FTP, or serial cables. You can develop new software with an emulator and quickly test on real hardware. You don't need to think much about version control. Rather, you can update the file once on your file server, and all of your emulated and real machines have the new file. You can download the latest Apple II software and immediately run it.</p>
<p>Beware that Apple changed the meaning of the word &quot;AppleTalk.&quot; Originally, AppleTalk implied a physical layer using 3-pin MiniDIN shielded cables connected in a bus topology. As other physical layers such as Ethernet and TokenTalk became more affordable, Apple defined new terms. The term AppleTalk no longer implied MiniDIN cabling. Rather, AppleTalk became the overall term for Apple's approach to networking. LocalTalk refers to AppleTalk using the original MiniDIN physical and link layers. EtherTalk refers to AppleTalk using the Ethernet link and physical layers. TokenTalk refers to AppleTalk using the TokenRing link and physical layers. As the Internet became popular, Apple revised their approach to networking to use TCP/IP for the network and transport layers. The &quot;Internet modernized&quot; AppleTalk (AppleTalk IP) replaces many key services of the older AppleTalk and is incompatible with the previous incarnation of AppleTalk. The IIgs only supports AppleTalk using LocalTalk. The GSport emulation converts LocalTalk to EtherTalk but does <b>not</b> support AppleTalk over IP.</p></div>
<div class="section">
<h3>Using It<a name="Using_It"></a></h3>
<p>First, you need an AppleShare-compatible server. A classic Mac or &quot;netatalk&quot; server could provide this function. For simplicity, I recommend Ivan Drucker's A2SERVER (<a class="externalLink" href="http://appleii.ivanx.com/a2server/">http://appleii.ivanx.com/a2server/</a>), which is a pre-configured and easy-to-use package with &quot;netatalk&quot; and other useful tools. You may run A2SERVER in a VirtualBox virtual machine, on an existing Linux server, or on a Raspberry Pi. File and print sharing functions built-in to modern computers are not directly compatible.</p>
<p>Second, you need GSport 0.3 or later with ROM03 running on a Windows or Linux (x86 or Raspberry Pi) machine. Start GSport and press F4 to access the configuration menu. If necessary, select a ROM03 image. Select the &quot;Ethernet Card Configuration&quot; menu option. Change &quot;AppleTalk Bridging&quot; to &quot;On&quot;. Change &quot;Use Interface Number&quot; to select the network where you have attached your AppleShare server or A2SERVER. Exit the GSport configuration menu.</p>
<p>You may run GSport and netatalk (or A2SERVER) on the same machine:</p>
<p>On Windows:</p>
<ol style="list-style-type: decimal">
<li>Configure A2SERVER in a VirtualBox virtual machine. The A2SERVER project provides a pre-configured virtual machine as well as manual installation directions.</li>
<li>Install the &quot;Microsoft Loopback Adapter&quot; following directions from Microsoft. See <a class="externalLink" href="http://blogs.msdn.com/b/ukvsts/archive/2009/02/27/adding-the-ms-loopback-adapter-on-windows-7.aspx">http://blogs.msdn.com/b/ukvsts/archive/2009/02/27/adding-the-ms-loopback-adapter-on-windows-7.aspx</a> and <a class="externalLink" href="http://technet.microsoft.com/en-us/library/cc708322%28v=ws.10%29.aspx">http://technet.microsoft.com/en-us/library/cc708322%28v=ws.10%29.aspx</a>.</li>
<li>In the VirtualBox Manager, open &quot;Settings&quot; for the A2SERVER virtual machine. Select the &quot;Network&quot; section. Change the &quot;Attached to&quot; option to &quot;Bridged Adapter&quot; and &quot;Name&quot; to &quot;Microsoft Loopback Adapter&quot;. Under the &quot;Advanced&quot; sub-section, make sure &quot;Promiscuous Mode&quot; is &quot;Allow All&quot;.</li>
<li>Restart A2SERVER.</li>
<li>Restart GSport. Under the &quot;Ethernet Card Configuration&quot; menu, change &quot;Use Interface Number&quot; to select the &quot;MS LoopBack Driver&quot;.</li></ol>
<p>On Linux:</p>
<p>(Directions are forthcoming.)</p>
<p>Finally, party like it is 1989. Your GS is now connected to the AppleTalk network. Refer to Apple's documentation included with GS/OS System 5 and 6 for further directions.</p></div>
<div class="section">
<h3>Internal Overview<a name="Internal_Overview"></a></h3>
<p>GSport with AppleTalk networking is functionally equivalent to a real Apple IIgs with a LocalTalk/EtherTalk bridge. Originally, AppleTalk employed the &quot;LocalTalk&quot; physical layer, which requires special hardware not found on modern computers. GSport converts LocalTalk to EtherTalk, a somewhat more modern physical layer using familiar Ethernet cabling. Internally, GSport emulates the Zilog SCC chip in the IIgs, communicates with unmodified Apple-provided networking software built-in to the IIgs and GS/OS, and converts the network traffic to EtherTalk.</p></div>
<div class="section">
<h3>Limitations<a name="Limitations"></a></h3>
<ul>
<li>The IIgs hardware and GSport only support AppleTalk using LocalTalk. Neither are compatible with file or print sharing functions in modern computers. Instead, run a compatible network server, such as A2SERVER, Netatalk 2.x, or AppleShare.</li>
<li>A wireless network may not work because many wireless adapters drop EtherTalk packets. Instead, use a wired Ethernet connection.</li>
<li>AppleTalk bridging has been tested with System 6.0.1 and System 5.0.2 on ROM03. Booting from a local disk or from the network works. Other ROM revisions and system software may not work.</li>
<li>The SCC baud rate is incorrect because the GSport does not emulate line coding. Still, emulated network speed should be close to the 230.4kbps speed of a real LocalTalk network.</li>
<li>The bridge supports Windows using Visual Studio, Cygwin, and Linux (x86 and Raspberry Pi). Other platforms should be straightforward, but I do not have a suitable build environment.</li>
<li>The bridge requires an AppleTalk router on the network. The bridge should work in both a routerless and router-filled network, and future revisions will remove this limitation.</li>
<li>The bridge works with simple networks consisting of a single network on a single segment with a single zone. The bridge should function with all valid network configurations and hardware routers, and future revisions will remove this limitation. Other configurations might not work, and I welcome reports.</li>
<li>The bridge implements the non-extended method for acquiring the network number. Interoperability would likely be better using the extended method, but this method is much more complex.</li></ul></div>
<div class="section">
<h3>Credits<a name="Credits"></a></h3>
<p>Thanks to Gursharan Sidhu, Richard Andrews, and Alan Oppenheimer for creating and documenting AppleTalk.</p>
<p>Thanks to Kent Dickey and the GSport contributors for GSport and the original SCC emulation.</p>
<p>Thanks to David Schmenk for testing, encouragement, and Raspberry Pi support.</p>
<p>Thanks to Ivan Drucker for A2SERVER.</p>
<p>Thanks to the Gus emulator engineers for showing that AppleTalk emulation is possible.</p>
<p>Thanks to James Littlejohn for discussions about extending the capabilities of the Apple IIgs.</p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

155
docs/css/maven-base.css Normal file
View File

@ -0,0 +1,155 @@
body {
margin: 0px;
padding: 0px;
}
img {
border:none;
}
table {
padding:0px;
width: 100%;
margin-left: -2px;
margin-right: -2px;
}
acronym {
cursor: help;
border-bottom: 1px dotted #feb;
}
table.bodyTable th, table.bodyTable td {
padding: 2px 4px 2px 4px;
vertical-align: top;
}
div.clear{
clear:both;
visibility: hidden;
}
div.clear hr{
display: none;
}
#bannerLeft, #bannerRight {
font-size: xx-large;
font-weight: bold;
}
#bannerLeft img, #bannerRight img {
margin: 0px;
}
.xleft, #bannerLeft img {
float:left;
}
.xright, #bannerRight {
float:right;
}
#banner {
padding: 0px;
}
#banner img {
border: none;
}
#breadcrumbs {
padding: 3px 10px 3px 10px;
}
#leftColumn {
width: 170px;
float:left;
overflow: auto;
}
#bodyColumn {
margin-right: 1.5em;
margin-left: 197px;
}
#legend {
padding: 8px 0 8px 0;
}
#navcolumn {
padding: 8px 4px 0 8px;
}
#navcolumn h5 {
margin: 0;
padding: 0;
font-size: small;
}
#navcolumn ul {
margin: 0;
padding: 0;
font-size: small;
}
#navcolumn li {
list-style-type: none;
background-image: none;
background-repeat: no-repeat;
background-position: 0 0.4em;
padding-left: 16px;
list-style-position: outside;
line-height: 1.2em;
font-size: smaller;
}
#navcolumn li.expanded {
background-image: url(../images/expanded.gif);
}
#navcolumn li.collapsed {
background-image: url(../images/collapsed.gif);
}
#navcolumn li.none {
text-indent: -1em;
margin-left: 1em;
}
#poweredBy {
text-align: center;
}
#navcolumn img {
margin-top: 10px;
margin-bottom: 3px;
}
#poweredBy img {
display:block;
margin: 20px 0 20px 17px;
}
#search img {
margin: 0px;
display: block;
}
#search #q, #search #btnG {
border: 1px solid #999;
margin-bottom:10px;
}
#search form {
margin: 0px;
}
#lastPublished {
font-size: x-small;
}
.navSection {
margin-bottom: 2px;
padding: 8px;
}
.navSectionHead {
font-weight: bold;
font-size: x-small;
}
.section {
padding: 4px;
}
#footer {
padding: 3px 10px 3px 10px;
font-size: x-small;
}
#breadcrumbs {
font-size: x-small;
margin: 0pt;
}
.source {
padding: 12px;
margin: 1em 7px 1em 7px;
}
.source pre {
margin: 0px;
padding: 0px;
}
#navcolumn img.imageLink, .imageLink {
padding-left: 0px;
padding-bottom: 0px;
padding-top: 0px;
padding-right: 2px;
border: 0px;
margin: 0px;
}

141
docs/css/maven-theme.css Normal file
View File

@ -0,0 +1,141 @@
body {
padding: 0px 0px 10px 0px;
}
body, td, select, input, li{
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;
}
code{
font-family: Courier, monospace;
font-size: 13px;
}
a {
text-decoration: none;
}
a:link {
color:#36a;
}
a:visited {
color:#47a;
}
a:active, a:hover {
color:#69c;
}
#legend li.externalLink {
background: url(../images/external.png) left top no-repeat;
padding-left: 18px;
}
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url(../images/external.png) right center no-repeat;
padding-right: 18px;
}
#legend li.newWindow {
background: url(../images/newwindow.png) left top no-repeat;
padding-left: 18px;
}
a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url(../images/newwindow.png) right center no-repeat;
padding-right: 18px;
}
h2 {
padding: 4px 4px 4px 6px;
border: 1px solid #999;
color: #900;
background-color: #ddd;
font-weight:900;
font-size: x-large;
}
h3 {
padding: 4px 4px 4px 6px;
border: 1px solid #aaa;
color: #900;
background-color: #eee;
font-weight: normal;
font-size: large;
}
h4 {
padding: 4px 4px 4px 6px;
border: 1px solid #bbb;
color: #900;
background-color: #fff;
font-weight: normal;
font-size: large;
}
h5 {
padding: 4px 4px 4px 6px;
color: #900;
font-size: normal;
}
p {
line-height: 1.3em;
font-size: small;
}
#breadcrumbs {
border-top: 1px solid #aaa;
border-bottom: 1px solid #aaa;
background-color: #ccc;
}
#leftColumn {
margin: 10px 0 0 5px;
border: 1px solid #999;
background-color: #eee;
}
#navcolumn h5 {
font-size: smaller;
border-bottom: 1px solid #aaaaaa;
padding-top: 2px;
color: #000;
}
table.bodyTable th {
color: white;
background-color: #bbb;
text-align: left;
font-weight: bold;
}
table.bodyTable th, table.bodyTable td {
font-size: 1em;
}
table.bodyTable tr.a {
background-color: #ddd;
}
table.bodyTable tr.b {
background-color: #eee;
}
.source {
border: 1px solid #999;
}
dl {
padding: 4px 4px 4px 6px;
border: 1px solid #aaa;
background-color: #ffc;
}
dt {
color: #900;
}
#organizationLogo img, #projectLogo img, #projectLogo span{
margin: 8px;
}
#banner {
border-bottom: 1px solid #fff;
}
.errormark, .warningmark, .donemark, .infomark {
background: url(../images/icon_error_sml.gif) no-repeat;
}
.warningmark {
background-image: url(../images/icon_warning_sml.gif);
}
.donemark {
background-image: url(../images/icon_success_sml.gif);
}
.infomark {
background-image: url(../images/icon_info_sml.gif);
}

7
docs/css/print.css Normal file
View File

@ -0,0 +1,7 @@
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {
display: none !important;
}
#bodyColumn, body.docs div.docs {
margin: 0 !important;
border: none !important
}

1
docs/css/site.css Normal file
View File

@ -0,0 +1 @@
/* You can override this file with your own styles */

251
docs/developing.html Normal file
View File

@ -0,0 +1,251 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - Developing GSport</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<strong>Developing</strong>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>Developing GSport<a name="Developing_GSport"></a></h2>
<p>Information, mostly concerning building, about various platforms:</p>
<div class="section">
<h3>General Build Instructions<a name="General_Build_Instructions"></a></h3>
<p>You need to build with a <tt>make</tt> utility. There's a default Makefile, which should work for nearly any environment. The Makefile includes a file called <tt>vars</tt> which defines the platform- dependent variables. You need to make <tt>vars</tt> point to (or be) the appropriate file for your machine.</p></div>
<div class="section">
<h3>Win32<a name="Win32"></a></h3>
<p>There is a different port of KEGS by Chea Chee Keong (akilgard) called KEGS32. It was originally available from <a class="externalLink" href="http://web.archive.org/web/20071107082448/http://www.geocities.com/akilgard/kegs32/">http://www.geocities.com/akilgard/kegs32</a>, but geocities has since closed. The Win32 code in GSport is leveraged from KEGS32.</p>
<p>GSport can be compiled with <a class="externalLink" href="http://www.mingw.org/">Mingw</a> and <a class="externalLink" href="http://www.cygwin.com/">Cygwin</a> as well as via standard Microsoft compiler suites.</p>
<p>In order to compile with the standard Microsoft compiler suites, download and install <a class="externalLink" href="https://www.visualstudio.com/downloads/download-visual-studio-vs">Microsoft Visual Studio Community 2015 from Microsoft's website</a>. The build process requires Perl, such as <a class="externalLink" href="http://www.activestate.com/activeperl">ActiveState ActivePerl</a>. Within Visual Studio, open the &quot;gsport.sln&quot; solution file. Set the &quot;gsport&quot; project as the &quot;StartUp Project&quot;, and choose &quot;Build Solution&quot; from the &quot;Build&quot; menu.</p>
<p>In order to compile with Cygwin:</p>
<div>
<pre>cd into the src/ directory
rm vars
ln -s vars_win32 vars
make
</pre></div>
<p>You need to have a ROM file (named ROM, ROM.01, or ROM.03) in the same directory as the resulting executable.</p>
<p>To quit, either click the close box, or force quit the application. You can also middle-click (if you have a 3-button mouse) or Shift-F6 to get the debugger in the terminal window, and then type &quot;q&quot;.</p></div>
<div class="section">
<h3>Mac OS X<a name="Mac_OS_X"></a></h3>
<p>Use the <tt>vars_mac</tt> file:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_mac vars
make
</pre></div>
<p>After the <tt>make</tt> has finished, it will create the application <tt>GSport</tt>.</p></div>
<div class="section">
<h3>X86 Linux<a name="X86_Linux"></a></h3>
<p>Use the <tt>vars_x86linux</tt> file:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_x86linux vars
make
</pre></div>
<p>The resulting executable is called <tt>gsportx</tt>.</p>
<p>The build scripts assume perl is in your path. If it is somewhere else, you need to edit the &quot;PERL = perl&quot; line in the vars file and make it point to the correct place.</p>
<p>For audio, GSport needs access to <tt>/dev/dsp</tt>. If the permissions do not allow GSport to access <tt>/dev/dsp</tt>, it can fail with a cryptic error message. As root, just do: <tt>chmod 666 /dev/dsp</tt> .</p>
<p>If you do not have the <tt>/dev/dsp</tt> device, GSport will not start unless you tell it to disable audio with the following command-line argument: <tt>./gsportx -audio 0</tt></p></div>
<div class="section">
<h3>PowerPC Linux<a name="PowerPC_Linux"></a></h3>
<p>Use the <tt>vars_linuxppc</tt> file:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_linuxppc vars
make
</pre></div>
<p>The build scripts assume perl is in your path. If it is somewhere else, you need to edit the &quot;PERL = perl&quot; line in the vars file and make it point to the correct place.</p>
<p>Audio is currently disabled by default, but you can try turning it on by runnning the command: <tt>gsportx -audio 1</tt>. It sounds horrible, but sounds do come out.</p></div>
<div class="section">
<h3>Raspberry Pi<a name="Raspberry_Pi"></a></h3>
<p>At first, you may want to update/upgrade your base OS:</p>
<ul>
<li><tt>sudo apt-get update</tt></li>
<li><tt>sudo apt-get upgrade</tt></li></ul>
<p>Then, add a line with the value <tt>snd-pcm-oss</tt> to the <tt>/etc/modules</tt> file and reboot to enable sound. Change the permissions to the resulting device <tt>/dev/pcm</tt> (after rebooting): <tt>sudo chmod 666 /dev/pcm</tt></p>
<p>Depending on the version of your OS, the following packages may need to be installed:</p>
<ul>
<li>xfonts-base: <tt>sudo apt-get install xfonts-base</tt></li>
<li>libX11-dev: <tt>sudo apt-get install libX11-dev</tt></li>
<li>libxext-dev: <tt>sudo apt-get install libxext-dev</tt></li>
<li>libpcap-dev: <tt>sudo apt-get install libpcap-dev</tt></li></ul>
<p>Use the <tt>vars_pi</tt> file for compilation:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_pi vars
make
</pre></div>
<p>The resulting executable is called <tt>gsportx</tt>.</p></div>
<div class="section">
<h3>Solaris SPARC<a name="Solaris_SPARC"></a></h3>
<p>Use the <tt>vars_solaris</tt> file:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_solaris vars
make
</pre></div>
<p>The build scripts assume perl is in your path. If it is somewhere else, you need to edit the &quot;PERL = perl&quot; line in the vars file and make it point to the correct place.</p>
<p>Audio is currently disabled by default, but you can try turning it on by runnning the command: <tt>gsportx -audio 1</tt></p></div>
<div class="section">
<h3>Solaris x86<a name="Solaris_x86"></a></h3>
<p>Use the <tt>vars_x86solaris</tt> file:</p>
<div>
<pre>cd into the src/ directory
rm vars; ln -s vars_x86solaris vars
make
</pre></div>
<p>The build scripts assume perl is in your path. If it is somewhere else, you need to edit the &quot;PERL = perl&quot; line in the vars file and make it point to the correct place.</p>
<p>Audio is currently disabled by default, but you can try turning it on by runnning the command: <tt>gsportx -audio 1</tt></p></div>
<div class="section">
<h3>Other platforms - &quot;C&quot;<a name="Other_platforms_-_C"></a></h3>
<p>If you are porting to an X-windows and Unix-based machine, it should be easy. Start with <tt>vars_x86linux</tt> if you are a little-endian machine, or <tt>vars_linuxppc</tt> if you are big endian. Don't define <tt>-DGSPORT_LITTLE_ENDIAN</tt> unless your processor is little-endian (Alpha, x86, Mac Intel). Mac PPC, Sun, MIPS, HP, Motorola, and IBM Power are big-endian.</p></div>
<div class="section">
<h3>Under Development - Autotools Integration<a name="Under_Development_-_Autotools_Integration"></a></h3>
<p>With the autotools branch, the following sequence will execute the build from the main directory:</p>
<div>
<pre>autoreconf
automake --add-missing
autoheader
autoconf
sh configure
make
</pre></div></div>
<div class="section">
<h3>Extended <a name="Capabilities">Capabilities</a> by Platform<a name="Extended_Capabilities_by_Platform"></a></h3>
<p>All platforms have a common core of capabilities:</p>
<ul>
<li>Base IIgs emulation</li>
<li>Ensoniq sound emulation</li>
<li>Virtual serial ports mapped to real hardware or IP-emulated ports</li>
<li>Text and graphical printers </li></ul>
<p>The table below notes where the various builds differ in the support they have in the code base now for various extended capabilities. Turning the &quot;No&quot; boxes into &quot;Yes&quot; are all opportunities for contributions!</p>
<table border="1" class="bodyTable">
<tr class="a">
<th align="right"><b>Platform</b></th>
<th align="right"><b>Ethernet</b></th>
<th align="right"><b>Drag/Drop Disks</b></th>
<th align="left"><b>Clipboard Paste</b></th></tr>
<tr class="b">
<td align="right">Linux</td>
<td align="right">No</td>
<td align="right">No</td>
<td align="left">No</td></tr>
<tr class="a">
<td align="right">Macintosh</td>
<td align="right">No</td>
<td align="right">No</td>
<td align="left">Yes</td></tr>
<tr class="b">
<td align="right">Windows</td>
<td align="right">Yes</td>
<td align="right">Yes</td>
<td align="left">Yes</td></tr></table></div>
<div class="section">
<h3>Building Graphical Printer Support <a name="Building_Graphical_Printer_Support"></a></h3>
<p>Until graphical parallel printer support is generally integrated into all builds, the following work needs to be done:</p>
<ul>
<li>Install Simple DirectMedia Layer (<a class="externalLink" href="http://www.libsdl.org/">SDL</a>) and Freetype in your build environment - you'll need to link to their libraries </li>
<li>Add the <tt>-DHAVE_SDL</tt> option to your <tt>CCOPTS</tt> and add the same (perhaps to a new) <tt>CPPOPTS</tt> in your <tt>vars</tt> file</li>
<li>Add something like <tt>-I/usr/include/freetype2</tt> and <tt>-I/usr/include/SDL</tt> options to your <tt>CCOPTS</tt> and add the same (perhaps for a new) <tt>CPPOPTS</tt> in your <tt>vars</tt> file to point to the SDL and Freetype include files</li>
<li>Include SDL and Freetype libraries to <tt>EXTRA_LIBS</tt> in your <tt>vars</tt> file (i.e. <tt>EXTRA_LIBS = -lSDL -lfreetype</tt>)</li>
<li>Include the Win32 common dialog library to <tt>EXTRA_LIBS</tt> as part of your final linkage if you're on Windows (i.e. <tt>EXTRA_LIBS = -lSDL -lfreetype -lcomdlg32</tt>)</li>
<li>After building, you'll need the file <tt>parallel.rom</tt> in the same directory that <tt>config.txt</tt> is found</li>
<li>You'll probably want a monospaced TrueType font file easily accessible to add as part of the GSport configuration</li>
<li>Run through the emulated printer <a href="./printer.html">configuration</a> steps</li></ul></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

123
docs/ethernet.html Normal file
View File

@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - GSport Ethernet</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<strong>Emulated Ethernet</strong>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>GSport Emulated Ethernet<a name="GSport_Emulated_Ethernet"></a></h2>
<p>The Uthernet (TFE) support in GSport was made possible by implementing the GPL source written by Spiro Trikaliotis for the <a class="externalLink" href="http://www.viceteam.org/">Vice emulator</a>. This version of GSport contains the latest code from VICE 2.2.</p>
<div class="section">
<h3>Details<a name="Details"></a></h3>
<p>Right now Uthernet emulation only works under Windows. Support for emulation under OS X and Linux is planned. In order to use Uthernet emulation, you must install <a class="externalLink" href="http://www.WinPcap.org/install/default.html">WinPCap</a> and have a wired (not wireless) Ethernet connection on the host computer.</p></div>
<div class="section">
<h3>GSport Setup<a name="GSport_Setup"></a></h3>
<p>After GSport starts, press F4 to enter the text based menu and select the &quot;Ethernet Card Configuration&quot; option.</p>
<p>By default, Uthernet emulation is turned off. Enable it by setting &quot;Uthernet Card in Slot 3&quot; to &quot;On&quot;.</p>
<p>Next, select the host interface you wish to use to communicate with the outside world. A list of available interfaces is provided on screen. For most the default of interface &quot;0&quot; is correct.</p>
<p>Return back to the main menu and save your configuration for good measure. Due to limitations, you must exit and restart GSport for the changes you made to take effect.</p></div>
<div class="section">
<h3>GS/OS Setup<a name="GSOS_Setup"></a></h3>
<p>In order to use TCP/IP connectivity under GS/OS, you need to install the latest version of Marinetti and its Uthernet Link Layer. Ewen Wannop has prepared a ready-made hard drive image with everything pre-installed, and that image is available in a version tuned specifically to GSport's Uthernet emulation. Download and use the disk image in the &quot;GSport Internet Starter Kit&quot;:</p>
<p><a class="externalLink" href="http://sourceforge.net/projects/gsport/files/Emulator%20Software%20Images/">http://sourceforge.net/projects/gsport/files/Emulator Software Images/</a></p></div>
<div class="section">
<h3>8-bit Applications<a name="a8-bit_Applications"></a></h3>
<p>Uthernet enabled versions of Contiki and ADTPro work fine with GSport. Other 8-bit software should also work but are untested.</p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

136
docs/history.html Normal file
View File

@ -0,0 +1,136 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - GSport History</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<strong>History</strong>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>GSport Release History<a name="GSport_Release_History"></a></h2>
<div class="section">
<h3>Version 0.31 - 6/22/2014<a name="Version_0.31_-_6222014"></a></h3>
<p>New functionality:</p>
<ul>
<li>Added <a href="./appletalk.html">AppleTalk</a> networking emulation with bridging to EtherTalk</li>
<li>Added clipboard text paste capability (OSX, Windows)</li>
<li>Emulated serial ports are individually configurable as either IP or passthrough to real hardware ports</li>
<li>Added Imagewriter LQ printer emulation</li></ul>
<p>Bug fixes:</p>
<ul>
<li>IN#1 and IN#2 now trigger the incoming IP port to listen when using IP simulated serial ports; previously, only PR#1 or PR#2 did </li>
<li>Fixed crash when parallel.rom is missing</li>
<li>Fix for real joysticks: unless the joystick is moving, gsport sets the values to zero</li></ul></div>
<div class="section">
<h3>Version 0.2a - 2/29/2012<a name="Version_0.2a_-_2292012"></a></h3>
<p>New functionality:</p>
<ul>
<li>Added text-based virtual printer output for all platforms</li>
<li>Added OSX drag/drop &quot;installer&quot; disk image (.dmg)</li>
<li>Disk images will automatically mount and boot when specified as the last argument on the command line, or when invoked from the Windows shell (file-&gt;open as GSport.exe)</li></ul>
<p>Bug fixes:</p>
<ul>
<li>Win32: Added sound and native printer libraries, mistakenly omitted</li>
<li>OSX: Fixed some &quot;endianness&quot; troubles with the fat binaries</li></ul></div>
<div class="section">
<h3>Version 0.1 - 1/6/2011 released as interim build<a name="Version_0.1_-_162011_released_as_interim_build"></a></h3>
<p>New functionality:</p>
<ul>
<li>Added Uthernet support in slot 3. Code comes from the VICE emulator.</li>
<li>Added virtual printer support in slot 1. Code comes from DOSBox emulator.</li></ul></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

BIN
docs/images/collapsed.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
docs/images/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/images/expanded.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 B

BIN
docs/images/external.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

BIN
docs/images/gsport.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
docs/images/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
docs/images/newwindow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

BIN
docs/images/printer0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
docs/images/printer1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
docs/images/printer2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
docs/images/printer3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
docs/images/printer4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
docs/images/printer5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
docs/images/printer6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
docs/images/printer7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/images/printerI1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
docs/images/printerI2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

111
docs/index.html Normal file
View File

@ -0,0 +1,111 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - GSport Project Page</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<strong>Main</strong>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>GSport<a name="GSport"></a></h2>
<p>GSport is a portable (in the programming sense) Apple IIgs emulator, based on the KEGS cross-platform IIgs emulator by Kent Dickey. The base emulator builds and runs on all of the same platforms that KEGS did, and the new capabilities are being integrated as contributors have time and interest.</p><img src="images/gsport.png" alt="" /><a href="https://github.com/david-schmidt/gsport/releases" target="_new"><img src="images/download.png" /></a>
<div class="section">
<h3>Project Goals<a name="Project_Goals"></a></h3>
<p>The main goal for GSport is to provide a free, open ecosystem for the continuation of cross-platform development of IIgs emulation.</p>
<p>Some interesting advances that initially spawned this project are Uthernet and printer support. As those objectives are met, we will move on to the next objectives. Do you have something that you wish a GS emulator did? Submit an issue <a class="externalLink" href="https://github.com/david-schmidt/gsport/issues">here,</a> or better yet - dive in and <a class="externalLink" href="https://github.com/david-schmidt/gsport">contribute!</a></p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

417
docs/operating.html Normal file
View File

@ -0,0 +1,417 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - Operating GSport</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<strong>Operating</strong>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<a href="printer.html" title="Emulated Printers">Emulated Printers</a>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>Operating GSport<a name="Operating_GSport"></a></h2>
<div class="section">
<h3>Getting a ROM file<a name="Getting_a_ROM_file"></a></h3>
<p>The required ROM for GSport is not part of the distribution, as it is not freely distributable. You must own a IIgs ROM (i.e. a IIgs machine) in order to legally use a ROM file that you may find on the internet.</p>
<p>GSport can use the ROM image from either a ROM01 or ROM03 IIgs machine. By default, that file should be named <tt>rom</tt> and be placed in the same folder as the GSport program/app. The name and location are configurable options, but it will &quot;just work&quot; with the defaults. </p></div>
<div class="section">
<h3>Running GSport<a name="Running_GSport"></a></h3>
<p>On all platforms except Windows and Mac, you must start GSport from a terminal window. GSport will open a new window and use the window you started it from as a &quot;debug&quot; window. </p>
<p>GSport will look in a number of places for two files it requires: <tt>config.txt</tt> and <tt>rom</tt>. The suggested place for these files is right alongside the GSport application itself.</p>
<p>Start GSport by Double-clicking the GSport icon on a Mac, or by running the executable (<tt>gsport.exe</tt> on Windows, and <tt>gsportx</tt> on Linux). GSport can be run from the Terminal window on a Mac as well (which enables access to more debug information) by typing: <tt>./GSport.app/Contents/MacOS/GSport</tt> from the folder GSport is in. This also enables the automatic mounting/booting feature by allowing you to specify a disk image of your choice on that command line; for example: <br /><tt>./GSport.app/Contents/MacOS/GSport /path/to/my/disk.po</tt> </p>
<p>Assuming all goes well, GSport will then boot up but probably not find any disk images. Hit the &quot;F4&quot; key and see below for how to tell GSport what disk images to use. Tip: Hitting &quot;F8&quot; locks the mouse in the window (and hides the host cursor) until you hit &quot;F8&quot; again.</p>
<p>See the the <a href="./developing.html">developing</a> page for information about developing GSport and compiliing it for yourself.</p></div>
<div class="section">
<h3>Configuration Panel<a name="Configuration_Panel"></a></h3>
<p>The Configuration panel is accessed by pressing the F4 key at any time. (If GSport couldn't find a ROM file when it started, you will be forced into the Configuration Panel mode until you select a valid ROM file).</p>
<p>To select a ROM file, select &quot;ROM File Selection&quot; and then select your ROM file. If you were not forced into the panel at startup, then GSport found one and it is working.</p></div>
<div class="section">
<h3>Disk Images<a name="Disk_Images"></a></h3>
<p>The primary use of the Configuration Panel is to select disk images. To change disk images being used, select &quot;Disk Configuration&quot;. Each slot and drive that can be loaded with an image is listed. &quot;s5d1&quot; means slot 5, drive 1. Slot 5 devices are 3.5&quot; 800K disks, and slot 6 devices are 5.25&quot; 140K disks. Slot 7 devices are virtual hard drives, and can be any size at all (although ProDOS-formatted images should be less than 32MB).</p>
<p>Just use the arrow keys to navigate to the device entry to change, and then select it by pressing the Enter or Return key. A scrollable file selection interface is presented, letting you locate your image files. To quickly jump to a particular path, you can press Tab to toggle between entering a path manually, and using the file selector. Press Return on &quot;..&quot; entries to go up a directory level. When you find the image you want, just press the Enter or Return key.</p>
<p>If the image has partitions that GSport supports, another selection dialog will have you select which partition to mount. You will probably only have partitions on direct devices you mount (or on a Mac, of .dmg images of CDs). For instance, on a Mac, /dev/disk1 can sometimes be the CDROM drive.</p>
<p>GSport can handle &quot;raw&quot;, .dsk, .po, 2IMG, 5.25&quot; &quot;.nib&quot; images, most Mac Diskcopy images and partitioned images. The .dsk and .po formats you often find on the web are really &quot;raw&quot; formats, and so they work fine. GSport uses the host file permissions to encode the read/write status of the image. GSport can open any image file compressed with gzip (with the extension &quot;.gz&quot;) automatically as a read-only disk image.</p>
<p>An image is the representation of an Apple IIgs disk, but in a file on your computer. For 3.5&quot; disks, for example, a raw image would be exactly 800K bytes long (819200 bytes). GSport directs the emulated GS accesses to the image, and does the correct reads and writes of the Unix file instead.</p>
<p>If you do not have any disk mounted in s7d1, GSport will jump into the monitor. To boot slot 6 (or slot 5), use the Apple IIgs Control Panel by pressing Ctrl-Command-ESC.</p>
<p>Support for 5.25&quot; nibblized images is read-only for now (since the format is simplistic, it's tricky for GSport to write to it since GSport has more information than fits in that format). Just select your image, like &quot;disk.nib&quot; in the <tt>config.txt</tt> file like any .dsk or .po image.</p>
<p>In addition to changing disks, you can also just &quot;eject&quot; and image by moving the cursor to select that slot/drive and then press &quot;E&quot;. The emulated IIgs will immediately detect changes to s5d1 and s5d2.</p>
<p>Care should be taken when changing images in slot 7--GSport does not notify GSOS that images have changed (or been ejected), and so it's best to make changes when GSOS is not running.</p></div>
<div class="section">
<h3>Keyboard Summary<a name="Keyboard_Summary"></a></h3>
<div>
<pre>F1: Alias of Command
F2: Alias of Option
F3: Alias of ESC
F4: Configuration Panel
F5, Shift-Insert: Paste from clipboard (on Windows and Mac)
F6: Toggle through the 4 speeds: Unlimited, 1MHz, 2.8MHz, 8.0MHz
Shift-F6: Enter GSport debugger
F7: Toggle fast_disk_emul on/off
F8: Toggle pointer hiding on/off.
F9: Invert the sense of the joystick.
Shift-F9: Swap x and y joystick/paddle axes.
F10: Attempt to change the a2vid_palette (only useful on 256-color displays)
Shift-F10: Toggle visibility of the debug status lines (on Windows only)
F11: Full screen mode (on Mac OS X and Windows).
F12: Alias of Pause/Break which is treated as Reset
F2, Alt_R, Meta_r, Menu, Print, Mode_switch, Option: Option key
F1, Alt_L, Meta_L, Cancel, Scroll_lock, Command: Command key
Num_Lock: Keypad &quot;Clear&quot;.
F12, Pause, Break: Reset
&quot;Home&quot;: Alias for &quot;=&quot; on the keypad (since my Unix keyboard doesn't have an =).
</pre></div></div>
<div class="section">
<h3>Using GSport<a name="Using_GSport"></a></h3>
<p>The host computer mouse is the Apple IIgs mouse and joystick by default. By default, the host pointer is not constrained inside the window and remains visible. Press F8 to hide the cursor and constrain the mouse. F8 again toggles out of constrain mode. When the GSOS desktop is running, GSport hides the host cursor automatically and enables special tracking which forces the emulated cursor to follow the host cursor. If this doesn't work right under some program, just press F8 for better compatibility.</p>
<p>The middle mouse button or Shift-F6 causes GSport to stop emulation, and enter the debugger. You can continue with &quot;g&quot; then return in the debug window. You can also disassemble memory, etc. The section &quot;Debugging GSport&quot; above describes the debugger interface a little more.</p>
<p>GSport has no pop-up menus or other interactive interfaces (other than the debug window, and the occasional error dialogs on Mac OS X). Input to the debug window is only acted upon when the emulation is stopped (Shift-F6, middle mouse button, or hitting a breakpoint).</p></div>
<div class="section">
<h3>Quitting GSport<a name="Quitting_GSport"></a></h3>
<p>Just close the main GSport window, and GSport will exit cleanly. Or you can select Quit from the menu. Or enter ctrl-c in the debugger window. Or press the middle-mouse button in the emulation window, and then type &quot;q&quot; return in the debug window.</p></div>
<div class="section">
<h3>Command/Option keys<a name="CommandOption_keys"></a></h3>
<p>If you have a keyboard with the special Windows keys, you can use them as the command/option keys. For those without those keys, there are several alternatives.</p>
<p>The following keys are Option (closed-apple) (not all keyboards have all keys): F2, Meta_R, Alt_R, Cancel, Print_screen, Mode_switch, Option, or the Windows key just to the right of the spacebar. The following keys are Command (open-apple): F1, Meta_L, Alt_L, Menu, Scroll_lock, Command, the Windows key left of the spacebar, and the Windows key on the far right that looks like a pull-down menu. You can use F1 and F2 if you cannot make anything else work (especially useful if your OS is intercepting some Alt or Command key sequences).</p>
<p>Note that X Windows often has other things mapped to Meta- and Alt- key sequences, so they often don't get passed through to GSport. So it's best to use another key instead of Alt or Meta.</p>
<p>The joystick/paddle buttons are just the Command and Option keys.</p></div>
<div class="section">
<h3>Reset<a name="Reset"></a></h3>
<p>The reset key is Pause/Break or F12. You must hit it with Ctrl to get it to take effect (just like a real Apple IIgs). Ctrl-Command-Reset forces a reboot. Ctrl-Command-Option-Reset enters selftests. Selftests will pass if you force speed to 2.8MHz using the middle button or F6 (and also set Enable Text Page 2 shadow = Disabled for ROM 01). Watch out for ctrl-shift-Break--it will likely kill an X Windows session. Also note that the Unix olvwm X window manager interprets ctrl-F12 and will not pass it on to GSport--you'll need to use Break for reset in that case.</p></div>
<div class="section">
<h3>Full Screen mode (Mac OS X only)<a name="Full_Screen_mode_Mac_OS_X_only"></a></h3>
<p>GSport can run in full screen mode--which is especially useful when letting small kids use GSport (but it is not really a lock, so do not let a 2 year old bang on the keyboard while running GSport).</p>
<p>Full Screen mode is toggled with F11 (or Ctrl-F11, since Expose on a Mac is intercepting F11). If GSport stops in the debugger for any reason, full screen mode is toggled off automatically.</p></div>
<div class="section">
<h3>Joystick Emulation (Mouse, Keypad, or real native joystick)<a name="Joystick_Emulation_Mouse_Keypad_or_real_native_joystick"></a></h3>
<p>The default joystick is the mouse position. Upper left is 0,0. Lower right is 255,255. Press Shift-F9 to swap the X and Y axes. Press F9 to reverse the sense of both paddles (so 0 becomes 255, etc). Swapping and reversing are convenient with paddle-based games like &quot;Little Brick Out&quot; so that the mouse will be moving like the paddle on the screen. &quot;Little Brick Out&quot; is on the DOS 3.3 master disk. The joystick does not work properly if the pointer is constrained in the window.</p>
<p>You can also select from a &quot;Keypad Joystick&quot; or a real joystick from the Configuration panel. Press return on the &quot;Joystick Configuration&quot; entry, and then select between Mouse Joystick, Keypad Joystick, or one of two native joysticks. The Keypad Joystick uses your keypad number keys as a joystick, where keypad 7 means move to the upper left, and keypad 3 means move to the lower right. Pressing multiple keys together averages the results, allowing finer control than just 8 directions. Also, joystick scaling is selectable here for games which require a greater range of motion to work correctly, along with trim adjustment which moves the centering point. Adjusting scaling usually means you will need to adjust the trim as well.</p>
<p>The left mouse button is the mouse button for GSport. The right mouse button (if you have it) or F6 toggles between four speed modes. Mode 0 (the default) means run as fast as possible. Mode 1 means run at 1MHz. Mode 2 means run at 2.8MHz. Mode 3 means run at 8.0MHz (about the speed of a ZipGS accelerator). Most Apple //e (or earlier) games need to be run at 1MHz. Many Apple IIgs demos must run at 2.8MHz or they will not operate correctly. Try running ornery programs at 2.8MHz. 3200 pictures generally only display correctly at 2.8MHz or sometimes 8.0MHz.</p></div>
<div class="section">
<h3>Debugging GSport<a name="Debugging_GSport"></a></h3>
<p>GSport by default now continues emulation even when it detects buggy programs running. (Now I know why Appleworks GS always seemed to crash!).</p>
<p>GSport divides buggy programs into two severities: Code Yellow and Code Red. The status is displayed in words in the text area under the emulation window. If nothing's wrong, nothing is printed.</p>
<p>A Yellow bug is a mild bug where an Apple IIgs program merely read an invalid location. Although completely harmless, it indicates the potential for some Apple IIgs program bug which may become more severe shortly. For instance, closing the &quot;About This Apple IIgs&quot; window in the Finder causes a code yellow alert, but it seems quite harmless.</p>
<p>A Code Red bug is a more serious problem. The Apple IIgs program either tried to write non-existent memory, entered an invalid system state, or perhaps just tried to use an Apple IIgs feature which GSport does not implement yet. Note that entering GSBUG tends to cause a Code Red alert always, so if you intended to enter it, you can ignore it. My recommendation is to save work immediately (to new files) and restart GSport if you get into the Red mode.</p>
<p>GSport also supports breakpoints and watchpoints. In the debug window, you set a breakpoint at an address by typing the address, followed by a 'B' (it must be in caps). To set a breakpoint on the interrupt jump point, type:</p>
<div>
<pre>e1/0010B
</pre></div>
<p>The format is &quot;bank/address&quot; then &quot;B&quot;, where the B must be in caps and the address must use lower-case hex. For Apple IIe programs, just use a bank of 0.</p>
<p>To list all breakpoints, just type 'B' with no number in front of it. To delete a breakpoint, enter its address followed by 'D', so</p>
<div>
<pre>e1/0010D
</pre></div>
<p>deletes the above breakpoint. The addresses work like the IIgs monitor: once you change banks, you can use shortcut addresses:</p>
<div>
<pre>e1/0010B
14B
</pre></div>
<p>will add breakpoints at e1/0010 and e1/0014.</p>
<p>This is a &quot;transparent&quot; breakpoint--memory is not changed. But any read or write to that address will cause GSport to halt. So you can set breakpoints on I/O addresses, or ROM, or whatever. Setting a breakpoint slows GSport down somewhat, but only on accesses to the 256 byte &quot;page&quot; the breakpoint is on. Breakpoints are not just instruction breakpoints, they also cause GSport to halt on any data access, too (usually called watchpoints).</p>
<p>Frederic Devernay has written a nice help screen available in the debugger when you type &quot;h&quot;.</p>
<p>Useful locations for setting breakpoints: 0/3f0B - Break handler 0/c000B - Keyboard latch, programs read keys from this address</p></div>
<div class="section">
<h3>GSport command-line option summary<a name="GSport_command-line_option_summary"></a></h3>
<p>There are others, but the Configuration panel provides a better way to set them so they are no longer listed here.</p>
<div>
<pre>-skip: GSport will &quot;skip&quot; that many screen redraws between refreshes.
-skip 0 will do 60 frames per second, -skip 1 will do 30 fps,
-skip 5 will do 10 fps.
-audio [0/1]: Forces audio [off/on]. By default, audio is on unless
the X display is a remote machine or shared memory is off.
This switch can override the default. -audio 0 causes GSport to
not fork the background audio process, but Ensoniq emulation
is still 100% accurate, just the sound is not sent to the
workstation speaker. Audio defaults off on Linux for now.
-arate {num}: Forces audio sample rate to {num}. 44100 and 48000 are
usual, you can try 22050 to reduce GSport's overhead. On a reasonably
fast machine (&gt;250MHz or so), you shouldn't need to mess with this.
-dhr140: Will use the old Double-hires color algorithm that results in
exactly 140 colors across the screen, as opposed to the blending
being done by default.
</pre></div>
<p>X-Windows/Linux options:</p>
<div>
<pre>-15: GSport will only look for a 15-bit X-Window display.
-16: GSport will only look for a 16-bit X-Window display (not tested, probably
will get red colors wrong).
-24: GSport will only look for a 24-bit X-Window display.
-display {machine:0.0}: Same as setting the environment variable DISPLAY.
Sends X display to {machine:0.0}.
-noshm: GSport will not try to used shared memory for the X graphics display.
This will make GSport much slower on graphics-intensive tasks,
by as much as a factor of 10! By default, -noshm causes an
effective -skip of 3 which is 15 fps. You can override this
default by specifying a -skip explicitly.
</pre></div></div>
<div class="section">
<h3>Apple IIgs Control Panel<a name="Apple_IIgs_Control_Panel"></a></h3>
<p>You can get to the Apple IIgs control panel (unless some application has locked it out) using Ctrl-Command-Esc.</p></div>
<div class="section">
<h3>Details on config.txt and disk images<a name="Details_on_config.txt_and_disk_images"></a></h3>
<p>The file <tt>config.txt</tt> describes the images GSport will use. Although you can edit the file manually, in general you can use the Configuration Panel to make all the changes you need. This information is for reference.</p>
<p>GSport by default will boot s7d1 (unless you've changed that using the Apple IIgs control panel), so you should put an image in that slot.</p>
<p>GSport, by default, runs the IWM (3.5&quot; and 5.25&quot; disks) emulation in an &quot;approximate&quot; mode, called &quot;fast_disk_emul&quot;. In this mode, GSport emulates the hardware &quot;faster&quot; than real, meaning the data the code being emulated expects is made available much faster than on a real Apple IIgs, providing a nice speed boost. For instance, the 5.25&quot; drives run 10x the real speed usually. Almost everything will work except for nibble copiers, which don't like the data coming this fast. (Meaning, unless you're using a nibble copier, you shouldn't run into an issue. All games/demos/etc run fine in this mode). To make nibble copiers work, Press F7.</p>
<p>GSport can read in the &quot;.nib&quot; nibblized disk format, but as read-only mode. If the emulated image is no longer ProDOS or DOS 3.3 standard, GSport will automatically treat the image as &quot;Not-write-through-to-Image&quot; from then on. This mode means GSport will continue to emulate the disk properly in memory, but it cannot encode the changes in the standard .dsk or .nib image format. It prints a message saying it has done so. However, the &quot;disk&quot; in emulation is fully useable as long as GSport is running. A standard reformatting will not cause an image to flip to not-write- through-to-Image, but running things like a &quot;drive-speed&quot; test will cause further changes not to propagate to the Unix file. You will need to &quot;eject&quot; the image and re-insert it before writes will take effect.</p>
<p>In full accuracy mode (i.e., not fast_disk_emul), 5.25&quot; drive accesses force GSport to run at 1MHz, and 3.5&quot; drive accesses force GSport to run at 2.8MHz.</p></div>
<div class="section">
<h3>GSport Timing<a name="GSport_Timing"></a></h3>
<p>GSport supports running at four speeds: 1MHz, 2.8MHz, 8.0MHz, and Unlimited. Pressing the middle mouse button cycles between these modes. The 1MHz and 2.8MHz speeds force GSport to run at exactly those speeds, providing accurate reproduction of a real Apple IIgs.</p>
<p>GSport will always run at 1MHz at least. If it is unable to keep up, it will extend the emulated time to maintain the illusion of running at 1MHz. That is, it may do just 40 screen refreshes per real second, instead of the usual 60. This happens rarely.</p>
<p>If you force GSport to run at 1MHz, it will strive to run at exactly 1MHz (well, really 1.024MHz). If it is running faster (almost always), it will pause briefly several times a second to maintain the 1MHz speed. It does this in a friendly way that makes time available to other tasks. This makes older Apple II games very playable just like a real Apple IIgs on slow speed. GSport is running at exactly the same speed as an Apple //e when in 1MHz mode. The 1MHz mode you set through the right mouse button overrides the &quot;fast&quot; mode you can access through the control panel. But, 3.5&quot; accesses will &quot;speed up&quot; to 2.8MHz to enable that code to operate correctly while the 3.5&quot; disk is being accessed.</p>
<p>If you force GSport to run at 2.8MHz, GSport tries to run at exactly 2.8MHz. But like a real unaccelerated Apple IIgs, if you set the control panel to &quot;slow&quot;, it will really be running at 1MHz. Accesses to 5.25&quot; disk automatically slow down to 1MHz, when running the IWM in accurate mode (F7). GSport may not be able to keep up with some programs running at 2.8MHz due to video and sound overheads on lower-end machines. If that happens, it effectively runs slower by extending the emulated &quot;second&quot;, like in the 1MHz mode. You can tell this is happening when Eff MHz in the status area falls below 2.8MHz. If GSport is running faster than 2.8MHz, it takes small pauses to slow down, just like in 1MHz. Many Apple IIgs demos must be run at 2.8MHz. The built-in selftests (cmd-option-ctrl-Reset) must run at 2.8MHz. Many Apple IIgs action games are more playable at 2.8MHz.</p>
<p>The 8.0MHz setting means follow the ZipGS-selected speed, but don't go faster than 8.0MHz. If your host computer cannot keep up, then the emulated second will be extended. You can use the ZipGS control panel, or ZIPPY.GS on the sample disk image to set the emulated ZipGS speed to anything from 1MHz to 8MHz in .5MHz increments.</p>
<p>The Unlimited setting means run as fast as possible, whatever speed that is (but always above 1MHz). Eff MHz gives you the current Apple IIgs equivalent speed. Many games will be unplayable at the unlimited setting. Setting the IIgs control panel speed to &quot;slow&quot; will slow down to 1MHz.</p>
<p>Sound output has an important relationship to GSport timing. GSport must play one second of sound per second of emulated time. Normally, this works out exactly right. But as noted above, if GSport can't maintain the needed speed, it extends the emulated second. If it extends the second to 1.4 real seconds, that means GSport only produces 1.0 second of sound data every 1.4 seconds--the sound breaks up!</p>
<p>In all cases, 1MHz to GSport is 1.024MHz. And 2.8MHz to GSport is 2.56MHz (trying to approximate the slowdown causes by memory refresh on a real Apple IIgs). It's just easier to say 1MHz and 2.8MHz.</p></div>
<div class="section">
<h3>GSport: What Works<a name="GSport:_What_Works"></a></h3>
<p>Basically, just about every Apple II program works.</p>
<p>Some old Apple II 5.25&quot; games require the old C600 ROM image, and don't work with the default Apple IIgs ROM. This is not GSport's fault--these games don't run on a real Apple IIgs either. GSport has built-in the old Apple II Disk PROM which you can enable by using the IIgs control panel to set Slot 6 to &quot;Your Card&quot;. This allows many more Apple II games to run, and is the recommended setting.</p>
<p>The NinjaForce Megademo mostly works, but sometimes hangs in the BBS Demo. Just skip that demo if it happens.</p>
<p>The California Demo hangs at startup unless you use the IIgs control panel to boot from slot 5, and then do a ctrl-Open_Apple-Reset to boot--doing the above lets it work fine. This seems to be a bug in the demo.</p></div>
<div class="section">
<h3>GSport bugs<a name="GSport_bugs"></a></h3>
<p>On a ROM03, GSport makes a patch to the ROM image (inside emulation, not to the ROM file) to fix a bug in the ROM code. Both ROM01 and ROM03 are patched to enable use of more than 8MB of memory. It then patches the ROM self-tests to make the ROM checksum pass. But other programs, like the Apple IIgs Diagnostic Disk, will detect a ROM checksum mismatch. Don't worry about it.</p>
<p>Sound breaks up if GSport is unable to keep up--it should only be happening if you are trying to force GSport to run at 2.8MHz, but cannot due to sound and video overhead.</p></div>
<div class="section">
<h3>Sound emulation<a name="Sound_emulation"></a></h3>
<p>GSport supports very accurate classic Apple II sound (clicking of the speaker using $C030) and fairly accurate Ensoniq sound.</p>
<p>When GSport determines that no sound has been produced for more than 5 seconds, it turns off the sound calculation routines for a small speedup. It describes that it has done this by saying &quot;Pausing sound&quot; in the debug window. However, when sound restarts, it sometimes &quot;breaks-up&quot; a little.</p>
<p>If your display is not using shared memory, audio defaults to off unless you override it with &quot;-audio 1&quot;.</p></div>
<div class="section">
<h3>SCC (Serial Port) emulation<a name="SCC_Serial_Port_emulation"></a></h3>
<p>You may use the SCC ports as either a LocalTalk networking connection or as traditional serial ports. GSport emulates the two serial ports on a IIgs as being two Unix sockets. Port 1 (printer port) is at socket address 6501, and port 2 (modem) is at socket address 6502.</p>
<p>By default, slot 1 is emulated using a simple receive socket, and slot 2 emulates a Virtual Modem.</p>
<p>A Virtual Modem means GSport acts as if a modem is on the serial port allowing Apple II communcation programs to fully work, but connected to internet-enabled sockets. GSport emulates a &quot;Hayes- Compatible&quot; modem, meaning it accepts &quot;AT&quot; commands. You can use GSport to connect to free telnet-BBSs, or run a BBS program on GSport and become a telnet BBS yourself.</p>
<p>The two main AT commands are: ATDT for dialing out, and ATA for receiving calls. To dial out, enter &quot;ATDThostname&quot;, or for example, &quot;ATDTboycot.no-ip.com&quot; (which is down at the moment, unfortunately). You can also enter an IP address, like &quot;ATDT127.0.0.1&quot;. On a Mac, to create a telnet server to allow telnet connections (do not use over the internet, but on a private network behind a firewall, this should be fine), in a Terminal window type: &quot;sudo /usr/libexec/telnetd -debug&quot;. You must then enable telnet on port 23 through your Mac OS X Firewall in the System Preferences-&gt;Sharing-&gt;Firewall page (just add port 23 as open--you'll need to use the &quot;New...&quot; button and then select Other for Port Name, and enter Port Number as 23). Then from GSport in a communications program, do &quot;ATDT127.0.0.1&quot;, and then log-in to your Mac.</p>
<p>GSport also accepts incoming &quot;calls&quot;. Start GSport, and initialize the Virtual Modem with some AT command (ATZ resets all state, and is a useful start). GSport now has a socket port open, 6502 for slot 2, which you can connect to using any telnet program. In a Terminal window, then type &quot;telnet 127.0.0.1 6502&quot; and you will connect to GSport. The Virtual Modem then starts printing &quot;RING&quot; every 2 seconds until you answer with &quot;ATA&quot;. You are now connected.</p>
<p>On Windows XP SP2, when GSport tries to open this incoming socket, you'll need to enable it and click Unblock to the dialog that Windows pops up. If you do not want incoming connections, you can block it instead.</p>
<p>Once connected, you can go back to talking to the Virtual Modem by pressing + three times quickly (+++), and then not type anything for a second. This goes back to the AT-command mode. You can now &quot;ATH&quot; to hang up, or &quot;ATO&quot; to go back online.</p>
<p>On Windows, the socket code is very preliminary and there are problems receiving connections.</p>
<p>GSport also supports an older, simpler socket interface, which it defaults to using on slot 1. In GSport, from APPLESOFT, if you PR#1, all output will then be sent to socket port 6501. You can see it by connecting to the port using telnet. In another terminal window, do: &quot;telnet localhost 6501&quot; and then you will see all the output going to the &quot;printer&quot;.</p>
<p>Under APPLESOFT, you can PR#1 and IN#1. This gets input from the socket also. You can type in the telnet window, it will be sent on to the emulated IIgs. You may want to go to the F4 Config Panel and set &quot;mask off high bit&quot; for serial port accesses to make PR#1 work a little nicer.</p>
<p>You can &quot;print&quot; from BASIC by using something like PR#1 in GSport and &quot;telnet localhost 6501 | tee file.out&quot; in another window.</p></div>
<div class="section">
<h3>GSport status area<a name="GSport_status_area"></a></h3>
<p>The status area is updated once each second. It displays internal emulation information.</p>
<div>
<pre>Line 1: (Emulation speed info)
dcycs: number of seconds since GSport was started
sim MHz: Effective speed of GSport instruction emulation, not counting
overhead for video or sound routines.
Eff MHz: Above, but with overhead accounted for. Eff MHz is the
speed of an equivalent true Apple IIgs. This is extremely
accurate.
sec: The number of real seconds that have passed during on of GSport's
emulated seconds. Should be 1.00 +/- .01. Under 1
means GSport is running a bit fast, over 1 means GSport is
running slow. When you force speed to 2.8MHz, if GSport
can't keep up, it extends sec, so you can see how slow
it's really going here.
vol: Apple IIgs main audio volume control, in hex, from 0-F.
pal: Super-hires palette that is unavailable. GSport needs one palette
for the standard Apple // graphics mode on an 8-bit display,
and it grabs the least-used palette. Defaults to 0xe.
You can try changing it with F10. If you change it to a
palette that is not least used, GSport changes it back in
one second. Any superhires lines using the unavailable
palette will have their colors mapped into the
closest-matching &quot;lores&quot; colors, to minimize visual
impact.
Limit: Prints which speed setting the user has requested: 1MHz, 2.8MHz,
or Unlimited.
Line 2: (Video and X info)
xfer: In hex, number of bytes transferred to the X screen per second.
xred_cs: Percentage of Unix processor cycles that were spent in the X
server (or other processes on the machine).
ch_in: Percentage of Unix processor cycles spent checking for X input Events.
ref_l: Percentage of Unix processor cycles spent scanning the Apple IIgs
memory for changes to the current display screen memory,
and copying those changes to internal XImage buffers.
ref_x: Percentage of Unix processor cycles spent sending those XImage buffers
to the X server. Very similar to xred_cs.
Line 3: (Interpreter overhead)
Ints: Number of Apple IIgs interrupts over the last second.
I/O: Rate of I/O through the fake smartport interface (hard drives).
Does not count 3.5&quot; or 5.25&quot; disk accesses.
BRK: Number of BRKs over the last second.
COP: Number of COPs over the last second.
Eng: Number of calls to the main instruction interpreter loop in the
last second. All &quot;interrupts&quot; or other special behavior
causes the main interpreter loop to exit. A high call
rate here indicates a lot of overhead. 12000-15000 is normal.
20000+ indicates some sort of problem.
act: Some instructions are handled by the main interpreter loop returning
special status &quot;actions&quot; to main event loop. This is the
number over the last second. Should be low.
hev: This tracks HALT_EVENTs. GSport returns to the main loop to recalc
effective speed whenever any speed-changing I/O location is
touched. See the code, mostly in moremem.c
esi: This counts the number of superhires scan-line interrupts
taken in the last second.
edi: This counts the number of Ensoniq &quot;special events&quot; over the last
second. A sound that stops playing always causes a GSport
event, even if it doesn't cause a IIgs interrupt.
Line 4: (Ensoniq DOC info)
snd1,2,3,4: Percentage of Unix processor cycles spent handling various
sound activities. snd1 is the total sum of all sound overhead.
st: Percentage of Unix cycles spent starting new Ensoniq oscillators.
est: Percentage of Unix cycles spent looking for 0 bytes in sounds.
x.yz: This final number is the average number of oscillators playing
over the last second. Up to 4.00 is low overhead, over
20.0 is high overhead.
Line 5: (Ensoniq DOC info)
snd_plays: Number of calls to a routine called sound_play, which
plays Ensoniq sounds. Always called at least 60 times per sec.
doc_ev: Number of Ensoniq (DOC) events in the last second. A sound
stopping is an event, but changing a parameter of a sound
while it is playing is also an event.
st_snd: Number of sounds that were started in the last second.
snd_parms: Number of times a sound parameter was changed while it
was playing.
Line 6: (IWM info)
For each IWM device, this line displays the current track (and side for
3.5&quot; disks). If a disk is spinning, there will be an &quot;*&quot; next to the
track number. Only updated once a second, so the disk arm moving may
appear to jump by several tracks. &quot;fast_disk_emul:1&quot; shows that GSport
is using less accurate, but faster, IWM emulation. Press F7 to toggle
to accurate disk emulation.
</pre></div></div>
<div class="section">
<h3>X Window (Linux) interface information<a name="X_Window_Linux_interface_information"></a></h3>
<p>If GSport fails to start under Linux, first try the following options:</p>
<div>
<pre>GSport -audio 0 -noshm
</pre></div>
<p>There may be a bug with drawing the border on x86 Linux with Shared Memory-- add the options &quot;-noshm -skip 0&quot; to fix this up (but lose some graphics performance, sorry). Try GSport without these options first, but use this as a workaround if necessary.</p>
<p>If you want the display to go somewhere different, make sure the shell environment variable $DISPLAY is set, or give the command-line argument &quot;-display <a name="foo">foo</a>&quot;.</p>
<p>GSport also forks off a subprocess to help handle the sound if audio is active. If GSport crashes in a unusual way (a core dump, for instance), you may have to manually kill the subprocess. (&quot;ps -ef| grep GSport;kill xxxxx&quot;).</p>
<p>Geoff Weiss adds some notes for mounting disks/floppies/CDs under Solaris 7 through Solaris 10:</p>
<p>To use a CDROM, insert the CD and let Volume Management mount it. Edit <tt>config.txt</tt> and use the filesystem that shows up in the &quot;df -k&quot; listing. The volume name of the CDROM must be included. For example, a CDROM in an IDE drive would look like this:</p>
<div>
<pre> /vol/dev/dsk/c1t0d0/ciscocd
</pre></div>
<p>A CDROM in a SCSI drive would look like this:</p>
<div>
<pre> /vol/dev/dsk/c0t6d0/j1170_10804
</pre></div>
<p>To provide low-level ADB emulation, GSport turns off Unix key repeat when the focus is in the GSport window. It should be turned back on every time the pointer leaves the GSport window, but sometimes it doesn't. Re-running GSport (and then quitting it quickly) should turn key-repeat back on, or you can type 'xset r' in another terminal window.</p>
<p>Sometimes the converse is true--key repeat is &quot;on&quot; when the cursor is in the GSport window. Moving the cursor out of the window and then back in should solve it. This is sometimes noticeable when running Wolfenstein 3D GS.</p>
<p>GSport uses a private color-map for its X-window in 8-bit mode. This may cause colormap &quot;flash&quot; when your cursor enters the window.</p></div>
<div class="section">
<h3>GSport details/troubleshooting<a name="GSport_detailstroubleshooting"></a></h3>
<p>GSport will work on all platforms with a 15/16-bit, 24-bit, or 32-bit color display. GSport also supports an 8-bit display on X windows only. On all platforms, it autodetects the color depth--no color switching is necessary as long as you're at a supported depth.</p></div>
<div class="section">
<h3>Disk Image Details<a name="Disk_Image_Details"></a></h3>
<p>Images loaded into slot 6 (drive 1 or 2) are assumed to be 140K 5.25&quot; disks, which is usually have the extension &quot;.dsk&quot;. Images loaded into slot 5 (drive 1 or 2) are assumed to be 800K disk images and can be in any supported imahe format (including partitions, if you have 800K partitions). Images loaded into slot 7 (drives 1 through 32) can be in any format and can be any size up to 4GB.</p>
<p>GSport boots s7d1 by default. You can change this using the emulated IIgs control panel, just like a real Apple IIgs. GSport emulates a IIgs with two 5.25&quot; drives in slot 6, two 3.5&quot; drives in slot 5, and up to 32 &quot;hard drives&quot; in slot 7. However, the current Configuration Panel only lets you set through s7d11. ProDOS 8 can access disks up to s7d8, but GSOS has no limit, so it's best to put HFS images past s7d8 in order to leave more slots for ProDOS images.</p>
<p>If you're trying to use a real host device (CD-ROM, or hard drive, or floppy), you should make the permissions on the /dev/disk* files something like (meaning, everyone should have read permission):</p>
<div>
<pre>brw-r--r-- 1 root operator 14, 0 Jun 10 00:01 /dev/disk2
</pre></div>
<p>You can do this on a Mac with:</p>
<div>
<pre>sudo chmod 644 /dev/disk2
</pre></div></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

155
docs/printer.html Normal file
View File

@ -0,0 +1,155 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2017-10-05 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GSport - GSport Printers</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="David Schmidt (1110325+david-schmidt@users.noreply.github.com)" />
<meta name="Date-Revision-yyyymmdd" content="20171005" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<div id="bannerLeft">
GSport: an Apple IIgs Emulator
</div>
<div id="bannerRight">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2017-10-05</span>
&nbsp;| <span id="projectVersion">Version: 0.31</span>
</div>
<div class="xright"> <a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
|
<a href="https://github.com/david-schmidt/gsport" class="externalLink" title="Project Development Page">Project Development Page</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>GSport</h5>
<ul>
<li class="none">
<a href="index.html" title="Main">Main</a>
</li>
<li class="none">
<a href="https://github.com/david-schmidt/gsport/releases" class="externalLink" title="Download">Download</a>
</li>
<li class="none">
<a href="operating.html" title="Operating">Operating</a>
</li>
<li class="none">
<a href="developing.html" title="Developing">Developing</a>
</li>
<li class="none">
<a href="appletalk.html" title="Emulated Appletalk">Emulated Appletalk</a>
</li>
<li class="none">
<a href="ethernet.html" title="Emulated Ethernet">Emulated Ethernet</a>
</li>
<li class="none">
<strong>Emulated Printers</strong>
</li>
<li class="none">
<a href="history.html" title="History">History</a>
</li>
</ul>
<a href="https://github.com/david-schmidt/gsport"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png" width="100" alt="Get GSport at Github." /></a>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>GSport Emulated Printers<a name="GSport_Emulated_Printers"></a></h2>
<p>There are two classes of printers emulated by GSport: an Epson LQ connected by a virtual serial card in slot 1, and an Apple Imagewriter LQ or Imagewriter II attached to serial port 1. Set up for common printing scenarios is detailed below:</p>
<ul>
<li>Emulated <a href="./printer.html#Imagewriter">Imagewriter LQ/II</a> - when you want to emulate an Imagewriter LQ or Imagewriter II specifically in slot 1</li>
<li>Windows <a href="./printer.html#Bitmap">Bitmap or Postscript</a> (B&amp;W) - when you want a graphical file saved on the host computer</li>
<li>Direct to <a href="./printer.html#Host">host printer</a> - when you want a real, paper-based copy immediately (or, a Postscript file with an appropriate printer driver) </li>
<li><a href="./printer.html#Text">Text File</a> - when you want a file of plain text saved on the host computer </li></ul>
<p>When configuring the virtual printer (details below), these notes apply in all situations:</p>
<ul>
<li>The &quot;Printer Timeout&quot; setting configures how long until a form feed is automatically sent to the printer (which forces the emulator to kick out a &quot;page&quot;). This value should be set to a value like 15 seconds or more for PR#1-type printing to work as you might expect. If it is set to &quot;Never&quot;, you must manually send a form feed, fill a page with text, or exit the emulator before output is saved. This behavior is similar to modern laser/inkjet printers when they are used with Applesoft. Most applications are good about sending form feeds at page end, so this issue doesn't usually come up.</li>
<li>The Roman font is used in graphical printing by default, and the matching <tt>lib/letgothl.ttf</tt> is included in the distribution package. Printing emulation won't work if no fonts at all are defined. Any other mono-spaced TrueType font you have may also be used.</li></ul>
<div class="section">
<h3>Emulated <a name="Imagewriter">Imagewriter</a> LQ/II<a name="Emulated_Imagewriter_LQII"></a></h3>
<p>In GSport's internal control panel:</p>
<ol style="list-style-type: decimal">
<li>Under &quot;Serial Port Configuration&quot; set Port 0 to &quot;Virtual Imagewriter&quot;<img src="images/printerI1.png" alt="" /></li>
<li>Under &quot;Virtual Imagewriter Configuration&quot; you need to configure fonts. GSport comes with a fixed width font installed and pre-configured. Set any proportional font you wish to use. If you plan on using native Windows printer output or Postscript, set Multipage Files to &quot;Yes&quot;. The default printer timeout of 2 seconds is fine if you are running the machine in 8Mhz or unlimited speed modes. Set it higher if you are running at 1Mhz or 2.8Mhz since the printer may time out while the computer is &quot;thinking&quot; during print jobs.<img src="images/printerI2.png" alt="" /></li></ol>
<p>Printer DPI should be set to at least 720x720dpi for Imagewriter LQ resolution output (mostly GS/OS). Use 1440x1440dpi if you have a high resolution inkjet printer and plan on printing pure text documents. It also minimizes scaling artifacts when printing graphics.</p>
<p>Printer Type just changes the self ID string sent by the printer when the &quot;ESC-?&quot; command is sent. This is used by the driver included in GS/OS to determine what type of printer is connected and whether a color ribbon is installed. Set it to Imagewriter LQ in most cases.</p>
<p><b>Save your settings and restart GSport to apply your configuration changes!</b> (This will likely be fixed in a future release.)</p>
<p>In the native IIgs control panel:</p>
<ol style="list-style-type: decimal">
<li>Under &quot;Slots&quot;, Slot 1 should be set to &quot;Printer Port&quot;</li>
<li>Under &quot;Printer Port&quot; leave everything at its default setting, but set baud rate to 19200. It is highly recommended that you install the QuickPort CDA and set the port speed to &quot;57600&quot;. Since we are using the SCC emulation, the speed that data is transferred to the virtual printer is limited by the baud rate set by the emulated environment.</li></ol>
<p>8-bit and non-Printer Manager IIgs applications (like Printshop GS) should work without a problem after configuring them to print to an Imagewriter connected to slot 1. When printing text in programs like Appleworks, be sure to set page margins. By default, the emulator starts printing at the upper left hand corner of the virtual &quot;page&quot;.</p>
<p>GS/OS requires configuration in the &quot;DC Printer&quot; control panel. Make sure you install the printer drivers from your GS/OS disk set. Set the port to &quot;Printer&quot; and type to &quot;Imagewriter.LQ&quot;. If you have Harmonie, use its &quot;Printer57.6&quot; port driver as it greatly speeds up printing (the built in port driver appears to be hard coded to 19200 baud max). Do not use its &quot;Printer.HAR&quot; port driver as it sends junk text to the printer for some reason. Harmonie's &quot;IWriterLQ.HAR&quot; and &quot;Imagewriter.HAR&quot; drivers have been tested and are fully compatible with the printer emulator. They do not query the printer with ESC-?, so the setting of Printer Type in the GSport control panel doesn't matter with these. Both Harmonie and Pointless are highly recommended for the best quality output in GS/OS.</p>
<p>The printer emulator supports all Imagewriter II and LQ functions documented in Apple's official reference manuals. Mousetext and custom character definitions are NOT supported. This is consistent with a real Imagewriter LQ. Only the Imagewriter II supported those functions. </p></div>
<div class="section">
<h3>Windows <a name="Bitmap">Bitmap</a> or Postscript<a name="Windows_Bitmap_or_Postscript"></a></h3>
<p>To set up GSport to write .BMP or .PS files for each &quot;page&quot; produced, apply the following settings:</p>
<p>Enter the GS native control panel and set slot 1 to &quot;Your Card&quot;, then save and exit the control panel. You will need to reboot the emulated GS (with a cold boot - Ctrl-Alt-F12, etc.) or restart GSport to have this change take effect, just like a real GS:</p><img src="images/printer0.png" alt="" />
<p>Press F4 to enter the text-based GSport menu and select the &quot;Parallel Card Configuration&quot; option. By default, printer emulation is turned off. Enable it by setting &quot;Parallel Card in Slot 1&quot; to &quot;On,&quot; and leave the &quot;Parallel Output&quot; option set to its default value, &quot;Send full 8-bit data:&quot;</p><img src="images/printer1.png" alt="" />
<p>Next, navigate back to the main menu and select the &quot;Virtual Printer Configuration&quot; option and set &quot;Printer Output Type&quot; to either &quot;Windows Bitmap&quot; or &quot;Postscript (B&amp;W)&quot; based on your preference:</p><img src="images/printer3.png" alt="" />
<p>Save the configuration, and printed output will be saved as files in GSport's current working directory.</p></div>
<div class="section">
<h3>Direct to <a name="Host">Host</a> Printer<a name="Direct_to_Host_Printer"></a></h3>
<p>The &quot;Direct to host printer&quot; feature is only implemented on the Windows platform. To set up GSport to send page-oriented output directly to your system's printer, apply the following settings:</p>
<p>Enter the GS native control panel and set slot 1 to &quot;Your Card&quot;, then save and exit the control panel. Note that you will need to restart GSport after all of the changes below are made, so don't restart just yet:</p><img src="images/printer0.png" alt="" />
<p>Press F4 to enter the text-based GSport menu and select the &quot;Parallel Card Configuration&quot; option. By default, printer emulation is turned off. Enable it by setting &quot;Parallel Card in Slot 1&quot; to &quot;On,&quot; and leave the &quot;Parallel Output&quot; option set to its default value, &quot;Send full 8-bit data:&quot;</p><img src="images/printer1.png" alt="" />
<p>Next, navigate back to the main menu and select the &quot;Virtual Printer Configuration&quot; option and set &quot;Printer Output Type&quot; to &quot;Direct to host printer:&quot;</p><img src="images/printer6.png" alt="" />
<p>Save the configuration, and stop the GSport application altogether and restart it. You should be presented with your system's default printer selection dialog box:</p><img src="images/printer7.png" alt="" />
<p>The printer you choose here will be the place that page-oriented output is sent, subject to the page ejection timeouts discussed earlier. Note that it is even possible to use a printer driver that itself produces PDF output instead of physical paper.</p></div>
<div class="section">
<h3><a name="Text">Text</a> File<a name="Text_File"></a></h3>
<p>Printing to a text file will bypass all printer emulation and simply append printed data to a file named <tt>printer.txt</tt> in GSport's current working directory. This is especially useful for text-based operations like Applesoft listings using the traditional <tt>PR#1:LIST:PR#0</tt> command sequences. Output from GSOS applications like TeachText are not actually textual in nature - they are graphical. It would be more appropriate to use a different type of printer output in that situation. </p>
<p>To set up GSport to append printed text to a printer.txt file, apply the following settings:</p>
<p>Enter the GS native control panel and set slot 1 to &quot;Your Card&quot;, then save and exit the control panel. You will need to reboot the emulated GS (with a cold boot - Ctrl-Alt-F12, etc.) or restart GSport to have this change take effect, just like a real GS:</p><img src="images/printer0.png" alt="" />
<p>Press F4 to enter the text-based GSport menu and select the &quot;Parallel Card Configuration&quot; option. By default, printer emulation is turned off. Enable it by setting &quot;Parallel Card in Slot 1&quot; to &quot;On.&quot; Also change the &quot;Parallel Output&quot; option to &quot;Mask off high bit:&quot;</p><img src="images/printer4.png" alt="" />
<p>Next, navigate back to the main menu and select the &quot;Virtual Printer Configuration&quot; option and set &quot;Printer Output Type&quot; to &quot;Text file:&quot;</p><img src="images/printer5.png" alt="" />
<p>Save the configuration, and printed output will be appended in the <tt>printer.txt</tt> file in GSport's current working directory.</p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2010-2017
GSport Contributors.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/gsport/" : "http://sourceforge.net/apps/piwik/gsport/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.trackPageView(); piwikTracker.enableLinkTracking();} catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/gsport/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript><!-- End Piwik Tag -->
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

6
src/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*.o
gsport.exe
/16inst_c.h
/8inst_c.h
/size_c.h
/vars

View File

@ -52,7 +52,7 @@ gsportmac: $(OBJECTS) compile_time.o
rm -rf ../GSportDmg
mkdir ../GSportDmg
mkdir ../GSportDmg/GSport
cp ../COPYING.txt ../GSportDmg/GSport
cp ../LICENSE ../GSportDmg/GSport
cp -f parallel.rom ../GSportDmg/GSport
cp -f ../lib/NoBoot.po ../GSportDmg/GSport
mv ../GSport.app ../GSportDmg/GSport
@ -85,7 +85,7 @@ gsport.exe: $(OBJECTS) compile_time.o
cp -f ../lib/NoBoot.po ../GSport.app
cp -f GSport.bat ../GSport.app/GSport.bat
cp -f parallel.rom ../GSport.app
cp -f ../COPYING.txt ../GSport.app
cp -f ../LICENSE ../GSport.app
cp -f ../GSport.html ../GSport.app
8inst_c.h: instable.h

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -29,9 +29,6 @@
<ClCompile Include="pcap_delay.c" />
<ClCompile Include="port.c" />
</ItemGroup>
<ItemGroup>
<Text Include="notes.txt" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2C88133A-7CB8-4C03-AF4D-4ECFC6F8500B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
@ -41,13 +38,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>

View File

@ -63,7 +63,4 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="notes.txt" />
</ItemGroup>
</Project>

View File

@ -1,95 +0,0 @@
AppleTalk Emulation and Bridging for GSport
Peter Neubauer, March 2014
Overview
========
GSport now emulates the AppleTalk networking hardware found in the real Apple IIgs and bridges the networking packets to EtherTalk v2. GSport supports file
sharing, printer sharing, and network booting features using Apple's original AppleTalk software, such as that shipped with GS/OS 6.0.1. Note that the
original AppleTalk software is not directly compatible with modern software, and you will need a compatible file server, such as netatalk or A2SERVER.
Introduction
============
The Apple IIgs shipped with a fantastic but often overlooked feature -- AppleTalk networking. AppleTalk is a low-cost, easy-to-maintain network technology that
enables network booting, file sharing, and printer sharing between your Apple IIgs, Workstation Card equipped Apple IIe, and classic Macintosh machines. As of
March 2014, GSport is the first modern emulator with support for AppleTalk. Now, you can just "drag and drop" files between your machines without thinking about
disk images, FTP, or serial cables. You can develop new software with an emulator and quickly test on real hardware. You don't need to think much about version
control. Rather, you can update the file once on your file server, and all of your emulated and real machines have the new file. You can download the latest
Apple II software and immediately run it.
Beware that Apple changed the meaning of the word "AppleTalk." Originally, AppleTalk implied a physical layer using 3-pin MiniDIN shielded cables connected in a
bus topology. As other physical layers such as Ethernet and TokenTalk became more affordable, Apple defined new terms. The term AppleTalk no longer implied
MiniDIN cabling. Rather, AppleTalk became the overall term for Apple's approach to networking. LocalTalk refers to AppleTalk using the original MiniDIN physical
and link layers. EtherTalk refers to AppleTalk using the Ethernet link and physical layers. TokenTalk refers to AppleTalk using the TokenRing link and physical
layers. As the Internet became popular, Apple revised their approach to networking to use TCP/IP for the network and transport layers. The "Internet modernized"
AppleTalk (AppleTalk IP) replaces many key services of the older AppleTalk and is incompatible with the previous incarnation of AppleTalk. The IIgs only supports
AppleTalk using LocalTalk. The GSport emulation converts LocalTalk to EtherTalk but does *not* support AppleTalk over IP.
Using It
========
First, you need an AppleShare-compatible server. A classic Mac or "netatalk" server could provide this function. For simplicity, I recommend Ivan Drucker's
A2SERVER (http://appleii.ivanx.com/a2server/), which is a pre-configured and easy-to-use package with "netatalk" and other useful tools. You may run A2SERVER in
a VirtualBox virtual machine, on an existing Linux server, or on a Raspberry Pi. File and print sharing functions built-in to modern computers are not directly
compatible.
Second, you need GSport 0.3 or later with ROM03 running on a Windows or Linux (x86 or Raspberry Pi) machine. Start GSport and press F4 to access the configuration
menu. If necessary, select a ROM03 image. Select the "Ethernet Card Configuration" menu option. Change "AppleTalk Bridging" to "On". Change "Use Interface
Number" to select the network where you have attached your AppleShare server or A2SERVER. Exit the GSport configuration menu.
You may run GSport and netatalk (or A2SERVER) on the same machine:
On Windows:
1. Configure A2SERVER in a VirtualBox virtual machine. The A2SERVER project provides a pre-configured virtual machine as well as manual installation directions.
2. Install the "Microsoft Loopback Adapter" following directions from Microsoft.
See http://blogs.msdn.com/b/ukvsts/archive/2009/02/27/adding-the-ms-loopback-adapter-on-windows-7.aspx and
http://technet.microsoft.com/en-us/library/cc708322%28v=ws.10%29.aspx.
3. In the VirtualBox Manager, open "Settings" for the A2SERVER virtual machine. Select the "Network" section. Change the "Attached to" option to "Bridged Adapter"
and "Name" to "Microsoft Loopback Adapter". Under the "Advanced" sub-section, make sure "Promiscious Mode" is "Allow All".
4. Restart A2SERVER.
5. Restart GSport. Under the "Ethernet Card Configuration" menu, change "User Interface Number" to select the "MS LoopBack Driver".
On Linux:
[Directions are forthcoming.]
Finally, party like it is 1989. Your GS is now connected to the AppleTalk network. Refer to Apple's documentation included with GS/OS System 5 and 6 for further
directions.
Internal Overview
=================
GSport with AppleTalk networking is functionally equivalent to a real Apple IIgs with a LocalTalk/EtherTalk bridge. Originally, AppleTalk employed the "LocalTalk"
physical layer, which requires special hardware not found on modern computers. GSport converts LocalTalk to EtherTalk, a somewhat more modern physical layer using
familiar Ethernet cabling. Internally, GSport emulates the Zilog SCC chip in the IIgs, communicates with unmodified Apple-provided networking software built-in to
the IIgs and GS/OS, and converts the network traffic to EtherTalk.
Limitations
===========
- The IIgs hardware and GSport only support AppleTalk using LocalTalk. Neither are compatible with file or print sharing functions in modern computers. Instead,
run a compatible network server, such as A2SERVER, Netatalk 2.x, or AppleShare.
- A wireless network may not work because many wireless adapters drop EtherTalk packets. Instead, use a wired Ethernet connection.
- AppleTalk bridging has been tested with System 6.0.1 and System 5.0.2 on ROM03. Booting from a local disk or from the network works. Other ROM revisions and
system software may not work.
- The SCC baud rate is incorrect because the GSport does not emulate line coding. Still, emulated network speed should be close to the 230.4kbps speed of a real
LocalTalk network.
- The bridge supports Windows using Visual Studio, Cygwin, and Linux (x86 and Raspberry Pi). Other platforms should be straightforward, but I do not have a suitable
build environment.
- The bridge requires an AppleTalk router on the network. The bridge should work in both a routerless and router-filled network, and future revisions will remove
this limitation.
- The bridge works with simple networks consisting of a single network on a single segment with a single zone. The bridge should function with all valid network
configurations and hardware routers, and future revisions will remove this limitation. Other configurations might not work, and I welcome reports.
- The bridge implements the non-extended method for acquiring the network number. Interoperability would likely be better using the extended method, but this method
is much more complex.
Credits
=======
Thanks to Gursharan Sidhu, Richard Andrews, and Alan Oppenheimer for creating and documenting AppleTalk.
Thanks to Kent Dickey and the GSport contributors for GSport and the original SCC emulation.
Thanks to David Schmenk for testing, encouragement, and Raspberry Pi support.
Thanks to Ivan Drucker for A2SERVER.
Thanks to the Gus emulator engineers for showing that AppleTalk emulation is possible.
Thanks to James Littlejohn for discussions about extending the capabilities of the Apple IIgs.

View File

@ -22,6 +22,7 @@
#include "defc.h"
#include <stdarg.h>
#include "config.h"
#include "imagewriter.h"
#if defined(__OS2__)
#include "arch\os2\src\dirport.h"
#elif defined(_MSC_VER)
@ -104,6 +105,8 @@ extern int g_imagewriter_multipage;
extern int g_imagewriter_timeout;
extern char* g_imagewriter_fixed_font;
extern char* g_imagewriter_prop_font;
extern int g_imagewriter_paper;
extern int g_imagewriter_banner;
#if defined(_WIN32) || defined(__CYGWIN__)
extern int g_win_show_console_request;
@ -148,6 +151,7 @@ int g_cfg_curs_x = 0;
int g_cfg_curs_y = 0;
int g_cfg_curs_inv = 0;
int g_cfg_curs_mousetext = 0;
int g_cfg_triggeriwreset = 0;
#define CFG_MAX_OPTS 16
#define CFG_OPT_MAXSTR 100
@ -228,10 +232,17 @@ Cfg_menu g_cfg_rom_menu[] = {
Cfg_menu g_cfg_serial_menu[] = {
{ "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU },
{ "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail,2,Virtual Imagewriter",
#ifdef HAVE_SDL
{ "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail,2,Virtual ImageWriter",
KNMP(g_serial_type[0]), CFGTYPE_INT },
{ "Port 1 (slot 2),0,Only use socket 6502,1,Use real port if avail,2,Virtual Imagewriter",
{ "Port 1 (slot 2),0,Only use socket 6502,1,Use real port if avail,2,Virtual ImageWriter",
KNMP(g_serial_type[1]), CFGTYPE_INT },
#else
{ "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail",
KNMP(g_serial_type[0]), CFGTYPE_INT },
{ "Port 1 (slot 2),0,Only use socket 6502,1,Use real port if avail",
KNMP(g_serial_type[1]), CFGTYPE_INT },
#endif
{ "Serial Output,0,Send full 8-bit data,1,Mask off high bit",
KNMP(g_serial_out_masking), CFGTYPE_INT },
{ "Modem on port 0 (slot 1),0,Simple socket emulation mode,1,Modem with "
@ -274,16 +285,16 @@ Cfg_menu g_cfg_ethernet_menu[] = {
{ "Back to Main Config", g_cfg_main_menu, 0, 0, CFGTYPE_MENU },
{ 0, 0, 0, 0, 0 },
};
#ifdef HAVE_SDL
Cfg_menu g_cfg_printer_menu[] = {
{ "Virtual Printer Configuration", g_cfg_printer_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Epson Configuration", g_cfg_printer_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Printer Type,0,Epson LQ",
KNMP(g_printer), CFGTYPE_INT },
{ "Printer DPI,60,60x60 dpi,180,180x180 dpi,360,360x360 dpi",
KNMP(g_printer_dpi), CFGTYPE_INT },
{ "Printer Output Type,bmp,Windows Bitmap,ps,Postscript (B&W),printer,Direct to host printer,text,Text file",
KNMP(g_printer_output), CFGTYPE_STR },
{ "Multipage Files? (PS Only),0,No,1,Yes",
{ "Multipage Files? (PS and Direct to Host Only),0,No,1,Yes",
KNMP(g_printer_multipage), CFGTYPE_INT },
{ "Printer Timeout,0,Never,2,2 sec.,15,15 sec.,30,30 sec.,60, 1 min.",
KNMP(g_printer_timeout), CFGTYPE_INT },
@ -303,28 +314,34 @@ Cfg_menu g_cfg_printer_menu[] = {
};
Cfg_menu g_cfg_imagewriter_menu[] = {
{ "Virtual Imagewriter Configuration", g_cfg_imagewriter_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Printer Type,0,Imagewriter II,1,Imagewriter LQ",
{ "Virtual ImageWriter Configuration", g_cfg_imagewriter_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Printer Type,0,ImageWriter II,1,ImageWriter LQ",
KNMP(g_imagewriter), CFGTYPE_INT },
{ "Paper Size,0,US Letter (8.5x11in),1,US Legal (8.5x14in),2,ISO A4 (210 x 297mm),3,ISO B5 (176 x 250mm),4,Wide Fanfold (14 x 11in),5,Ledger (11 x 17in),6,ISO A3 (297 x 420mm)",
KNMP(g_imagewriter_paper), CFGTYPE_INT },
{ "Printer DPI,360,360x360 dpi (Best for 8-bit software),720,720x720 dpi (Best for GS/OS & IW LQ Modes),1440,1440x1440 dpi",
KNMP(g_imagewriter_dpi), CFGTYPE_INT },
{ "Banner Printing (Limited To 144x144 dpi Output),0,Banner Printing Off,3,3 Pages Long,4,4 Pages Long,5,5 Pages Long,6,6 Pages Long,7,7 Pages Long,8,8 Pages Long,9,9 Pages Long,10,10 Pages Long",
KNMP(g_imagewriter_banner), CFGTYPE_INT },
{ "Printer Output Type,bmp,Windows Bitmap,ps,Postscript (B&W),colorps,Postscript (Color),printer,Direct to host printer,text,Text file",
KNMP(g_imagewriter_output), CFGTYPE_STR },
{ "Multipage Files? (PS Only),0,No,1,Yes",
{ "Multipage Files? (PS and Direct to Host Only),0,No,1,Yes",
KNMP(g_imagewriter_multipage), CFGTYPE_INT },
{ "Printer Timeout,0,Never,2,2 sec.,15,15 sec.,30,30 sec.,60, 1 min.",
KNMP(g_imagewriter_timeout), CFGTYPE_INT },
{ "", 0, 0, 0, 0 },
{ "Imagewriter Fonts", 0, 0, 0, 0 },
{ "ImageWriter Fonts", 0, 0, 0, 0 },
{ "-----------------", 0, 0, 0, 0 },
{ "", 0, 0, 0, 0 },
{ "Fixed Width Font", KNMP(g_imagewriter_fixed_font), CFGTYPE_FILE },
{ "", 0, 0, 0, 0 },
{ "Proportional Font", KNMP(g_imagewriter_prop_font), CFGTYPE_FILE },
{ "", 0, 0, 0, 0 },
{ "", 0, 0, 0, 0 },
{ "Back to Main Config", g_cfg_main_menu, 0, 0, CFGTYPE_MENU },
{ 0, 0, 0, 0, 0 },
};
#endif
Cfg_menu g_cfg_devel_menu[] = {
{ "Developer Options", g_cfg_devel_menu, 0, 0, CFGTYPE_MENU },
@ -358,8 +375,10 @@ Cfg_menu g_cfg_main_menu[] = {
{ "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU },
{ "Ethernet Card Configuration", g_cfg_ethernet_menu, 0, 0, CFGTYPE_MENU },
{ "Parallel Card Configuration", g_cfg_parallel_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Printer Configuration", g_cfg_printer_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual Imagewriter Configuration", g_cfg_imagewriter_menu, 0, 0, CFGTYPE_MENU },
#ifdef HAVE_SDL
{ "Virtual Epson Configuration", g_cfg_printer_menu, 0, 0, CFGTYPE_MENU },
{ "Virtual ImageWriter Configuration", g_cfg_imagewriter_menu, 0, 0, CFGTYPE_MENU },
#endif
{ "Developer Options", g_cfg_devel_menu, 0, 0, CFGTYPE_MENU },
{ "Auto-update configuration file,0,Manual,1,Immediately",
KNMP(g_config_gsport_auto_update), CFGTYPE_INT },
@ -369,6 +388,9 @@ Cfg_menu g_cfg_main_menu[] = {
"0x400000,4MB,0x600000,6MB,0x800000,8MB,0xa00000,10MB,0xc00000,12MB,"
"0xe00000,14MB", KNMP(g_mem_size_exp), CFGTYPE_INT },
{ "Dump text screen to file", (void *)cfg_text_screen_dump, 0, 0, CFGTYPE_FUNC},
#ifdef HAVE_SDL
{ "Reset Virtual ImageWriter", (void *)cfg_iwreset, 0, 0, CFGTYPE_FUNC },
#endif
{ "", 0, 0, 0, 0 },
{ "Save changes to configuration file", (void *)config_write_config_gsport_file, 0, 0,
CFGTYPE_FUNC },
@ -604,7 +626,14 @@ cfg_text_screen_dump()
}
fclose(ofile);
}
void
cfg_iwreset()
{
imagewriter_feed();
imagewriter_close();
imagewriter_init(g_imagewriter_dpi,g_imagewriter_paper,g_imagewriter_banner, g_imagewriter_output,g_imagewriter_multipage);
return;
}
#ifdef HAVE_TFE
void
cfg_get_tfe_name()
@ -3280,6 +3309,14 @@ config_control_panel()
{
cfg_get_tfe_name();
}
#endif
#ifdef HAVE_SDL
/*If user enters the Virtual Imagewriter control panel, flag it so we can
automatically apply changes on exit.*/
if(menuptr == g_cfg_imagewriter_menu)
{
g_cfg_triggeriwreset = 1;
}
#endif
key = -1;
while(g_config_control_panel & !(halt_sim&HALT_WANTTOQUIT)) {
@ -3333,6 +3370,7 @@ config_control_panel()
case CFGTYPE_FUNC:
fn_ptr = (void (*)())ptr;
(*fn_ptr)();
adb_all_keys_up(); //Needed otherwise menu function will continue to repeat until we move selection up or down
break;
case CFGTYPE_FILE:
g_cfg_slotdrive = 0xfff;
@ -3365,6 +3403,11 @@ config_control_panel()
set_memory_c(0xe10400+i, g_save_text_screen_bytes[0x400+i], 0);
}
// And quit
if (g_cfg_triggeriwreset)
{
g_cfg_triggeriwreset = 0;
cfg_iwreset(); //Reset the virtual Imagewriter if the user was in the control panel.
}
g_config_control_panel = 0;
g_adb_repeat_vbl = g_vbl_count + 60;
g_cur_a2_stat = g_save_cur_a2_stat;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -20,14 +20,14 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -101,7 +101,7 @@ void Imagewriter::FillPalette(Bit8u redmax, Bit8u greenmax, Bit8u bluemax, Bit8u
}
#endif // HAVE_SDL
Imagewriter::Imagewriter(Bit16u dpi, Bit16u width, Bit16u height, char* output, bool multipageOutput, int port)
Imagewriter::Imagewriter(Bit16u dpi, Bit16u paperSize, Bit16u bannerSize, char* output, bool multipageOutput)
{
#ifdef HAVE_SDL
if (FT_Init_FreeType(&FTlib))
@ -111,14 +111,22 @@ Imagewriter::Imagewriter(Bit16u dpi, Bit16u width, Bit16u height, char* output,
else
{
SDL_Init(SDL_INIT_EVERYTHING);
this->dpi = dpi;
this->output = output;
this->multipageOutput = multipageOutput;
this->port = port;
defaultPageWidth = (Real64)width/(Real64)10;
defaultPageHeight = (Real64)height/(Real64)10;
if (bannerSize)
{
defaultPageWidth = ((Real64)paperSizes[0][0]/(Real64)72);
defaultPageHeight = (((Real64)paperSizes[0][1]*bannerSize)/(Real64)72);
dpi = 144;
}
else
{
defaultPageWidth = ((Real64)paperSizes[paperSize][0]/(Real64)72);
defaultPageHeight = ((Real64)paperSizes[paperSize][1]/(Real64)72);
}
this->dpi = dpi;
// Create page
page = SDL_CreateRGBSurface(
SDL_SWSURFACE,
@ -188,23 +196,24 @@ Imagewriter::Imagewriter(Bit16u dpi, Bit16u width, Bit16u height, char* output,
outputHandle = NULL;
resetPrinter();
if (strcasecmp(output, "printer") == 0)
//Only initialize native printer here if multipage output is off. That way the user doesn't get prompted every page.
if (strcasecmp(output, "printer") == 0 && !multipageOutput)
{
#if defined (WIN32)
// Show Print dialog to obtain a printer device context
ShowCursor(1);
PRINTDLG pd;
pd.lStructSize = sizeof(PRINTDLG);
pd.hDevMode = (HANDLE) NULL;
pd.hDevNames = (HANDLE) NULL;
pd.Flags = PD_RETURNDC;
pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE;
pd.hwndOwner = NULL;
pd.hDC = (HDC) NULL;
pd.nFromPage = 1;
pd.nToPage = 1;
pd.nMinPage = 0;
pd.nMaxPage = 0;
pd.nFromPage = 0xFFFF;
pd.nToPage = 0xFFFF;
pd.nMinPage = 1;
pd.nMaxPage = 0xFFFF;
pd.nCopies = 1;
pd.hInstance = NULL;
pd.lCustData = 0L;
@ -213,10 +222,15 @@ Imagewriter::Imagewriter(Bit16u dpi, Bit16u width, Bit16u height, char* output,
pd.lpPrintTemplateName = (LPCSTR) NULL;
pd.lpSetupTemplateName = (LPCSTR) NULL;
pd.hPrintTemplate = (HANDLE) NULL;
pd.hSetupTemplate = (HANDLE) NULL;
PrintDlg(&pd);
// TODO: what if user presses cancel?
pd.hSetupTemplate = (HANDLE) NULL;
if(!PrintDlg(&pd))
{
//If user presses cancel, warn them with a dialog and switch output to bitmap files
this->output = "bmp";
MessageBox(NULL,"You did not select a printer.\nAll printer output will be saved as bitmap files.\nTo select a printer, press F4 and select 'Reset Virtual ImageWriter'",NULL,MB_ICONEXCLAMATION);
}
printerDC = pd.hDC;
ShowCursor(0);
#endif // WIN32
}
}
@ -246,7 +260,7 @@ void Imagewriter::resetPrinter()
ESCCmd = 0;
numParam = neededParam = 0;
topMargin = 0.0;
leftMargin = 0.0;
leftMargin = 0.25; //Most all Apple II software including GS/OS assume a 1/4 inch margin on an Imagewriter
rightMargin = pageWidth = defaultPageWidth;
bottomMargin = pageHeight = defaultPageHeight;
lineSpacing = (Real64)1/6;
@ -1508,7 +1522,7 @@ void Imagewriter::printBitGraph(Bit8u ch)
Bitu pixsizeY=1;
if(bitGraph.adjacent) {
pixsizeX = dpi/bitGraph.horizDens > 0? dpi/bitGraph.horizDens : 1;
if(dpi%bitGraph.horizDens)
if(dpi%bitGraph.horizDens && bitGraph.horizDens < dpi)
{
if(PIXX%(bitGraph.horizDens*8) || (PIXX == 0)) //Primative scaling function
{
@ -1625,22 +1639,65 @@ SDL_FreeSurface(image);*/
if (strcasecmp(output, "printer") == 0)
{
#if defined (WIN32)
Bit16u physW = GetDeviceCaps(printerDC, PHYSICALWIDTH);
Bit16u physH = GetDeviceCaps(printerDC, PHYSICALHEIGHT);
Real64 scaleW, scaleH;
if (page->w > physW)
scaleW = (Real64)page->w / (Real64)physW;
else
scaleW = (Real64)physW / (Real64)page->w;
if (page->h > physH)
scaleH = (Real64)page->h / (Real64)physH;
else
scaleH = (Real64)physH / (Real64)page->h;
if (multipageOutput && outputHandle == NULL)
{
ShowCursor(1);
PRINTDLG pd;
pd.lStructSize = sizeof(PRINTDLG);
pd.hDevMode = (HANDLE) NULL;
pd.hDevNames = (HANDLE) NULL;
pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE;
pd.hwndOwner = NULL;
pd.hDC = (HDC) NULL;
pd.nFromPage = 0xFFFF;
pd.nToPage = 0xFFFF;
pd.nMinPage = 1;
pd.nMaxPage = 0xFFFF;
pd.nCopies = 1;
pd.hInstance = NULL;
pd.lCustData = 0L;
pd.lpfnPrintHook = (LPPRINTHOOKPROC) NULL;
pd.lpfnSetupHook = (LPSETUPHOOKPROC) NULL;
pd.lpPrintTemplateName = (LPCSTR) NULL;
pd.lpSetupTemplateName = (LPCSTR) NULL;
pd.hPrintTemplate = (HANDLE) NULL;
pd.hSetupTemplate = (HANDLE) NULL;
if(!PrintDlg(&pd))
{
//If user clicks cancel, show warning dialog and force all output to bitmaps as failsafe.
MessageBox(NULL,"You did not select a printer.\nAll output from this print job will be saved as bitmap files.",NULL,MB_ICONEXCLAMATION);
findNextName("page", ".bmp", &fname[0]);
SDL_SaveBMP(page, fname); //Save first page as bitmap.
outputHandle = printerDC;
printerDC = NULL;
ShowCursor(0);
return;
}
else
{
//Create device context.
printerDC = pd.hDC;
ShowCursor(0);
}
}
if (!printerDC) //Fall thru for subsequent pages if printer dialog was cancelled.
{
findNextName("page", ".bmp", &fname[0]);
SDL_SaveBMP(page, fname); //Save remaining pages.
return;
}
Bit32u physW = GetDeviceCaps(printerDC, PHYSICALWIDTH);
Bit32u physH = GetDeviceCaps(printerDC, PHYSICALHEIGHT);
Bit16u printeroffsetW = GetDeviceCaps(printerDC, PHYSICALOFFSETX); //printer x offset in actual pixels
Bit16u printeroffsetH = GetDeviceCaps(printerDC, PHYSICALOFFSETY); //printer y offset in actual pixels
Bit16u deviceDPIW = GetDeviceCaps(printerDC, LOGPIXELSX);
Bit16u deviceDPIH = GetDeviceCaps(printerDC, LOGPIXELSY);
Real64 physoffsetW = (Real64)printeroffsetW/deviceDPIW; //printer x offset in inches
Real64 physoffsetH = (Real64)printeroffsetH/deviceDPIH; //printer y offset in inches
Bit16u dpiW = page->w/defaultPageWidth; //Get currently set DPI of the emulated printer in an indirect way
Bit16u dpiH = page->h/defaultPageHeight;
Real64 soffsetW = physoffsetW*dpiW; //virtual page x offset in actual pixels
Real64 soffsetH = physoffsetH*dpiH; //virtual page y offset in actual pixels
HDC memHDC = CreateCompatibleDC(printerDC);
BITMAPINFO *BitmapInfo;
HBITMAP bitmap;
@ -1650,7 +1707,7 @@ SDL_FreeSurface(image);*/
{
DOCINFO docinfo;
docinfo.cbSize = sizeof(docinfo);
docinfo.lpszDocName = "GSport Virtual Imagewriter";
docinfo.lpszDocName = "GSport Virtual ImageWriter";
docinfo.lpszOutput = NULL;
docinfo.lpszDatatype = NULL;
docinfo.fwType = 0;
@ -1695,7 +1752,7 @@ SDL_FreeSurface(image);*/
memcpy (Pixels, page->pixels,
BitmapInfo->bmiHeader.biSizeImage);
Prev = SelectObject (memHDC, bitmap);
StretchBlt(printerDC, 0, 0, physW, physH, memHDC, 0, 0, page->w, page->h, SRCCOPY);
StretchBlt(printerDC, 0, 0, physW, physH, memHDC, soffsetW, soffsetH, page->w, page->h, SRCCOPY);
SelectObject (memHDC,Prev);
DeleteObject (bitmap);
}
@ -1803,10 +1860,7 @@ SDL_FreeSurface(image);*/
else if (strcasecmp(output, "colorps") == 0)
{
FILE* psfile = NULL;
Uint8 r, g, b;
int x, y;
int cur_line_len = 0;
int plane;
// Continue postscript file?
if (outputHandle != NULL)
psfile = (FILE*)outputHandle;
@ -1822,71 +1876,95 @@ SDL_FreeSurface(image);*/
psfile = fopen(fname, "wb");
if (!psfile)
{
printf("PRINTER: Can't open file %s for printer output", fname);
//LOG(LOG_MISC,LOG_ERROR)("PRINTER: Can't open file %s for printer output", fname);
return;
}
// Print header
fprintf(psfile, "%%!PS-Adobe-2.0 EPSF-2.0\n");
fprintf(psfile, "%%!PS-Adobe-3.0\n");
fprintf(psfile, "%%%%Pages: (atend)\n");
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%%%%Creator: GSport Virtual Printer\n");
fprintf(psfile, "%%%%DocumentData: Clean7Bit\n");
fprintf(psfile, "%%%%LanguageLevel: 2\n");
fprintf(psfile, "%%%%EndComments\n");
multiPageCounter = 1;
}
fprintf(psfile, "%%%%Page: %i %i\n", multiPageCounter, multiPageCounter);
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%i %i 8 [%i 0 0 -%i 0 %i]\n", page->w, page->h, page->w, page->h, page->h);
fprintf(psfile, "currentfile\n");
fprintf(psfile, "/ASCII85Decode filter\n");
fprintf(psfile, "/RunLengthDecode filter\n");
fprintf(psfile, "false 3\n");
fprintf(psfile, "colorimage\n");
SDL_LockSurface(page);
Bit8u * templine;
templine = (Bit8u*) malloc(page->w*3);
Bit32u x = 0;
Bit32u numy = page->h;
Bit32u numx = page->w;
Bit32u numpix = page->w*3;
Bit32u pix = 0;
Bit32u currDot = 0;
Bit32u y = 0;
Bit32u plane = 0;
Bit8u r, g, b;
ASCII85BufferPos = ASCII85CurCol = 0;
for (y=0; y < numy;y++)
{
currDot = 0;
for (x = 0; x < numx; x++)
{
SDL_GetRGB(getxyPixel(x,y), page->format, &r, &g, &b);
templine[currDot] = ~r; currDot++;
templine[currDot] = ~g; currDot++;
templine[currDot] = ~b; currDot++;
}
// Compress data using RLE
pix = 0;
while (pix < numpix)
{
if ((pix < numpix-2) && (templine[pix] == templine[pix+1]) && (templine[pix] == templine[pix+2]))
{
// Found three or more pixels with the same color
Bit8u sameCount = 3;
Bit8u col = templine[pix];
while (sameCount < 128 && sameCount+pix < numpix && col == templine[pix+sameCount])
sameCount++;
fprintf(psfile, "%%%%Page: %i %i\n", multiPageCounter, multiPageCounter);
fprintASCII85(psfile, 257-sameCount);
fprintASCII85(psfile, 255-col);
fprintf(psfile, "<< /PageSize [ %d %d ] /ImagingBBox null >> setpagedevice\n",
(Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
/* Define a 'readstring' routine and 'picstr' routines for RGB: */
// Skip ahead
pix += sameCount;
}
else
{
// Find end of heterogenous area
Bit8u diffCount = 1;
while (diffCount < 128 && diffCount+pix < numpix &&
(
(diffCount+pix < numpix-2)
|| (templine[pix+diffCount] != templine[pix+diffCount+1])
|| (templine[pix+diffCount] != templine[pix+diffCount+2])
))
diffCount++;
fprintf(psfile, "/readstring {\n");
fprintf(psfile, " currentfile exch readhexstring pop\n");
fprintf(psfile, "} bind def\n");
fprintf(psfile, "/rpicstr %d string def\n", page->w);
fprintf(psfile, "/gpicstr %d string def\n", page->w);
fprintf(psfile, "/bpicstr %d string def\n", page->w);
fprintf(psfile, "%%%%EndProlog\n");
fprintf(psfile, "gsave\n");
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%d %d 8\n", page->w, page->h);
fprintf(psfile, "%i %i 8 [%i 0 0 -%i 0 %i]\n", page->w, page->h, page->w, page->h, page->h);
fprintf(psfile, "{ rpicstr readstring }\n");
fprintf(psfile, "{ gpicstr readstring }\n");
fprintf(psfile, "{ bpicstr readstring }\n");
fprintf(psfile, "true 3\n");
fprintf(psfile, "colorimage\n");
for (y = 0; y < page->h; y++)
{
for (plane = 0; plane < 3; plane++)
{
for (x = 0; x < page->w; x++)
{
SDL_GetRGB(getxyPixel(x,y), page->format, &r, &g, &b);
fprintf(psfile, "%02x", (plane == 0 ? r : (plane == 1 ? g : b)));
cur_line_len++;
if (cur_line_len >= 30)
{
fprintf(psfile, "\n");
cur_line_len = 0;
}
}
}
}
fprintf(psfile, "\n");
fprintf(psfile, "grestore\n");
fprintASCII85(psfile, diffCount-1);
for (Bit8u i=0; i<diffCount; i++)
fprintASCII85(psfile, 255-templine[pix++]);
}
}
}
// Write EOD for RLE and ASCII85
fprintASCII85(psfile, 128);
fprintASCII85(psfile, 256);
SDL_UnlockSurface(page);
free(templine);
fprintf(psfile, "showpage\n");
@ -1930,7 +2008,7 @@ fprintf(psfile, "%%%%EndProlog\n");
// Print header
fprintf(psfile, "%%!PS-Adobe-3.0\n");
fprintf(psfile, "%%%%Pages: (atend)\n");
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%%%%Creator: GSport Virtual Printer\n");
fprintf(psfile, "%%%%DocumentData: Clean7Bit\n");
fprintf(psfile, "%%%%LanguageLevel: 2\n");
@ -1939,7 +2017,7 @@ fprintf(psfile, "%%%%EndProlog\n");
}
fprintf(psfile, "%%%%Page: %i %i\n", multiPageCounter, multiPageCounter);
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%i %i 8 [%i 0 0 -%i 0 %i]\n", page->w, page->h, page->w, page->h, page->h);
fprintf(psfile, "currentfile\n");
fprintf(psfile, "/ASCII85Decode filter\n");
@ -2156,12 +2234,12 @@ Bit8u Imagewriter::getPixel(Bit32u num) {
//Interfaces to C code
extern "C" void imagewriter_init(int pdpi, int pwidth, int pheight, char* poutput, bool mpage, int port)
extern "C" void imagewriter_init(int pdpi, int ppaper, int banner, char* poutput, bool mpage)
{
if (defaultImagewriter != NULL) return; //if Imagewriter on this port is initialized, reuse it
defaultImagewriter = new Imagewriter(pdpi, pwidth,pheight, poutput, mpage, port);
defaultImagewriter = new Imagewriter(pdpi, ppaper, banner, poutput, mpage);
}
extern "C" void imagewriter_loop(Bit8u pchar, int port)
extern "C" void imagewriter_loop(Bit8u pchar)
{
if (defaultImagewriter == NULL) return;
defaultImagewriter->printChar(pchar);

View File

@ -123,7 +123,7 @@ typedef struct {
class Imagewriter {
public:
Imagewriter (Bit16u dpi, Bit16u width, Bit16u height, char* output, bool multipageOutput, int port);
Imagewriter (Bit16u dpi, Bit16u paperSize, Bit16u bannerSize, char* output, bool multipageOutput);
virtual ~Imagewriter();
// Process one character sent to virtual printer
@ -294,14 +294,19 @@ private:
Bit8u ASCII85CurCol; // Columns printed so far in the current lines
};
#endif
//Interfaces to C code
#ifdef __cplusplus
extern "C"
{
#else
#include <stdbool.h>
typedef unsigned char Bit8u;
#endif
void imagewriter_init(int pdpi, int pwidth, int pheight, char* poutput, bool mpage, int port);
void imagewriter_loop(Bit8u pchar,int port);
void imagewriter_init(int pdpi, int ppaper, int banner, char* poutput, bool mpage);
void imagewriter_loop(Bit8u pchar);
void imagewriter_close();
void imagewriter_feed();
#ifdef __cplusplus
@ -309,4 +314,3 @@ void imagewriter_feed();
#endif
#endif
#endif

View File

@ -1,6 +1,6 @@
/*
GSport - an Apple //gs Emulator
Copyright (C) 2010 by GSport contributors
Copyright (C) 2010 - 2020 by GSport contributors
Based on the KEGS emulator written by and Copyright (C) 2003 Kent Dickey
@ -2231,8 +2231,12 @@ instcb_SYM /* WAI */
b dispatch
stw scratch2,r%g_wait_pending(scratch1)
#else
g_wait_pending = 1;
CYCLES_FINISH
if(g_irq_pending) {
g_wait_pending = 0;
INC_KPC_1;
} else {
g_wait_pending = 1;
}
#endif
instcc_SYM /* CPY abs */

View File

@ -58,3 +58,19 @@ static const Bit16u intCharSets[8][10] =
{0x00a3, 0x00e0, 0x00b0, 0x00e7, 0x00a7, 0x0060, 0x00e9, 0x00f9, 0x00e8, 0x00a8}, // France
{0x00a3, 0x00a7, 0x00a1, 0x00d1, 0x00bf, 0x0060, 0x00b0, 0x00f1, 0x00e7, 0x007e}, // Spanish
};
/*
Paper size definitions. Units are Postscript points (1/72in).
This list is based on the options available in the GS/OS
Imagewriter LQ driver.
*/
static const Bit16u paperSizes[7][2] =
{
{612, 792}, //US Letter 8.5 x 11in
{612, 1008}, //US Legal 8.5 x 14in
{595, 842}, //ISO A4 210 x 297mm
{499, 709}, //ISO B5 176 x 250mm
{1071, 792}, //Wide Fanfold 14 x 11in
{792, 1224}, //Ledger/Tabloid 11 x 17in
{842, 1191}, // ISO A3 297 x 420mm
};

View File

@ -573,56 +573,35 @@ iwm525_phase_change(int drive, int phase)
{
Disk *dsk;
int qtr_track;
int last_phase;
int phase_up;
int phase_down;
int delta;
phase_up = (phase - 1) & 3;
phase_down = (phase + 1) & 3;
dsk = &(iwm.drive525[drive]);
last_phase = dsk->last_phase;
qtr_track = dsk->cur_qtr_track;
int half_track = qtr_track >> 1;
delta = 0;
if(last_phase == phase_up) {
delta = 2;
last_phase = phase;
} else if(last_phase == phase_down) {
delta = -2;
last_phase = phase;
}
if (iwm.iwm_phase[(half_track + 1) & 3])
delta += 2;
if (iwm.iwm_phase[(half_track + 3) & 3])
delta -= 2;
qtr_track += delta;
if(qtr_track < 0) {
printf("GRIND...GRIND...GRIND\n");
printf("GRIND...");
qtr_track = 0;
last_phase = 0;
}
if(qtr_track > 4*34) {
printf("Disk arm moved past track 34, moving it back\n");
qtr_track = 4*34;
last_phase = 0;
}
iwm_move_to_track(dsk, qtr_track);
dsk->last_phase = last_phase;
iwm_printf("Moving drive to qtr track: %04x (trk:%d.%02d), %d, %d, %d, "
iwm_printf("Moving drive to qtr track: %04x (trk:%d.%02d), %d, %d, "
"%d %d %d %d\n", qtr_track, qtr_track>>2, 25*(qtr_track & 3),
phase, delta, last_phase, iwm.iwm_phase[0],
phase, delta, iwm.iwm_phase[0],
iwm.iwm_phase[1], iwm.iwm_phase[2], iwm.iwm_phase[3]);
/* sanity check stepping algorithm */
if((qtr_track & 7) == 0) {
/* check for just access phase 0 */
if(last_phase != 0 ) {
halt_printf("last_phase: %d!\n", last_phase);
}
}
}
int

View File

@ -205,9 +205,10 @@ joystick_update(double dcycs)
ret1 = joyGetDevCaps(id, &joycap, sizeof(joycap));
ret2 = joyGetPos(id, &info);
if(ret1 == JOYERR_NOERROR && ret2 == JOYERR_NOERROR) {
g_paddle_val[0] = (info.wXpos - joycap.wXmin) * 32768 /
/* val should be -32767 to +32767 */
g_paddle_val[0] = -32767 + (info.wXpos - joycap.wXmin) * 65535 /
(joycap.wXmax - joycap.wXmin);
g_paddle_val[1] = (info.wYpos - joycap.wYmin) * 32768 /
g_paddle_val[1] = -32767 + (info.wYpos - joycap.wYmin) * 65535 /
(joycap.wYmax - joycap.wYmin);
if(info.wButtons & JOY_BUTTON1) {
g_paddle_buttons = g_paddle_buttons | 1;

View File

@ -1901,7 +1901,7 @@ SDL_FreeSurface(image);*/
// Print header
fprintf(psfile, "%%!PS-Adobe-3.0\n");
fprintf(psfile, "%%%%Pages: (atend)\n");
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%%%%BoundingBox: 0 0 %i %i\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%%%%Creator: GSport Virtual Printer\n");
fprintf(psfile, "%%%%DocumentData: Clean7Bit\n");
fprintf(psfile, "%%%%LanguageLevel: 2\n");
@ -1910,7 +1910,7 @@ SDL_FreeSurface(image);*/
}
fprintf(psfile, "%%%%Page: %i %i\n", multiPageCounter, multiPageCounter);
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*74), (Bit16u)(defaultPageHeight*74));
fprintf(psfile, "%i %i scale\n", (Bit16u)(defaultPageWidth*72), (Bit16u)(defaultPageHeight*72));
fprintf(psfile, "%i %i 8 [%i 0 0 -%i 0 %i]\n", page->w, page->h, page->w, page->h, page->h);
fprintf(psfile, "currentfile\n");
fprintf(psfile, "/ASCII85Decode filter\n");

View File

@ -160,6 +160,7 @@ void config_init(void);
void cfg_exit(void);
void cfg_toggle_config_panel(void);
void cfg_text_screen_dump(void);
void cfg_iwreset(void);
void cfg_get_tfe_name(void);
void cfg_inspect_maybe_insert_file(char *filename, int should_boot);
int cfg_guess_image_size(char *filename);

View File

@ -392,7 +392,7 @@ scc_regen_clocks(int port)
}
break;
case 4: /* Imagewriter */
scc_ptr->baud_rate = 230400;
scc_ptr->baud_rate = 0;
scc_ptr->tx_dcycs = tx_dcycs * 1.2; //Somehow this speeds up serial transfer without overrunning the buffer
scc_ptr->rx_dcycs = rx_dcycs * 1.2;
break;

View File

@ -31,6 +31,8 @@ extern int g_imagewriter_dpi;
extern char* g_imagewriter_output;
extern int g_imagewriter_multipage;
extern int g_imagewriter_timeout;
extern int g_imagewriter_paper;
extern int g_imagewriter_banner;
word32 imagewriter_vbl_count = 0;
int imagewriter_port_block = 0;
@ -40,7 +42,7 @@ int scc_imagewriter_init(int port)
{
Scc *scc_ptr;
scc_ptr = &(scc_stat[port]);
imagewriter_init(g_imagewriter_dpi,85,110,g_imagewriter_output,g_imagewriter_multipage != 0, port);
imagewriter_init(g_imagewriter_dpi,g_imagewriter_paper,g_imagewriter_banner,g_imagewriter_output,g_imagewriter_multipage);
scc_ptr->state = 4;
return 4;
}
@ -122,7 +124,7 @@ void scc_imagewriter_empty_writebuf(int port, double dcycs)
}
bytes_written = 1;
imagewriter_port_block = 1;
imagewriter_loop(scc_ptr->out_buf[rdptr],port);
imagewriter_loop(scc_ptr->out_buf[rdptr]);
imagewriter_vbl_count = g_vbl_count+(g_imagewriter_timeout*60);
imagewriter_port_block = 0;
//printf("Write Imagewriter ret: %d, bytes_written:%d, len:%d\n", ret,

View File

@ -40,6 +40,7 @@ static bool bridge_initialized = false;
void scc_llap_init()
{
atbridge_set_diagnostics(g_appletalk_diagnostics);
bridge_initialized = atbridge_init();
atbridge_set_net(g_appletalk_network_hint);
}
@ -55,6 +56,8 @@ void scc_llap_update()
{
atbridge_process();
// Save the AppleTalk network number. Since the network number does not
// change very often, this will slightly improve startup time.
if (g_appletalk_network_hint != atbridge_get_net())
{
g_appletalk_network_hint = atbridge_get_net();
@ -84,6 +87,9 @@ void scc_llap_fill_readbuf(int port, int space_left, double dcycs)
}
free(data);
// Normally, the bridge updates from the 60 Hz loop, but that alone bottlenecks network throughput.
scc_llap_update();
}
/** Transfer one packet from the SCC to the AppleTalk bridge. **/
@ -131,6 +137,9 @@ void scc_llap_empty_writebuf(int port, double dcycs)
// The timing will be a bit off from the real hardware since we're not
// emulating the sending hardware timing and CRC generation.
scc_ptr->eom = 1;
// Normally, the bridge updates from the 60 Hz loop, but that alone bottlenecks network throughput.
scc_llap_update();
}
#else

View File

@ -23,6 +23,8 @@
#include "defc.h"
#include "scc.h"
#include <string.h>
#include <stdlib.h>
#ifndef UNDER_CE //OG
#include <signal.h>
#endif
@ -38,6 +40,7 @@ extern int h_errno;
#define socklen_t int
#endif
int g_wsastartup_called = 0;
typedef unsigned short USHORT;
/* Usage: scc_socket_init() called to init socket mode */
/* At all times, we try to have a listen running on the incoming socket */
@ -76,6 +79,20 @@ scc_socket_init(int port)
/* Real init will be done when bytes need to be read/write from skt */
}
static int
scc_socket_close_handle(SOCKET sockfd)
{
if (sockfd != -1)
{
#if defined(_WIN32) || defined (__OS2__)
return closesocket(sockfd); // NW: a Windows socket handle is not a file descriptor
#else
return close(sockfd);
#endif
}
return 0;
}
void
scc_socket_maybe_open_incoming(int port, double dcycs)
{
@ -143,7 +160,7 @@ scc_socket_maybe_open_incoming(int port, double dcycs)
/* else ret to bind was < 0 */
printf("bind ret: %d, errno: %d\n", ret, errno);
inc++;
close(sockfd);
scc_socket_close_handle(sockfd);
printf("Trying next port: %d\n", 6501 + port + inc);
if(inc >= 10) {
printf("Too many retries, quitting\n");
@ -171,6 +188,7 @@ scc_socket_open_outgoing(int port, double dcycs)
int on;
int ret;
SOCKET sockfd;
USHORT port_number = 23;
scc_ptr = &(scc_stat[port]);
@ -202,7 +220,23 @@ scc_socket_open_outgoing(int port, double dcycs)
memset(&sa_in, 0, sizeof(sa_in));
sa_in.sin_family = AF_INET;
sa_in.sin_port = htons(23);
/* ARO: inspect the ATDT command to see if there is a decimal port number declared & if so, use it */
/* Format: ATDT<host>,<port> */
/* Example ATDT192.168.1.21,4001 */
char *comma_ptr = strchr(&scc_ptr->modem_cmd_str[0], ',');
if (comma_ptr != NULL) {
long custom_port = strtol(comma_ptr + 1, NULL, 10);
*comma_ptr = '\0'; /* null terminate the hostname string at the position of the comma */
if (custom_port >= 1 && custom_port <= 65535) {
port_number = (USHORT)custom_port;
} else {
printf("Specified port out of range: %ld\n", custom_port);
scc_socket_close_handle(sockfd);
scc_socket_close(port, 1, dcycs);
return;
}
}
sa_in.sin_port = htons(port_number);
hostentptr = gethostbyname((const char*)&scc_ptr->modem_cmd_str[0]); // OG Added Cast
if(hostentptr == 0) {
#if defined(_WIN32) || defined (__OS2__)
@ -212,7 +246,7 @@ scc_socket_open_outgoing(int port, double dcycs)
fatal_printf("Lookup host %s failed, herrno: %d\n",
&scc_ptr->modem_cmd_str[0], h_errno);
#endif
close(sockfd);
scc_socket_close_handle(sockfd);
scc_socket_close(port, 1, dcycs);
x_show_alert(0, 0);
return;
@ -225,7 +259,7 @@ scc_socket_open_outgoing(int port, double dcycs)
ret = connect(sockfd, (struct sockaddr *)&sa_in, sizeof(sa_in));
if(ret < 0) {
printf("connect ret: %d, errno: %d\n", ret, errno);
close(sockfd);
scc_socket_close_handle(sockfd);
scc_socket_close(port, 1, dcycs);
return;
}
@ -234,8 +268,8 @@ scc_socket_open_outgoing(int port, double dcycs)
scc_ptr->socket_state = 1; /* talk to socket */
scc_ptr->socket_num_rings = 0;
printf("SCC port %d is now outgoing to %s\n", port,
&scc_ptr->modem_cmd_str[0]);
printf("SCC port %d is now outgoing to %s on TCP port %d\n", port,
&scc_ptr->modem_cmd_str[0], port_number);
scc_ptr->sockfd = sockfd;
scc_ptr->state = 1; /* successful socket */
@ -301,14 +335,14 @@ scc_socket_close(int port, int full_close, double dcycs)
printf("In scc_socket_close, %d, %d, %f\n", port, full_close, dcycs);
rdwrfd = scc_ptr->rdwrfd;
if(rdwrfd >= 0) {
if(rdwrfd != -1) {
printf("socket_close: rdwrfd=%d, closing\n", rdwrfd);
close(rdwrfd);
scc_socket_close_handle(rdwrfd);
}
sockfd = scc_ptr->sockfd;
if(sockfd != -1) {
printf("socket_close: sockfd=%d, closing\n", sockfd);
close(sockfd);
scc_socket_close_handle(sockfd);
}
scc_ptr->modem_cmd_len = 0;

View File

@ -152,6 +152,8 @@ int g_imagewriter_multipage = 0;
int g_imagewriter_timeout = 2;
char* g_imagewriter_fixed_font = "lib/letgothl.ttf";
char* g_imagewriter_prop_font = "lib/letgothl.ttf";
int g_imagewriter_paper = 0;
int g_imagewriter_banner = 0;
int g_config_iwm_vbl_count = 0;
extern const char g_gsport_version_str[] = "0.31";

View File

@ -1170,7 +1170,6 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps)
Doc_reg *rptr, *orptr;
int mode, omode;
int other_osc;
int one_shot_stop;
int ctl;
/* handle osc stopping and maybe interrupting */
@ -1187,7 +1186,6 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps)
remove_event_doc(osc);
}
rptr->event = 0;
rptr->cur_acc = 0; /* reset internal accumulator*/
/* check to make sure osc is running */
if(ctl & 0x01) {
@ -1226,13 +1224,12 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps)
start_sound(osc, eff_dsamps, dsamps);
return;
} else if((mode == 3) || (omode == 3)) {
}
rptr->cur_acc = 0; /* reset internal accumulator*/
if((mode == 3) || (omode == 3)) {
/* swap mode (even if we're one_shot and partner is swap)! */
/* unless we're one-shot and we hit a 0-byte--then */
/* Olivier Goguel says just stop */
rptr->ctl |= 1;
one_shot_stop = (mode == 1) && (!can_repeat);
if(!one_shot_stop && !orptr->running &&
if(!orptr->running &&
(orptr->ctl & 0x1)) {
orptr->ctl = orptr->ctl & (~1);
start_sound(other_osc, eff_dsamps, dsamps);

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -20,14 +20,14 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -1,14 +1,15 @@
TARGET = gsportx
OBJECTS = $(OBJECTS1) $(TFEOBJ) $(ATOBJ) $(PCAPOBJ) xdriver.o
CC = gcc
CCOPTS = -O2 -Wall -fomit-frame-pointer -std=gnu99 -march=i686 -DHAVE_TFE -DHAVE_ATBRIDGE -DTOGGLE_STATUS
OPTS = -DGSPORT_LITTLE_ENDIAN
CCOPTS = -O2 -Wall -fomit-frame-pointer -std=gnu99 -m32 -march=i686
CPPOPTS = -O2 -Wall -fomit-frame-pointer -std=gnu99 -m32 -march=i686
OPTS = -DGSPORT_LITTLE_ENDIAN -DDOS_TFE=1 -DHAVE_TFE -DHAVE_ATBRIDGE -DTOGGLE_STATUS
SUFFIX =
NAME = gsportx
LDFLAGS =
LDFLAGS = -m32 -L/usr/lib32
LDOPTS =
LD = g++
EXTRA_LIBS = -lXext
EXTRA_LIBS = -lXext -ldl -lpcap
EXTRA_SPECIALS =
AS = cc

18
src/vars_x86linux_sdl Normal file
View File

@ -0,0 +1,18 @@
TARGET = gsportx
OBJECTS = $(OBJECTS1) $(TFEOBJ) $(ATOBJ) $(PCAPOBJ) xdriver.o
CC = gcc
CCOPTS = -O2 -Wall -fomit-frame-pointer -std=gnu99 -march=i686 -DHAVE_SDL -DHAVE_TFE -DHAVE_ATBRIDGE -DTOGGLE_STATUS -I/usr/include/SDL -I/usr/include/freetype2
CPPOPTS = -O2 -DHAVE_TFE -DHAVE_SDL -DTOGGLE_STATUS -DHAVE_ATBRIDGE -I/usr/include/freetype2 -I/usr/include/SDL
OPTS = -DGSPORT_LITTLE_ENDIAN
SUFFIX =
NAME = gsportx
LDFLAGS =
LDOPTS =
LD = g++
EXTRA_LIBS = -lXext -lfreetype -lSDL
EXTRA_SPECIALS =
AS = cc
PERL = perl
XOPTS = -I/usr/X11R6/include

View File

@ -150,66 +150,82 @@ int g_blue_right_shift = 0;
char g_status_buf[MAX_STATUS_LINES][STATUS_LINE_LENGTH + 1];
char *g_status_ptrs[MAX_STATUS_LINES] = { 0 };
// These LORES/DHIRES RGB values were extracted from ROM 3 IIgs video signals by Koichi Nishida
#define BLACK_RGB 0x000
#define DEEP_RED_RGB 0xd03
#define BROWN_RGB 0x850
#define ORANGE_RGB 0xf60
#define DARK_GREEN_RGB 0x072
#define DARK_GRAY_RGB 0x555
#define GREEN_RGB 0x1d0
#define YELLOW_RGB 0xff0
#define DARK_BLUE_RGB 0x009
#define PURPLE_RGB 0xd2d
#define LIGHT_GRAY_RGB 0xaaa
#define PINK_RGB 0xf98
#define MEDIUM_BLUE_RGB 0x22f
#define LIGHT_BLUE_RGB 0x6af
#define AQUAMARINE_RGB 0x4f9
#define WHITE_RGB 0xfff
const int g_dbhires_colors[] = {
/* rgb */
0x000, /* 0x0 black */
0xd03, /* 0x1 deep red */
0x852, /* 0x2 brown */
0xf60, /* 0x3 orange */
0x070, /* 0x4 dark green */
0x555, /* 0x5 dark gray */
0x0d0, /* 0x6 green */
0xff0, /* 0x7 yellow */
0x009, /* 0x8 dark blue */
0xd0d, /* 0x9 purple */
0xaaa, /* 0xa light gray */
0xf98, /* 0xb pink */
0x22f, /* 0xc medium blue */
0x6af, /* 0xd light blue */
0x0f9, /* 0xe aquamarine */
0xfff /* 0xf white */
BLACK_RGB, // 0x0 black
DEEP_RED_RGB, // 0x1 deep red
BROWN_RGB, // 0x2 brown
ORANGE_RGB, // 0x3 orange
DARK_GREEN_RGB, // 0x4 dark green
DARK_GRAY_RGB, // 0x5 dark gray
GREEN_RGB, // 0x6 green
YELLOW_RGB, // 0x7 yellow
DARK_BLUE_RGB, // 0x8 dark blue
PURPLE_RGB, // 0x9 purple
LIGHT_GRAY_RGB, // 0xa light gray
PINK_RGB, // 0xb pink
MEDIUM_BLUE_RGB, // 0xc medium blue
LIGHT_BLUE_RGB, // 0xd light blue
AQUAMARINE_RGB, // 0xe aquamarine
WHITE_RGB // 0xf white
};
word32 g_dhires_convert[4096]; /* look up table of 7 bits (concat): */
/* { 4 bits, |3 prev bits| } */
const byte g_dhires_colors_16[] = {
0x00, /* 0x0 black */
0x02, /* 0x1 dark blue */
0x04, /* 0x2 dark green */
0x06, /* 0x3 medium blue */
0x08, /* 0x4 brown */
0x0a, /* 0x5 light gray */
0x0c, /* 0x6 green */
0x0e, /* 0x7 aquamarine */
0x01, /* 0x8 deep red */
0x03, /* 0x9 purple */
0x05, /* 0xa dark gray */
0x07, /* 0xb light blue */
0x09, /* 0xc orange */
0x0b, /* 0xd pink */
0x0d, /* 0xe yellow */
0x0f/* 0xf white */
0x00, // 0x0 black
0x02, // 0x1 dark blue
0x04, // 0x2 dark green
0x06, // 0x3 medium blue
0x08, // 0x4 brown
0x0a, // 0x5 light gray
0x0c, // 0x6 green
0x0e, // 0x7 aquamarine
0x01, // 0x8 deep red
0x03, // 0x9 purple
0x05, // 0xa dark gray
0x07, // 0xb light blue
0x09, // 0xc orange
0x0b, // 0xd pink
0x0d, // 0xe yellow
0x0f // 0xf white
};
int g_lores_colors[] = {
/* rgb */
0x000, /* 0x0 black */
0xd03, /* 0x1 deep red */
0x009, /* 0x2 dark blue */
0xd0d, /* 0x3 purple */
0x070, /* 0x4 dark green */
0x555, /* 0x5 dark gray */
0x22f, /* 0x6 medium blue */
0x6af, /* 0x7 light blue */
0x852, /* 0x8 brown */
0xf60, /* 0x9 orange */
0xaaa, /* 0xa light gray */
0xf98, /* 0xb pink */
0x0d0, /* 0xc green */
0xff0, /* 0xd yellow */
0x0f9, /* 0xe aquamarine */
0xfff /* 0xf white */
int g_lores_colors[] = {
BLACK_RGB, // 0x0 black
DEEP_RED_RGB, // 0x1 deep red
DARK_BLUE_RGB, // 0x2 dark blue
PURPLE_RGB, // 0x3 purple
DARK_GREEN_RGB, // 0x4 dark green
DARK_GRAY_RGB, // 0x5 dark gray
MEDIUM_BLUE_RGB, // 0x6 medium blue
LIGHT_BLUE_RGB, // 0x7 light blue
BROWN_RGB, // 0x8 brown
ORANGE_RGB, // 0x9 orange
LIGHT_GRAY_RGB, // 0xa light gray
PINK_RGB, // 0xb pink
GREEN_RGB, // 0xc green
YELLOW_RGB, // 0xd yellow
AQUAMARINE_RGB, // 0xe aquamarine
WHITE_RGB // 0xf white
};
const word32 g_bw_hires_convert[4] = {

View File

@ -147,7 +147,7 @@ main(int argc, char **argv)
wndclass.hInstance = GetModuleHandle(NULL);
wndclass.hIcon = LoadIcon(wndclass.hInstance, MAKEINTRESOURCE(IDC_GSPORT32));
wndclass.hCursor = LoadCursor((HINSTANCE) NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = "gsport";
@ -217,8 +217,8 @@ x_redraw_status_lines()
if (g_win_status_debug)
{
HDC localdc = GetDC(g_hwnd_main);
oldtextcolor = SetTextColor(localdc, 0);
oldbkcolor = SetBkColor(localdc, 0xffffff);
oldtextcolor = SetTextColor(localdc, RGB(255, 255, 255));
oldbkcolor = SetBkColor(localdc, RGB(0, 0, 0));
for(line = 0; line < MAX_STATUS_LINES; line++) {
buf = g_status_ptrs[line];
if(buf != 0) {

View File

@ -64,7 +64,17 @@ int g_win_status_debug_request = 1; // Desired visibility of status lines.
int g_win_show_console = 0; // Current visibility of console.
int g_win_show_console_request = 1; // Desired visibility of console.
RECT g_main_window_saved_rect;
int g_win_fullscreen_state = 0;
int g_main_window_saved_style;
int g_main_window_saved_exstyle;
int g_win_fullscreen_state = 0;
#if 0 // enable non-integral full-screen scaling
#define FULLSCREEN_SCALE_TYPE float
#else
#define FULLSCREEN_SCALE_TYPE int
#endif
FULLSCREEN_SCALE_TYPE g_win_fullscreen_scale = 1;
int g_win_fullscreen_offsetx = 0;
int g_win_fullscreen_offsety = 0;
LPSTR g_clipboard;
size_t g_clipboard_pos;
@ -319,6 +329,9 @@ win_event_handler(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
}
DragFinish((HDROP)wParam);
break;
case WM_KILLFOCUS:
adb_all_keys_up(); // ALT-TAB doesn't send key-up messages
break;
}
switch(umsg) {
HANDLE_MSG(hwnd, WM_KEYUP, WIN_EVENT_KEY);
@ -336,8 +349,8 @@ void gsportinit(HWND _hwnd)
g_hwnd_main = _hwnd;
HDC localdc = GetDC(g_hwnd_main);
SetTextColor(localdc, 0);
SetBkColor(localdc, 0xFFFFFF);
SetTextColor(localdc, RGB(0, 0, 0));
SetBkColor(localdc, RGB(255, 255, 255));
g_main_cdc = CreateCompatibleDC(localdc);
ReleaseDC(g_hwnd_main,localdc);
@ -581,29 +594,22 @@ x_push_kimage(Kimage *kimage_ptr, int destx, int desty, int srcx, int srcy,
int width, int height)
{
void *bitm_old;
POINT point;
point.x = 0;
point.y = 0;
ClientToScreen(g_hwnd_main, &point);
HDC localdc = GetDC(g_hwnd_main);
HDC localcdc = g_main_cdc; //CreateCompatibleDC(g_main_dc);
HDC localcdc = g_main_cdc;
bitm_old = SelectObject(localcdc, kimage_ptr->dev_handle);
float ratiox = 0.0, ratioy = 0.0;
int isStretched = x_calc_ratio(ratiox,ratioy);
if (!isStretched)
BitBlt(localdc, destx, desty, width, height, localcdc, srcx, srcy, SRCCOPY);
if (g_win_fullscreen_scale == 1)
BitBlt(localdc, destx + g_win_fullscreen_offsetx, desty + g_win_fullscreen_offsety, width, height, localcdc, srcx, srcy, SRCCOPY);
else
{
float xdest = (destx)*ratiox;
float ydest = (desty)*ratioy;
float wdest = (width)*ratiox;
float hdest = (height)*ratioy;
FULLSCREEN_SCALE_TYPE xdest = destx * g_win_fullscreen_scale + g_win_fullscreen_offsetx;
FULLSCREEN_SCALE_TYPE ydest = desty * g_win_fullscreen_scale + g_win_fullscreen_offsety;
FULLSCREEN_SCALE_TYPE wdest = width * g_win_fullscreen_scale;
FULLSCREEN_SCALE_TYPE hdest = height * g_win_fullscreen_scale;
BOOL err=StretchBlt(localdc,(int)xdest,(int)ydest,(int)wdest,(int)hdest,localcdc, srcx, srcy,width,height, SRCCOPY);
StretchBlt(localdc, (int)xdest, (int)ydest, (int)wdest, (int)hdest, localcdc, srcx, srcy, width, height, SRCCOPY);
}
SelectObject(localcdc, bitm_old);
@ -638,56 +644,51 @@ x_hide_pointer(int do_hide)
void
x_full_screen(int do_full)
{
DEVMODE dmScreenSettings;
int style;
MONITORINFO monitor_info;
FULLSCREEN_SCALE_TYPE width, height, scalex, scaley;
int top, left;
g_win_status_debug = 1 - do_full;
if (do_full && !g_win_fullscreen_state) {
GetWindowRect(g_hwnd_main,&g_main_window_saved_rect);
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = 800;
dmScreenSettings.dmPelsHeight = 600;
dmScreenSettings.dmBitsPerPel = 24;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|
DM_PELSHEIGHT;
if (ChangeDisplaySettings(&dmScreenSettings, 2)
!=DISP_CHANGE_SUCCESSFUL) {
// If 24-bit palette does not work, try 32-bit
dmScreenSettings.dmBitsPerPel = 32;
if (ChangeDisplaySettings(&dmScreenSettings, 2)) {
printf (
"-- Unable to switch to fullscreen mode\n");
printf (
"-- No 24-bit or 32-bit mode for fullscreen\n");
dmScreenSettings.dmBitsPerPel=-1;
}
}
g_main_window_saved_style = GetWindowLong(g_hwnd_main, GWL_STYLE);
g_main_window_saved_exstyle = GetWindowLong(g_hwnd_main, GWL_EXSTYLE);
GetWindowRect(g_hwnd_main, &g_main_window_saved_rect);
SetWindowLong(g_hwnd_main, GWL_STYLE, g_main_window_saved_style & ~(WS_CAPTION | WS_THICKFRAME));
SetWindowLong(g_hwnd_main, GWL_EXSTYLE, g_main_window_saved_exstyle & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
monitor_info.cbSize = sizeof(monitor_info);
GetMonitorInfo(MonitorFromWindow(g_hwnd_main, MONITOR_DEFAULTTONEAREST), &monitor_info);
left = monitor_info.rcMonitor.left;
top = monitor_info.rcMonitor.top;
width = (FULLSCREEN_SCALE_TYPE)(monitor_info.rcMonitor.right - monitor_info.rcMonitor.left);
height = (FULLSCREEN_SCALE_TYPE)(monitor_info.rcMonitor.bottom - monitor_info.rcMonitor.top);
scalex = width / X_A2_WINDOW_WIDTH;
scaley = height / X_A2_WINDOW_HEIGHT;
g_win_fullscreen_scale = (scalex <= scaley) ? scalex : scaley;
g_win_fullscreen_offsetx = ((int)width - (int)(g_win_fullscreen_scale * X_A2_WINDOW_WIDTH)) / 2;
g_win_fullscreen_offsety = ((int)height - (int)(g_win_fullscreen_scale * X_A2_WINDOW_HEIGHT)) / 2;
SetWindowPos(g_hwnd_main, NULL, left, top, (int)width, (int)height, SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
g_win_fullscreen_state = 1;
RedrawWindow(g_hwnd_main, NULL, NULL, RDW_INVALIDATE);
if (dmScreenSettings.dmBitsPerPel >0) {
g_win_fullscreen_state=!g_win_fullscreen_state;
GetWindowRect(g_hwnd_main,&g_main_window_saved_rect);
ChangeDisplaySettings(&dmScreenSettings, 4);
style=GetWindowLong(g_hwnd_main,GWL_STYLE);
style &= ~WS_CAPTION;
SetWindowLong(g_hwnd_main,GWL_STYLE,style);
SetMenu(g_hwnd_main,NULL);
SetWindowPos(g_hwnd_main,HWND_TOPMOST,0,0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
SWP_SHOWWINDOW);
}
} else {
if (g_win_fullscreen_state) {
ChangeDisplaySettings(NULL,0);
style=GetWindowLong(g_hwnd_main,GWL_STYLE);
style |= WS_CAPTION;
SetWindowLong(g_hwnd_main,GWL_STYLE,style);
SetWindowPos(g_hwnd_main, HWND_TOPMOST,
g_main_window_saved_rect.top, g_main_window_saved_rect.left,
g_main_window_saved_rect.right - g_main_window_saved_rect.left, g_main_window_saved_rect.bottom - g_main_window_saved_rect.top,
SWP_SHOWWINDOW);
g_win_fullscreen_state=!g_win_fullscreen_state;
g_win_fullscreen_offsetx = 0;
g_win_fullscreen_offsety = 0;
g_win_fullscreen_scale = 1;
SetWindowLong(g_hwnd_main, GWL_STYLE, g_main_window_saved_style);
SetWindowLong(g_hwnd_main, GWL_EXSTYLE, g_main_window_saved_exstyle);
SetWindowPos(g_hwnd_main, NULL,
g_main_window_saved_rect.left,
g_main_window_saved_rect.top,
g_main_window_saved_rect.right - g_main_window_saved_rect.left,
g_main_window_saved_rect.bottom - g_main_window_saved_rect.top,
SWP_SHOWWINDOW);
g_win_fullscreen_state = 0;
RedrawWindow(g_hwnd_main, NULL, NULL, RDW_INVALIDATE);
}
}
return;