From 003e130f79b5de2177381c8258080980b2cf85f5 Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 5 Nov 2005 14:36:11 +0000 Subject: Fixing Dalos a bit, and fixing DVD support. --- Dalos/Console.cc | 4 +- Dalos/Console.h | 6 +- Dalos/Hexview.cc | 4 +- Dalos/Hexview.h | 6 +- MSVC/CD-Tool/CD-Tool.vcproj | 20 ++- MSVC/Dalos/Dalos.vcproj | 38 ++--- .../PSX-Bundle - library.vcproj | 24 ++-- MSVC/PSX-Bundle.sln | 155 ++++++++++----------- lib/dvdabstract.cpp | 9 +- 9 files changed, 148 insertions(+), 118 deletions(-) diff --git a/Dalos/Console.cc b/Dalos/Console.cc index ac72b2f..5e2ffc2 100644 --- a/Dalos/Console.cc +++ b/Dalos/Console.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Console.cc,v 1.4 2004-12-26 03:29:09 pixel Exp $ */ +/* $Id: Console.cc,v 1.5 2005-11-05 14:36:11 pixel Exp $ */ #include #include @@ -309,3 +309,5 @@ void console::create_console_thread() { SDL_CreateThread(ReadLineInternals::readline_thread, 0); } + +console * CurrentConsole; diff --git a/Dalos/Console.h b/Dalos/Console.h index f7af59b..df66e09 100644 --- a/Dalos/Console.h +++ b/Dalos/Console.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Console.h,v 1.4 2004-12-26 03:29:10 pixel Exp $ */ +/* $Id: Console.h,v 1.5 2005-11-05 14:36:11 pixel Exp $ */ #ifndef __CONSOLE_H__ #define __CONSOLE_H__ @@ -51,7 +51,9 @@ class console : public mogltk::widget { int nlines, page; std::vector lines; SDL_mutex * protect_add_line; -} * CurrentConsole; +}; + +extern console * CurrentConsole; // We should rather have a special mechanism for these extern SDL_mutex * console_lock; diff --git a/Dalos/Hexview.cc b/Dalos/Hexview.cc index 109aa3a..b5f43ae 100644 --- a/Dalos/Hexview.cc +++ b/Dalos/Hexview.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Hexview.cc,v 1.3 2005-06-20 22:43:35 pixel Exp $ */ +/* $Id: Hexview.cc,v 1.4 2005-11-05 14:36:11 pixel Exp $ */ #include @@ -204,3 +204,5 @@ void hexview::resize_notify() { nlines = Father()->GetH() / 13; resize(Father()->GetW(), Father()->GetH()); } + +hexview * CurrentHexview; \ No newline at end of file diff --git a/Dalos/Hexview.h b/Dalos/Hexview.h index a550e04..ea7209c 100644 --- a/Dalos/Hexview.h +++ b/Dalos/Hexview.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Hexview.h,v 1.3 2005-06-20 22:43:35 pixel Exp $ */ +/* $Id: Hexview.h,v 1.4 2005-11-05 14:36:11 pixel Exp $ */ #ifndef __HEXVIEW_H__ #define __HEXVIEW_H__ @@ -55,6 +55,8 @@ class hexview : public mogltk::widget { int offset_loaded, size_loaded, virtual_base; int shift; Uint8 * data; -} * CurrentHexview; +}; + +extern hexview * CurrentHexview; #endif diff --git a/MSVC/CD-Tool/CD-Tool.vcproj b/MSVC/CD-Tool/CD-Tool.vcproj index 01adc24..957649f 100644 --- a/MSVC/CD-Tool/CD-Tool.vcproj +++ b/MSVC/CD-Tool/CD-Tool.vcproj @@ -4,6 +4,7 @@ Version="8,00" Name="CD-Tool" ProjectGUID="{1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}" + RootNamespace="CD-Tool" Keyword="Win32Proj" > @@ -41,12 +42,12 @@ Optimization="0" AdditionalIncludeDirectories="..\getopt;..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include;..\..\includes;..\..\psxdev;..\;..\regex" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="TRUE" + MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> + @@ -119,7 +124,7 @@ RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> + diff --git a/MSVC/Dalos/Dalos.vcproj b/MSVC/Dalos/Dalos.vcproj index d23e1e1..6665125 100644 --- a/MSVC/Dalos/Dalos.vcproj +++ b/MSVC/Dalos/Dalos.vcproj @@ -4,6 +4,7 @@ Version="8,00" Name="Dalos" ProjectGUID="{22F8F8CD-B256-446D-9B42-09CE83F74885}" + RootNamespace="Dal" Keyword="Win32Proj" > @@ -41,12 +42,13 @@ Optimization="0" AdditionalIncludeDirectories="..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include;..\..\mogltk\include;..\..\..\SDL\include;..\..\MSVC;..\..\;..\..\includes;..\..\psxdev;..\..\Dalos;..\regex" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;READLINE_LIBRARY;READLINE_STATIC" - MinimalRebuild="TRUE" + MinimalRebuild="true" BasicRuntimeChecks="3" - RuntimeLibrary="1" + RuntimeLibrary="3" + BufferSecurityCheck="false" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> + @@ -117,16 +121,13 @@ + diff --git a/MSVC/PSX-Bundle - library/PSX-Bundle - library.vcproj b/MSVC/PSX-Bundle - library/PSX-Bundle - library.vcproj index a414933..0da96a4 100644 --- a/MSVC/PSX-Bundle - library/PSX-Bundle - library.vcproj +++ b/MSVC/PSX-Bundle - library/PSX-Bundle - library.vcproj @@ -41,12 +41,12 @@ Optimization="0" AdditionalIncludeDirectories="..\..\generic\lib\lua\includes;..\..\generic\lib\lua\include;..\..\generic\include;..\..\includes;..\..\generic\lib\zlib\include;..\..\psxdev" PreprocessorDefinitions="_WINDOWS;ZLIB_DLL" - MinimalRebuild="TRUE" + MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> + + + + diff --git a/MSVC/PSX-Bundle.sln b/MSVC/PSX-Bundle.sln index e387637..092dbc4 100644 --- a/MSVC/PSX-Bundle.sln +++ b/MSVC/PSX-Bundle.sln @@ -1,78 +1,77 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tools", "Tools\Tools.vcproj", "{6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}" - ProjectSection(ProjectDependencies) = postProject - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mogltk", "mogltk\mogltk.vcproj", "{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}" - ProjectSection(ProjectDependencies) = postProject - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalos", "Dalos\Dalos.vcproj", "{22F8F8CD-B256-446D-9B42-09CE83F74885}" - ProjectSection(ProjectDependencies) = postProject - {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A} = {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A} - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Baltisot - generic", "Baltisot - generic\Baltisot - generic.vcproj", "{879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PSX-Bundle - library", "PSX-Bundle - library\PSX-Bundle - library.vcproj", "{0A2CD193-F270-4F2B-943C-F8BDF792D25C}" - ProjectSection(ProjectDependencies) = postProject - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CD-Tool", "CD-Tool\CD-Tool.vcproj", "{1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}" - ProjectSection(ProjectDependencies) = postProject - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaPatch", "LuaPatch\LuaPatch.vcproj", "{6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}" - ProjectSection(ProjectDependencies) = postProject - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} - {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Debug|Win32.Build.0 = Debug|Win32 - {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Release|Win32.ActiveCfg = Release|Win32 - {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Release|Win32.Build.0 = Release|Win32 - {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Debug|Win32.ActiveCfg = Debug|Win32 - {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Debug|Win32.Build.0 = Debug|Win32 - {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release|Win32.ActiveCfg = Release|Win32 - {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release|Win32.Build.0 = Release|Win32 - {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug|Win32.ActiveCfg = Debug|Win32 - {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug|Win32.Build.0 = Debug|Win32 - {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release|Win32.ActiveCfg = Release|Win32 - {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release|Win32.Build.0 = Release|Win32 - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Debug|Win32.ActiveCfg = Debug|Win32 - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Debug|Win32.Build.0 = Debug|Win32 - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Release|Win32.ActiveCfg = Release|Win32 - {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Release|Win32.Build.0 = Release|Win32 - {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Debug|Win32.ActiveCfg = Debug|Win32 - {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Debug|Win32.Build.0 = Debug|Win32 - {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Release|Win32.ActiveCfg = Release|Win32 - {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Release|Win32.Build.0 = Release|Win32 - {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Debug|Win32.Build.0 = Debug|Win32 - {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Release|Win32.ActiveCfg = Release|Win32 - {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Release|Win32.Build.0 = Release|Win32 - {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Debug|Win32.Build.0 = Debug|Win32 - {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Release|Win32.ActiveCfg = Release|Win32 - {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tools", "Tools\Tools.vcproj", "{6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}" + ProjectSection(ProjectDependencies) = postProject + {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mogltk", "mogltk\mogltk.vcproj", "{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}" + ProjectSection(ProjectDependencies) = postProject + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalos", "Dalos\Dalos.vcproj", "{22F8F8CD-B256-446D-9B42-09CE83F74885}" + ProjectSection(ProjectDependencies) = postProject + {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A} = {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A} + {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483} = {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Baltisot - generic", "Baltisot - generic\Baltisot - generic.vcproj", "{879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PSX-Bundle - library", "PSX-Bundle - library\PSX-Bundle - library.vcproj", "{0A2CD193-F270-4F2B-943C-F8BDF792D25C}" + ProjectSection(ProjectDependencies) = postProject + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CD-Tool", "CD-Tool\CD-Tool.vcproj", "{1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}" + ProjectSection(ProjectDependencies) = postProject + {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaPatch", "LuaPatch\LuaPatch.vcproj", "{6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}" + ProjectSection(ProjectDependencies) = postProject + {0A2CD193-F270-4F2B-943C-F8BDF792D25C} = {0A2CD193-F270-4F2B-943C-F8BDF792D25C} + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Debug|Win32.ActiveCfg = Debug|Win32 + {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Debug|Win32.Build.0 = Debug|Win32 + {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Release|Win32.ActiveCfg = Release|Win32 + {6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.Release|Win32.Build.0 = Release|Win32 + {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Debug|Win32.ActiveCfg = Debug|Win32 + {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Debug|Win32.Build.0 = Debug|Win32 + {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release|Win32.ActiveCfg = Release|Win32 + {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release|Win32.Build.0 = Release|Win32 + {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug|Win32.ActiveCfg = Debug|Win32 + {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug|Win32.Build.0 = Debug|Win32 + {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release|Win32.ActiveCfg = Release|Win32 + {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release|Win32.Build.0 = Release|Win32 + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Debug|Win32.ActiveCfg = Debug|Win32 + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Debug|Win32.Build.0 = Debug|Win32 + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Release|Win32.ActiveCfg = Release|Win32 + {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Release|Win32.Build.0 = Release|Win32 + {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Debug|Win32.Build.0 = Debug|Win32 + {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Release|Win32.ActiveCfg = Release|Win32 + {0A2CD193-F270-4F2B-943C-F8BDF792D25C}.Release|Win32.Build.0 = Release|Win32 + {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Debug|Win32.Build.0 = Debug|Win32 + {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Release|Win32.ActiveCfg = Release|Win32 + {1AA995DB-BF26-4CCF-9D5B-D3AD698B8483}.Release|Win32.Build.0 = Release|Win32 + {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Debug|Win32.Build.0 = Debug|Win32 + {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Release|Win32.ActiveCfg = Release|Win32 + {6BE81B31-B5A4-42B3-AD54-85C0F41AEE09}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/lib/dvdabstract.cpp b/lib/dvdabstract.cpp index 582ad90..55a961a 100644 --- a/lib/dvdabstract.cpp +++ b/lib/dvdabstract.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: dvdabstract.cpp,v 1.1 2005-11-02 21:34:02 pixel Exp $ */ +/* $Id: dvdabstract.cpp,v 1.2 2005-11-05 14:36:12 pixel Exp $ */ #include "dvdabstract.h" @@ -116,7 +116,7 @@ ssize_t dvdabstract::write(const void * _buf, size_t count) throw (GeneralExcept reminder = i_count; memcpy(i_buf, buf, reminder); - if (reminder >= 0) { + if (reminder > 0) { memcpy(buf, i_buf, reminder); if (reminder <= 22) { if (reminder <= 15) { @@ -144,6 +144,7 @@ void dvdabstract::read_sector(char * buf, int sector) { } void dvdabstract::write_sector(const char * buf, int sector) throw (GeneralException) { + if (sector > 913000) printm(M_BARE, "sector %i.\n", sector); r->seek(sector * 2048); switch(buf[15]) { case 0: @@ -151,10 +152,10 @@ void dvdabstract::write_sector(const char * buf, int sector) throw (GeneralExcep r->write(buf + 16, 2048); break; case 2: - if ((buf[18] == 1) && (buf[22] == 1)) { + if (((buf[18] & 8) && (buf[22] & 8)) || (!buf[16] && !buf[17] && !buf[18] && !buf[19] && !buf[20] && !buf[21] && !buf[22] && !buf[23])) { r->write(buf + 24, 2048); break; - } + } default: throw GeneralException("dvdabstract::write_sector: unknown sector mode."); } -- cgit v1.2.3