VOGONS


First post, by JesterXIII

User metadata
Rank Newbie
Rank
Newbie

Hey everyone,

Is h-a-l9000's parallel patch uploaded/available anywhere to apply to the dosbox source, like his ne2000 patch?

Thanks!

Reply 3 of 8, by JesterXIII

User metadata
Rank Newbie
Rank
Newbie

Hmm...I'm not so sure this patch is compatible with SVN r3858. But, it is possible (and likely) I'm doing something wrong. I've added a lot of the lines in manually (if not, all) from directlpt4.diff to their respective files, corrected a few of the run-time errors, and compiled the source. The resulting executable, however, crashes on boot (right after it initializes joysticks).

Has anyone else encountered this problem? I'm going to go about recreating it as described and I'll post the errors I encountered for specifics.

Reply 4 of 8, by JesterXIII

User metadata
Rank Newbie
Rank
Newbie

Alright, first, in dosbox.cpp, directlpt4.diff states:

@@ -389,7 +390,7 @@
secprop->Add_string("tandy","auto");
secprop->Add_int("tandyrate",22050);
secprop->AddInitFunction(&DISNEY_Init,true);//done
- secprop->Add_bool("disney",true);
+ secprop->Add_bool("disney",false);

Where dosbox.cpp currently states:

Pbool = secprop->Add_bool("disney",Property::Changeable::WhenIdle,true);

I changed true to false:

Pbool = secprop->Add_bool("disney",Property::Changeable::WhenIdle,false);

In dosbox.vcproj, directlpt4.diff states:

-<FileConfiguration
-Name="Release|Win32"
-ExcludedFromBuild="TRUE">
-<Tool
-Name="VCCLCompilerTool"/>
-</FileConfiguration>

Where dosbox.vcproj currently states:

<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Release/dosbox.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="../include,../src/platform/visualc"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="true"
PrecompiledHeaderFile=".\Release/dosbox.pch"
AssemblerOutput="4"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
Show last 40 lines
			<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib winmm.lib zlib.lib libpng.lib sdl_net.lib sdlmain.lib sdl.lib curses.lib odbc32.lib odbccp32.lib ws2_32.lib"
OutputFile=".\Release/dosbox.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=""
GenerateMapFile="true"
SubSystem="1"
RandomizedBaseAddress="1"
FixedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>

I did not apply this part of the patch.

In dos_ioctl.cpp, directlpt4.diff states:

+	case 0x01:		/* Set Device Information */
+ // Fake success
+ reg_ax=0x0000;
+ LOG(LOG_IOCTL,LOG_NORMAL)
+ ("01:Faked success: Setting device info of handle %d to %02X",handle, reg_dl);
+ return true;

where case 0x01 in dos_ioctl.cpp currently states:

	case 0x01:		/* Set Device Information */
if (reg_dh != 0) {
DOS_SetError(DOSERR_DATA_INVALID);
return false;
} else {
if (Files[handle]->GetInformation() & 0x8000) { //Check for device
reg_al=(Bit8u)(Files[handle]->GetInformation() & 0xff);
} else {
DOS_SetError(DOSERR_FUNCTION_NUMBER_INVALID);
return false;
}
}
return true;

I did not apply this part of the patch.

Moving down the patch a bit, configure.in does not exist. However, configure.ac has the exact line of codes that directlpt4.diff is looking for. So I added it to configure.ac:

AC_DEFINE(C_DIRECTLPT, 1, [ Define to 1 if you want parallel passthrough support (Win32 only).])

The rest of the patch seemed to apply pretty smoothly, and I'll post this for now. Will update what I did for compiling in a sec.

Reply 5 of 8, by JesterXIII

User metadata
Rank Newbie
Rank
Newbie

Ok, so, the ./autogen.sh runs like a charm, and I run my configure as follows (per truth, thanks again man! http://www.si-gamer.net/truth/)

CFLAGS="-O2" CXXFLAGS="-O2 -mno-ms-bitfields" CPPFLAGS="-I/usr/include" ./configure --enable-core-inline

Seems to execute without an issue (I'll attach the log).

Now we get to the make. I hit a few errors in the parport.cpp, namely:

parport.cpp:75:38: warning: deprecated conversion from string constant to 'char*
' [-Wwrite-strings]
char* lptname[]={"LPT1","LPT2","LPT3"};
^

I changed the line in parport.cpp to:

const char* lptname[]={"LPT1","LPT2","LPT3"};

Next, also in parport.cpp:

parport.cpp:295:4: error: 'CommandLine' was not declared in this scope
CommandLine* cmd;
^

I added #include <programs.h> to the beginning of parport.cpp to clear that up.

Then I encounter errors in the dosbox.cpp:

dosbox.cpp:675:44: error: no matching function for call to 'Section_prop::Add_st
ring(const char [10], const char [9])'
secprop->Add_string("parallel1","disabled");

I'm hitting a brick wall at this point, to be honest D:

Reply 6 of 8, by truth_deleted

User metadata

Please find the equivalent lines of code in Ykhwong's build (he posts source code). Then replace the lines with problems with his lines of code. That would be a good start so the patch code compiles with the latest svn code. I believe the patch you are applying is fairly old.

Reply 7 of 8, by JesterXIII

User metadata
Rank Newbie
Rank
Newbie
truth5678 wrote:

Please find the equivalent lines of code in Ykhwong's build (he posts source code). Then replace the lines with problems with his lines of code. That would be a good start so the patch code compiles with the latest svn code. I believe the patch you are applying is fairly old.

Truth, you are a sexy beast who is 2/2. After some fishing through ykhwong's source (thanks ykhwong and h-a-l9000!), I think I put everything in the right place. Seems to compile, run, and output to a file just fine.

There's a couple jobs that are randomly coming out with some data, I'm guessing some programs are making calls to either security dongles or whatever. I'll try to figure out how to filter it.