You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(93) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(28) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(35) |
Mar
(19) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
(11) |
Mar
(1) |
Apr
(7) |
May
(10) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(9) |
Dec
(5) |
2014 |
Jan
(8) |
Feb
(7) |
Mar
(19) |
Apr
(23) |
May
(4) |
Jun
(19) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
(11) |
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: <dav...@us...> - 2017-10-05 13:29:10
|
Revision: 378 http://sourceforge.net/p/gsport/code/378 Author: david__schmidt Date: 2017-10-05 13:29:07 +0000 (Thu, 05 Oct 2017) Log Message: ----------- Update to latest text of GPL 2.0 Modified Paths: -------------- trunk/COPYING.txt Modified: trunk/COPYING.txt =================================================================== --- trunk/COPYING.txt 2017-10-05 10:00:05 UTC (rev 377) +++ trunk/COPYING.txt 2017-10-05 13:29:07 UTC (rev 378) @@ -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 @@ 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 @@ 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 @@ 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 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 @@ 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 @@ 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 @@ 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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2017-10-05 10:00:06
|
Revision: 377 http://sourceforge.net/p/gsport/code/377 Author: sicklittlemonky Date: 2017-10-05 10:00:05 +0000 (Thu, 05 Oct 2017) Log Message: ----------- Fixed Windows joystick support. Has nobody ever used this? <:-| Modified Paths: -------------- trunk/src/joystick_driver.c Modified: trunk/src/joystick_driver.c =================================================================== --- trunk/src/joystick_driver.c 2017-04-16 10:18:11 UTC (rev 376) +++ trunk/src/joystick_driver.c 2017-10-05 10:00:05 UTC (rev 377) @@ -205,9 +205,10 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2017-04-16 10:18:12
|
Revision: 376 http://sourceforge.net/p/gsport/code/376 Author: sicklittlemonky Date: 2017-04-16 10:18:11 +0000 (Sun, 16 Apr 2017) Log Message: ----------- Fix F4 can exit app after Alt-Tab Modified Paths: -------------- trunk/src/win_generic.c Modified: trunk/src/win_generic.c =================================================================== --- trunk/src/win_generic.c 2016-01-26 19:34:28 UTC (rev 375) +++ trunk/src/win_generic.c 2017-04-16 10:18:11 UTC (rev 376) @@ -329,6 +329,9 @@ } 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dav...@us...> - 2016-01-26 19:34:30
|
Revision: 375 http://sourceforge.net/p/gsport/code/375 Author: david__schmidt Date: 2016-01-26 19:34:28 +0000 (Tue, 26 Jan 2016) Log Message: ----------- Close up a brace for MS URL Modified Paths: -------------- trunk/doc/web/src/site/apt/developing.apt Modified: trunk/doc/web/src/site/apt/developing.apt =================================================================== --- trunk/doc/web/src/site/apt/developing.apt 2016-01-26 19:10:18 UTC (rev 374) +++ trunk/doc/web/src/site/apt/developing.apt 2016-01-26 19:34:28 UTC (rev 375) @@ -27,7 +27,7 @@ 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}. +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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2016-01-26 19:10:20
|
Revision: 374 http://sourceforge.net/p/gsport/code/374 Author: bluerwhite Date: 2016-01-26 19:10:18 +0000 (Tue, 26 Jan 2016) Log Message: ----------- Remove an unused variable to cleanup a compiler warning. Modified Paths: -------------- trunk/src/sound.c Modified: trunk/src/sound.c =================================================================== --- trunk/src/sound.c 2016-01-26 19:06:27 UTC (rev 373) +++ trunk/src/sound.c 2016-01-26 19:10:18 UTC (rev 374) @@ -1170,7 +1170,6 @@ Doc_reg *rptr, *orptr; int mode, omode; int other_osc; - int one_shot_stop; int ctl; /* handle osc stopping and maybe interrupting */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2016-01-26 19:06:30
|
Revision: 373 http://sourceforge.net/p/gsport/code/373 Author: bluerwhite Date: 2016-01-26 19:06:27 +0000 (Tue, 26 Jan 2016) Log Message: ----------- Document the steps for building with Visual Studio. Cygwin works too on MS Windows if you prefer. Modified Paths: -------------- trunk/doc/web/src/site/apt/developing.apt Modified: trunk/doc/web/src/site/apt/developing.apt =================================================================== --- trunk/doc/web/src/site/apt/developing.apt 2016-01-26 18:52:33 UTC (rev 372) +++ trunk/doc/web/src/site/apt/developing.apt 2016-01-26 19:06:27 UTC (rev 373) @@ -26,6 +26,12 @@ 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: ------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2016-01-26 18:52:36
|
Revision: 372 http://sourceforge.net/p/gsport/code/372 Author: bluerwhite Date: 2016-01-26 18:52:33 +0000 (Tue, 26 Jan 2016) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/atbridge/atbridge.vcxproj trunk/src/gsport.vcxproj trunk/src/tfe/tfe.vcxproj Property Changed: ---------------- trunk/src/ Index: trunk/src =================================================================== --- trunk/src 2015-10-01 10:04:36 UTC (rev 371) +++ trunk/src 2016-01-26 18:52:33 UTC (rev 372) Property changes on: trunk/src ___________________________________________________________________ Modified: svn:ignore ## -19,3 +19,4 ## gsport.opensdf gsport.sdf *.suo +.vs Modified: trunk/src/atbridge/atbridge.vcxproj =================================================================== --- trunk/src/atbridge/atbridge.vcxproj 2015-10-01 10:04:36 UTC (rev 371) +++ trunk/src/atbridge/atbridge.vcxproj 2016-01-26 18:52:33 UTC (rev 372) @@ -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> @@ -38,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> Modified: trunk/src/gsport.vcxproj =================================================================== --- trunk/src/gsport.vcxproj 2015-10-01 10:04:36 UTC (rev 371) +++ trunk/src/gsport.vcxproj 2016-01-26 18:52:33 UTC (rev 372) @@ -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"> Modified: trunk/src/tfe/tfe.vcxproj =================================================================== --- trunk/src/tfe/tfe.vcxproj 2015-10-01 10:04:36 UTC (rev 371) +++ trunk/src/tfe/tfe.vcxproj 2016-01-26 18:52:33 UTC (rev 372) @@ -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"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2015-10-01 10:04:38
|
Revision: 371 http://sourceforge.net/p/gsport/code/371 Author: sicklittlemonky Date: 2015-10-01 10:04:36 +0000 (Thu, 01 Oct 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/video.c Modified: trunk/src/video.c =================================================================== --- trunk/src/video.c 2015-07-12 00:00:59 UTC (rev 370) +++ trunk/src/video.c 2015-10-01 10:04:36 UTC (rev 371) @@ -150,66 +150,82 @@ 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] = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-07-12 00:01:01
|
Revision: 370 http://sourceforge.net/p/gsport/code/370 Author: cgmason14 Date: 2015-07-12 00:00:59 +0000 (Sun, 12 Jul 2015) Log Message: ----------- Missed one string. Modified Paths: -------------- trunk/src/config.c Modified: trunk/src/config.c =================================================================== --- trunk/src/config.c 2015-07-08 21:35:07 UTC (rev 369) +++ trunk/src/config.c 2015-07-12 00:00:59 UTC (rev 370) @@ -233,9 +233,9 @@ Cfg_menu g_cfg_serial_menu[] = { { "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU }, #ifdef HAVE_SDL -{ "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail,2,Virtual Imagewriter", +{ "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", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-07-08 21:35:10
|
Revision: 369 http://sourceforge.net/p/gsport/code/369 Author: cgmason14 Date: 2015-07-08 21:35:07 +0000 (Wed, 08 Jul 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/config.c trunk/src/imagewriter.cpp Modified: trunk/src/config.c =================================================================== --- trunk/src/config.c 2015-06-06 02:49:33 UTC (rev 368) +++ trunk/src/config.c 2015-07-08 21:35:07 UTC (rev 369) @@ -232,10 +232,17 @@ Cfg_menu g_cfg_serial_menu[] = { { "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU }, +#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", 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 " @@ -278,16 +285,16 @@ { "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 }, @@ -307,8 +314,8 @@ }; 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 }, @@ -318,12 +325,12 @@ 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 }, @@ -334,6 +341,7 @@ { "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 }, @@ -367,8 +375,10 @@ { "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 }, @@ -378,7 +388,9 @@ "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}, -{ "Reset Virtual Imagewriter", (void *)cfg_iwreset, 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 }, @@ -3298,12 +3310,14 @@ 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)) { video_update(); Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-06-06 02:49:33 UTC (rev 368) +++ trunk/src/imagewriter.cpp 2015-07-08 21:35:07 UTC (rev 369) @@ -227,7 +227,7 @@ { //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); + 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); @@ -1707,7 +1707,7 @@ { 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-06-06 02:49:35
|
Revision: 368 http://sourceforge.net/p/gsport/code/368 Author: cgmason14 Date: 2015-06-06 02:49:33 +0000 (Sat, 06 Jun 2015) Log Message: ----------- Fix Ensoniq DOC swap mode behavior so Ninjaforce's NinjaTracker plays looped instruments correctly. Modified Paths: -------------- trunk/src/sound.c Modified: trunk/src/sound.c =================================================================== --- trunk/src/sound.c 2015-05-05 18:02:27 UTC (rev 367) +++ trunk/src/sound.c 2015-06-06 02:49:33 UTC (rev 368) @@ -1229,11 +1229,8 @@ 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2015-05-05 18:02:29
|
Revision: 367 http://sourceforge.net/p/gsport/code/367 Author: bluerwhite Date: 2015-05-05 18:02:27 +0000 (Tue, 05 May 2015) Log Message: ----------- Configure the "enable AppleTalk diagnostic messages" flag earlier so that initialization messages get printed. Modified Paths: -------------- trunk/src/scc_llap.c Modified: trunk/src/scc_llap.c =================================================================== --- trunk/src/scc_llap.c 2015-05-02 04:51:52 UTC (rev 366) +++ trunk/src/scc_llap.c 2015-05-05 18:02:27 UTC (rev 367) @@ -40,6 +40,7 @@ void scc_llap_init() { + atbridge_set_diagnostics(g_appletalk_diagnostics); bridge_initialized = atbridge_init(); atbridge_set_net(g_appletalk_network_hint); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-05-02 04:51:54
|
Revision: 366 http://sourceforge.net/p/gsport/code/366 Author: cgmason14 Date: 2015-05-02 04:51:52 +0000 (Sat, 02 May 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/imagewriter.cpp Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-05-02 04:15:12 UTC (rev 365) +++ trunk/src/imagewriter.cpp 2015-05-02 04:51:52 UTC (rev 366) @@ -207,13 +207,13 @@ 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; @@ -1646,13 +1646,13 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-05-02 04:15:15
|
Revision: 365 http://sourceforge.net/p/gsport/code/365 Author: cgmason14 Date: 2015-05-02 04:15:12 +0000 (Sat, 02 May 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/imagewriter.cpp Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-04-29 19:59:07 UTC (rev 364) +++ trunk/src/imagewriter.cpp 2015-05-02 04:15:12 UTC (rev 365) @@ -196,8 +196,8 @@ 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 @@ -222,9 +222,13 @@ 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 @@ -1635,7 +1639,53 @@ if (strcasecmp(output, "printer") == 0) { #if defined (WIN32) - + 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.hwndOwner = NULL; + pd.hDC = (HDC) NULL; + pd.nFromPage = 1; + pd.nToPage = 1; + pd.nMinPage = 0; + pd.nMaxPage = 0; + 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-04-29 19:59:09
|
Revision: 364 http://sourceforge.net/p/gsport/code/364 Author: cgmason14 Date: 2015-04-29 19:59:07 +0000 (Wed, 29 Apr 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/config.c Modified: trunk/src/config.c =================================================================== --- trunk/src/config.c 2015-04-14 01:25:47 UTC (rev 363) +++ trunk/src/config.c 2015-04-29 19:59:07 UTC (rev 364) @@ -151,6 +151,7 @@ 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 @@ -329,8 +330,6 @@ { "", 0, 0, 0, 0 }, { "Proportional Font", KNMP(g_imagewriter_prop_font), CFGTYPE_FILE }, { "", 0, 0, 0, 0 }, -{ "", 0, 0, 0, 0 }, -{ "Apply Changes", (void *)cfg_iwreset, 0, 0, CFGTYPE_FUNC }, { "", 0, 0, 0, 0 }, { "Back to Main Config", g_cfg_main_menu, 0, 0, CFGTYPE_MENU }, { 0, 0, 0, 0, 0 }, @@ -379,6 +378,7 @@ "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}, +{ "Reset Virtual Imagewriter", (void *)cfg_iwreset, 0, 0, CFGTYPE_FUNC }, { "", 0, 0, 0, 0 }, { "Save changes to configuration file", (void *)config_write_config_gsport_file, 0, 0, CFGTYPE_FUNC }, @@ -3298,6 +3298,12 @@ cfg_get_tfe_name(); } #endif + /*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; + } key = -1; while(g_config_control_panel & !(halt_sim&HALT_WANTTOQUIT)) { video_update(); @@ -3383,6 +3389,11 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2015-04-14 01:25:55
|
Revision: 363 http://sourceforge.net/p/gsport/code/363 Author: bluerwhite Date: 2015-04-14 01:25:47 +0000 (Tue, 14 Apr 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/scc_llap.c Modified: trunk/src/scc_llap.c =================================================================== --- trunk/src/scc_llap.c 2015-03-15 20:45:16 UTC (rev 362) +++ trunk/src/scc_llap.c 2015-04-14 01:25:47 UTC (rev 363) @@ -55,6 +55,8 @@ { 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 +86,9 @@ } 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 +136,9 @@ // 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <blu...@us...> - 2015-03-15 20:45:19
|
Revision: 362 http://sourceforge.net/p/gsport/code/362 Author: bluerwhite Date: 2015-03-15 20:45:16 +0000 (Sun, 15 Mar 2015) Log Message: ----------- 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. Revision Links: -------------- http://sourceforge.net/p/gsport/code/355 Modified Paths: -------------- trunk/src/win_console.c trunk/src/win_generic.c Modified: trunk/src/win_console.c =================================================================== --- trunk/src/win_console.c 2015-03-14 17:57:47 UTC (rev 361) +++ trunk/src/win_console.c 2015-03-15 20:45:16 UTC (rev 362) @@ -217,8 +217,8 @@ 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) { Modified: trunk/src/win_generic.c =================================================================== --- trunk/src/win_generic.c 2015-03-14 17:57:47 UTC (rev 361) +++ trunk/src/win_generic.c 2015-03-15 20:45:16 UTC (rev 362) @@ -346,8 +346,8 @@ 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-03-14 17:57:50
|
Revision: 361 http://sourceforge.net/p/gsport/code/361 Author: cgmason14 Date: 2015-03-14 17:57:47 +0000 (Sat, 14 Mar 2015) Log Message: ----------- Added typedef USHORT so non-Windows platforms can properly compile scc_socket_driver.c. Modified Paths: -------------- trunk/src/scc_socket_driver.c Modified: trunk/src/scc_socket_driver.c =================================================================== --- trunk/src/scc_socket_driver.c 2015-02-12 20:05:42 UTC (rev 360) +++ trunk/src/scc_socket_driver.c 2015-03-14 17:57:47 UTC (rev 361) @@ -40,6 +40,7 @@ #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 */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2015-02-12 20:05:44
|
Revision: 360 http://sourceforge.net/p/gsport/code/360 Author: sicklittlemonky Date: 2015-02-12 20:05:42 +0000 (Thu, 12 Feb 2015) Log Message: ----------- Improved error handling for SCC socket dial with port number. Modified Paths: -------------- trunk/src/scc_socket_driver.c Modified: trunk/src/scc_socket_driver.c =================================================================== --- trunk/src/scc_socket_driver.c 2015-02-09 02:23:14 UTC (rev 359) +++ trunk/src/scc_socket_driver.c 2015-02-12 20:05:42 UTC (rev 360) @@ -187,6 +187,7 @@ int on; int ret; SOCKET sockfd; + USHORT port_number = 23; scc_ptr = &(scc_stat[port]); @@ -218,20 +219,23 @@ 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) - { - USHORT port = (USHORT)strtol(comma_ptr + 1, NULL, 10); + 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 (port >= 1 && port < 65536) /* Only use the valid number if it is within bounds */ - { - sa_in.sin_port = htons(port); + 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__) @@ -263,8 +267,8 @@ 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 */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-02-09 02:23:17
|
Revision: 359 http://sourceforge.net/p/gsport/code/359 Author: cgmason14 Date: 2015-02-09 02:23:14 +0000 (Mon, 09 Feb 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/imagewriter.cpp Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-02-08 08:47:42 UTC (rev 358) +++ trunk/src/imagewriter.cpp 2015-02-09 02:23:14 UTC (rev 359) @@ -202,6 +202,7 @@ #if defined (WIN32) // Show Print dialog to obtain a printer device context + ShowCursor(1); PRINTDLG pd; pd.lStructSize = sizeof(PRINTDLG); pd.hDevMode = (HANDLE) NULL; @@ -225,6 +226,7 @@ PrintDlg(&pd); // TODO: what if user presses cancel? printerDC = pd.hDC; + ShowCursor(0); #endif // WIN32 } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2015-02-08 08:47:45
|
Revision: 358 http://sourceforge.net/p/gsport/code/358 Author: sicklittlemonky Date: 2015-02-08 08:47:42 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Fix VS warning that should be an error! Modified Paths: -------------- trunk/src/scc_socket_driver.c Modified: trunk/src/scc_socket_driver.c =================================================================== --- trunk/src/scc_socket_driver.c 2015-02-08 06:00:40 UTC (rev 357) +++ trunk/src/scc_socket_driver.c 2015-02-08 08:47:42 UTC (rev 358) @@ -89,6 +89,7 @@ return close(sockfd); #endif } + return 0; } void @@ -329,7 +330,7 @@ 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); scc_socket_close_handle(rdwrfd); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2015-02-08 06:00:49
|
Revision: 357 http://sourceforge.net/p/gsport/code/357 Author: sicklittlemonky Date: 2015-02-08 06:00:40 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Added SCC socket dial with port number code from Andrew Roughan. Fixed socket closing for Windows. Modified Paths: -------------- trunk/src/scc_socket_driver.c Modified: trunk/src/scc_socket_driver.c =================================================================== --- trunk/src/scc_socket_driver.c 2015-02-08 04:55:32 UTC (rev 356) +++ trunk/src/scc_socket_driver.c 2015-02-08 06:00:40 UTC (rev 357) @@ -23,6 +23,8 @@ #include "defc.h" #include "scc.h" +#include <string.h> +#include <stdlib.h> #ifndef UNDER_CE //OG #include <signal.h> #endif @@ -76,6 +78,19 @@ /* 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 + } +} + void scc_socket_maybe_open_incoming(int port, double dcycs) { @@ -143,7 +158,7 @@ /* 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"); @@ -203,6 +218,19 @@ 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) + { + USHORT port = (USHORT)strtol(comma_ptr + 1, NULL, 10); + *comma_ptr = '\0'; /* null terminate the hostname string at the position of the comma */ + if (port >= 1 && port < 65536) /* Only use the valid number if it is within bounds */ + { + sa_in.sin_port = htons(port); + } + } hostentptr = gethostbyname((const char*)&scc_ptr->modem_cmd_str[0]); // OG Added Cast if(hostentptr == 0) { #if defined(_WIN32) || defined (__OS2__) @@ -212,7 +240,7 @@ 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 +253,7 @@ 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; } @@ -303,12 +331,12 @@ rdwrfd = scc_ptr->rdwrfd; if(rdwrfd >= 0) { 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-02-08 04:55:44
|
Revision: 356 http://sourceforge.net/p/gsport/code/356 Author: cgmason14 Date: 2015-02-08 04:55:32 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Add support to Imagewriter for multiple page sizes and banner printing. Modified Paths: -------------- trunk/src/config.c trunk/src/imagewriter.cpp trunk/src/imagewriter.h trunk/src/iw_charmaps.h trunk/src/scc_imagewriter.c trunk/src/sim65816.c Modified: trunk/src/config.c =================================================================== --- trunk/src/config.c 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/config.c 2015-02-08 04:55:32 UTC (rev 356) @@ -105,6 +105,8 @@ 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; @@ -307,8 +309,12 @@ { "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", @@ -613,7 +619,7 @@ { imagewriter_feed(); imagewriter_close(); - imagewriter_init(g_imagewriter_dpi,612,792,g_imagewriter_output,g_imagewriter_multipage, 0); + imagewriter_init(g_imagewriter_dpi,g_imagewriter_paper,g_imagewriter_banner, g_imagewriter_output,g_imagewriter_multipage); return; } #ifdef HAVE_TFE Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/imagewriter.cpp 2015-02-08 04:55:32 UTC (rev 356) @@ -101,7 +101,7 @@ } #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 @@ else { SDL_Init(SDL_INIT_EVERYTHING); - this->dpi = dpi; this->output = output; this->multipageOutput = multipageOutput; this->port = port; - defaultPageWidth = (Real64)width/(Real64)72; - defaultPageHeight = (Real64)height/(Real64)72; - + 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, @@ -1626,8 +1634,8 @@ { #if defined (WIN32) - Bit16u physW = GetDeviceCaps(printerDC, PHYSICALWIDTH); - Bit16u physH = GetDeviceCaps(printerDC, PHYSICALHEIGHT); + 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); @@ -2174,12 +2182,12 @@ //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); Modified: trunk/src/imagewriter.h =================================================================== --- trunk/src/imagewriter.h 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/imagewriter.h 2015-02-08 04:55:32 UTC (rev 356) @@ -123,7 +123,7 @@ 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 @@ -305,8 +305,8 @@ 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 Modified: trunk/src/iw_charmaps.h =================================================================== --- trunk/src/iw_charmaps.h 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/iw_charmaps.h 2015-02-08 04:55:32 UTC (rev 356) @@ -58,3 +58,19 @@ {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 +}; Modified: trunk/src/scc_imagewriter.c =================================================================== --- trunk/src/scc_imagewriter.c 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/scc_imagewriter.c 2015-02-08 04:55:32 UTC (rev 356) @@ -31,6 +31,8 @@ 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 @@ { Scc *scc_ptr; scc_ptr = &(scc_stat[port]); - imagewriter_init(g_imagewriter_dpi,612,792,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 @@ } 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, Modified: trunk/src/sim65816.c =================================================================== --- trunk/src/sim65816.c 2015-02-06 02:12:28 UTC (rev 355) +++ trunk/src/sim65816.c 2015-02-08 04:55:32 UTC (rev 356) @@ -152,6 +152,8 @@ 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"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sic...@us...> - 2015-02-06 02:12:31
|
Revision: 355 http://sourceforge.net/p/gsport/code/355 Author: sicklittlemonky Date: 2015-02-06 02:12:28 +0000 (Fri, 06 Feb 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/win_console.c trunk/src/win_generic.c Modified: trunk/src/win_console.c =================================================================== --- trunk/src/win_console.c 2015-02-04 05:39:25 UTC (rev 354) +++ trunk/src/win_console.c 2015-02-06 02:12:28 UTC (rev 355) @@ -147,7 +147,7 @@ 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"; Modified: trunk/src/win_generic.c =================================================================== --- trunk/src/win_generic.c 2015-02-04 05:39:25 UTC (rev 354) +++ trunk/src/win_generic.c 2015-02-06 02:12:28 UTC (rev 355) @@ -64,7 +64,17 @@ 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; @@ -581,29 +591,22 @@ 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 +641,51 @@ 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)); - 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); - } + 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); + + } 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgm...@us...> - 2015-02-04 05:39:28
|
Revision: 354 http://sourceforge.net/p/gsport/code/354 Author: cgmason14 Date: 2015-02-04 05:39:25 +0000 (Wed, 04 Feb 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/src/imagewriter.cpp Modified: trunk/src/imagewriter.cpp =================================================================== --- trunk/src/imagewriter.cpp 2015-02-03 00:02:45 UTC (rev 353) +++ trunk/src/imagewriter.cpp 2015-02-04 05:39:25 UTC (rev 354) @@ -246,7 +246,7 @@ 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; @@ -1628,21 +1628,16 @@ Bit16u physW = GetDeviceCaps(printerDC, PHYSICALWIDTH); Bit16u physH = GetDeviceCaps(printerDC, PHYSICALHEIGHT); - Bit16u offsetW = GetDeviceCaps(printerDC, PHYSICALOFFSETX); - Bit16u offsetH = GetDeviceCaps(printerDC, PHYSICALOFFSETY); - - 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; - + 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; @@ -1697,7 +1692,7 @@ memcpy (Pixels, page->pixels, BitmapInfo->bmiHeader.biSizeImage); Prev = SelectObject (memHDC, bitmap); - StretchBlt(printerDC, -offsetW, -offsetH, 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); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |