ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
324 discussions
Start a n
N
ew thread
[janderwald] 24978: - implement a basic scanning dection algorithm - please review :P
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 30 01:49:16 2006 New Revision: 24978 URL:
http://svn.reactos.org/svn/reactos?rev=24978&view=rev
Log: - implement a basic scanning dection algorithm - please review :P Modified: trunk/reactos/tools/fixdef/fixdef.cpp Modified: trunk/reactos/tools/fixdef/fixdef.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fixdef/fixdef.cpp?re…
============================================================================== --- trunk/reactos/tools/fixdef/fixdef.cpp (original) +++ trunk/reactos/tools/fixdef/fixdef.cpp Thu Nov 30 01:49:16 2006 @@ -5,6 +5,7 @@ #include <tchar.h> #include <stdio.h> #include <stdlib.h> +#include <assert.h> #define _FINDDATA_T_DEFINED #include <io.h> #include <time.h> @@ -141,10 +142,80 @@ return true; } +bool has_cdecl_convention(string & line) +{ + if (line[0] == _T('_')) + { + return true; + } + return false; +} + +bool has_fastcall_convention(string & line) +{ + if (line[0] == _T('@')) + { + return true; + } + return false; +} + +bool has_stdcall_convention(string & line) +{ + if (!has_cdecl_convention(line) && !has_fastcall_convention(line)) + { + size_t pos = line.find (_T("@")); + if (pos == string::npos) + { + /// + /// the stdcall decorate is removed + /// + return false; + } + assert(pos > 1); + if (line[pos-1] == _T(' ')) + { + /// + /// its an export ordinal + /// + return false; + } + + return true; + } + else + { + return false; + } +} + + +bool has_export_ordinal(string & line) +{ + if (line.find_last_of (_T(" @")) != string::npos) + { + return true; + } + return false; +} + +void remove_stdcall_convention(string & line) +{ + size_t pos = line.find (_T("@")); + assert(pos != string::npos); + line.erase (pos, 1); + + while(_istdigit(line[pos])) + line.erase (pos, 1); +} + + + bool convertFile(string filename, vector<string> & file) { bool modified = false; + cerr << "entered with: "<< filename << " size: " << file.size () << endl; for(size_t i = 0; i < file.size(); i++) { @@ -156,19 +227,33 @@ /// continue; } - if (line.find(_T("@")) == string::npos) - { - // file has no @ - continue; - } - - /// - /// TODO implement algorithm - /// - - //cout << ">" << line; - } - + size_t pos = line.find (_T("=")); + if (pos != string::npos) + { + string part1 = line.substr (0, pos); + string part2 = line.substr (pos+1, line.length () - pos - 1); + if (has_stdcall_convention(part1)) + { + modified = true; + remove_stdcall_convention(part1); + } + if (has_stdcall_convention(part2)) + { + modified = true; + remove_stdcall_convention(part2); + } + line = part1; + line.insert (line.length (), _T("=")); + line.insert (line.length (), part2); + } + else if (has_stdcall_convention(line)) + { + modified = true; + remove_stdcall_convention(line); + } + cout << line; + } + exit(0); return modified; } @@ -186,8 +271,6 @@ string & line = file[i]; _fputts(line.c_str (), fd); } - - fclose(fd); return true; }
18 years
1
0
0
0
[ion] 24977: - Add profil.c and stub HalStartProfileInterrupt, HalStopProfileInterrupt and HalSetProfileInterval, and export these functions. - KdComPortInUse is exported by HAL, not kdcom, so make the change. - Register the KD support routines that kdcom on NT uses and implement most of them (except support for PCI Debug Cards). - I can now get Windows to recognize the HAL but it freezes during loading (Due to broken IRQL implementation) and WinDBG won't connect to it.
by ion@svn.reactos.org
Author: ion Date: Thu Nov 30 01:12:50 2006 New Revision: 24977 URL:
http://svn.reactos.org/svn/reactos?rev=24977&view=rev
Log: - Add profil.c and stub HalStartProfileInterrupt, HalStopProfileInterrupt and HalSetProfileInterval, and export these functions. - KdComPortInUse is exported by HAL, not kdcom, so make the change. - Register the KD support routines that kdcom on NT uses and implement most of them (except support for PCI Debug Cards). - I can now get Windows to recognize the HAL but it freezes during loading (Due to broken IRQL implementation) and WinDBG won't connect to it. Added: trunk/reactos/hal/halx86/generic/profil.c Modified: trunk/reactos/drivers/base/kdcom/kdcom.def trunk/reactos/hal/hal/hal.def trunk/reactos/hal/halx86/generic/bus.c trunk/reactos/hal/halx86/generic/generic.rbuild trunk/reactos/hal/halx86/generic/misc.c trunk/reactos/hal/halx86/generic/pci.c trunk/reactos/hal/halx86/generic/processor.c trunk/reactos/hal/halx86/generic/sysinfo.c trunk/reactos/hal/halx86/include/halp.h Modified: trunk/reactos/drivers/base/kdcom/kdcom.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdcom.d…
============================================================================== --- trunk/reactos/drivers/base/kdcom/kdcom.def (original) +++ trunk/reactos/drivers/base/kdcom/kdcom.def Thu Nov 30 01:12:50 2006 @@ -1,7 +1,6 @@ LIBRARY kdcom.dll EXPORTS -KdComPortInUse=_KdComPortInUse KdPortGetByte@4 KdPortGetByteEx@8 KdPortInitialize@12 Modified: trunk/reactos/hal/hal/hal.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/hal/hal.def?rev=24977&…
============================================================================== --- trunk/reactos/hal/hal/hal.def (original) +++ trunk/reactos/hal/hal/hal.def Thu Nov 30 01:12:50 2006 @@ -13,6 +13,7 @@ @KeAcquireInStackQueuedSpinLockRaiseToSynch@8 @KeAcquireSpinLockRaiseToSynch@4 @KeAcquireQueuedSpinLock@4 +@KeAcquireQueuedSpinLockRaiseToSynch@4 @KeReleaseInStackQueuedSpinLock@4 @KeReleaseQueuedSpinLock@8 @KeTryToAcquireQueuedSpinLock@8 @@ -57,12 +58,12 @@ HalSetBusDataByOffset@24 HalSetDisplayParameters@8 HalSetEnvironmentVariable@8 -;HalSetProfileInterval@4 +HalSetProfileInterval@4 HalSetRealTimeClock@4 HalSetTimeIncrement@4 HalStartNextProcessor@8 -;HalStartProfileInterrupt@4 -;HalStopProfileInterrupt@4 +HalStartProfileInterrupt@4 +HalStopProfileInterrupt@4 HalTranslateBusAddress@24 IoAssignDriveLetters@16=HalpAssignDriveLetters@16 IoFlushAdapterBuffers@24 @@ -73,6 +74,7 @@ IoSetPartitionInformation@16=HalpSetPartitionInformation@16 IoWritePartitionTable@20=HalpWritePartitionTable@20 KeAcquireSpinLock@8 +KdComPortInUse=_KdComPortInUse KeFlushWriteBuffer@0 KeGetCurrentIrql@0 KeLowerIrql@4 Modified: trunk/reactos/hal/halx86/generic/bus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bus.c?r…
============================================================================== --- trunk/reactos/hal/halx86/generic/bus.c (original) +++ trunk/reactos/hal/halx86/generic/bus.c Thu Nov 30 01:12:50 2006 @@ -17,6 +17,22 @@ ULONG HalpBusType; /* PRIVATE FUNCTIONS *********************************************************/ + +VOID +NTAPI +HalpRegisterKdSupportFunctions(VOID) +{ + /* Register PCI Device Functions */ + KdSetupPciDeviceForDebugging = HalpSetupPciDeviceForDebugging; + KdReleasePciDeviceforDebugging = HalpReleasePciDeviceForDebugging; + + /* Register memory functions */ + KdMapPhysicalMemory64 = HalpMapPhysicalMemory64; + KdUnmapVirtualAddress = HalpUnmapVirtualAddress; + + /* Register ACPI stub */ + KdCheckPowerButton = HalpCheckPowerButton; +} NTSTATUS NTAPI Modified: trunk/reactos/hal/halx86/generic/generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/generic…
============================================================================== --- trunk/reactos/hal/halx86/generic/generic.rbuild (original) +++ trunk/reactos/hal/halx86/generic/generic.rbuild Thu Nov 30 01:12:50 2006 @@ -12,6 +12,7 @@ <file>misc.c</file> <file>pci.c</file> <file>portio.c</file> + <file>profil.c</file> <file>reboot.c</file> <file>sysinfo.c</file> <file>timer.c</file> Modified: trunk/reactos/hal/halx86/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/misc.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/misc.c (original) +++ trunk/reactos/hal/halx86/generic/misc.c Thu Nov 30 01:12:50 2006 @@ -7,13 +7,43 @@ * Eric Kohl (ekohl(a)abo.rhein-zeitung.de) */ -/* INCLUDES *****************************************************************/ +/* INCLUDES ******************************************************************/ #include <hal.h> #define NDEBUG #include <debug.h> -/* FUNCTIONS ****************************************************************/ +/* PRIVATE FUNCTIONS *********************************************************/ + +VOID +NTAPI +HalpCheckPowerButton(VOID) +{ + /* Nothing to do on non-ACPI */ + return; +} + +PVOID +NTAPI +HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPage) +{ + /* Use kernel memory manager I/O map facilities */ + return MmMapIoSpace(PhysicalAddress, + NumberPage << PAGE_SHIFT, + MmNonCached); +} + +VOID +NTAPI +HalpUnmapVirtualAddress(IN PVOID VirtualAddress, + IN ULONG NumberPages) +{ + /* Use kernel memory manager I/O map facilities */ + return MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT); +} + +/* FUNCTIONS *****************************************************************/ /* * @implemented Modified: trunk/reactos/hal/halx86/generic/pci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/pci.c?r…
============================================================================== --- trunk/reactos/hal/halx86/generic/pci.c (original) +++ trunk/reactos/hal/halx86/generic/pci.c Thu Nov 30 01:12:50 2006 @@ -470,6 +470,23 @@ NTSTATUS NTAPI +HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) +{ + DPRINT1("Unimplemented!\n"); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) +{ + DPRINT1("Unimplemented!\n"); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PUNICODE_STRING RegistryPath, Modified: trunk/reactos/hal/halx86/generic/processor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/process…
============================================================================== --- trunk/reactos/hal/halx86/generic/processor.c (original) +++ trunk/reactos/hal/halx86/generic/processor.c Thu Nov 30 01:12:50 2006 @@ -31,9 +31,11 @@ /* Update the interrupt affinity and processor mask */ InterlockedBitTestAndSet(&HalpActiveProcessors, ProcessorNumber); - InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity, ProcessorNumber); + InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity, + ProcessorNumber); - /* FIXME: Register routines for KDCOM */ + /* Register routines for KDCOM */ + HalpRegisterKdSupportFunctions(); } /* Added: trunk/reactos/hal/halx86/generic/profil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/profil.…
============================================================================== --- trunk/reactos/hal/halx86/generic/profil.c (added) +++ trunk/reactos/hal/halx86/generic/profil.c Thu Nov 30 01:12:50 2006 @@ -1,0 +1,48 @@ +/* + * PROJECT: ReactOS HAL + * LICENSE: GPL - See COPYING in the top level directory + * FILE: hal/halx86/generic/profil.c + * PURPOSE: System Profiling + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <hal.h> +#define NDEBUG +#include <debug.h> + +/* FUNCTIONS *****************************************************************/ + +/* + * @unimplemented + */ +VOID +NTAPI +HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) +{ + KEBUGCHECK(0); + return; +} + +/* + * @unimplemented + */ +VOID +NTAPI +HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) +{ + KEBUGCHECK(0); + return; +} + +/* + * @unimplemented + */ +ULONG_PTR +NTAPI +HalSetProfileInterval(IN ULONG_PTR Interval) +{ + KEBUGCHECK(0); + return Interval; +} Modified: trunk/reactos/hal/halx86/generic/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/sysinfo…
============================================================================== --- trunk/reactos/hal/halx86/generic/sysinfo.c (original) +++ trunk/reactos/hal/halx86/generic/sysinfo.c Thu Nov 30 01:12:50 2006 @@ -11,6 +11,8 @@ #include <hal.h> #define NDEBUG #include <debug.h> + +ULONG KdComPortInUse = 0; /* FUNCTIONS *****************************************************************/ Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h (original) +++ trunk/reactos/hal/halx86/include/halp.h Thu Nov 30 01:12:50 2006 @@ -9,10 +9,10 @@ #define KPCR_BASE 0xFF000000 /* WDK Hack */ -#define KdComPortInUse _KdComPortInUse +#define KdComPortInUse _KdComPortInUse -#define HAL_APC_REQUEST 0 -#define HAL_DPC_REQUEST 1 +#define HAL_APC_REQUEST 0 +#define HAL_DPC_REQUEST 1 /* CMOS Registers and Ports */ #define CMOS_CONTROL_PORT (PUCHAR)0x70 @@ -35,15 +35,6 @@ #define INT_BCD(int) \ (UCHAR)(((int / 10) << 4) + (int % 10)) -// -// Kernel Debugger Port Definition -// -typedef struct _KD_PORT_INFORMATION -{ - ULONG ComPort; - ULONG BaudRate; - ULONG BaseAddress; -} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION; /* adapter.c */ PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); @@ -54,26 +45,63 @@ VOID NTAPI HalpInitPICs(VOID); /* udelay.c */ -VOID HalpCalibrateStallExecution(VOID); - VOID NTAPI HalpInitializeClock(VOID); /* pci.c */ VOID HalpInitPciBus (VOID); -/* enum.c */ -VOID HalpStartEnumerator (VOID); - /* dma.c */ VOID HalpInitDma (VOID); - -/* mem.c */ -PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size); /* Non-generic initialization */ VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock); VOID HalpInitPhase1(VOID); VOID NTAPI HalpClockInterrupt(VOID); + +// +// KD Support +// +VOID +NTAPI +HalpCheckPowerButton( + VOID +); + +VOID +NTAPI +HalpRegisterKdSupportFunctions( + VOID +); + +NTSTATUS +NTAPI +HalpSetupPciDeviceForDebugging( + IN PVOID LoaderBlock, + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice +); + +NTSTATUS +NTAPI +HalpReleasePciDeviceForDebugging( + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice +); + +// +// Memory routines +// +PVOID +NTAPI +HalpMapPhysicalMemory64( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPage +); + +VOID +NTAPI +HalpUnmapVirtualAddress( + IN PVOID VirtualAddress, + IN ULONG NumberPages +); /* sysinfo.c */ NTSTATUS
18 years
1
0
0
0
[greatlrd] 24976: 1. adding surface callbacks stub, and activate them. 2. Finish the mix betwin HAL and HEL that we can do for now. 3. Finish the switch betwin HAL and HEL that we can do for now. 4. mange activate a DDCALLBACKS stub that was not posible before with wine ddraw.h header. after I wrote a new ddraw.f header for ReactOS, it works to actiavte FlipToGDISurface HEL callbacks. But it is stub for moment.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Thu Nov 30 01:09:52 2006 New Revision: 24976 URL:
http://svn.reactos.org/svn/reactos?rev=24976&view=rev
Log: 1. adding surface callbacks stub, and activate them. 2. Finish the mix betwin HAL and HEL that we can do for now. 3. Finish the switch betwin HAL and HEL that we can do for now. 4. mange activate a DDCALLBACKS stub that was not posible before with wine ddraw.h header. after I wrote a new ddraw.f header for ReactOS, it works to actiavte FlipToGDISurface HEL callbacks. But it is stub for moment. Modified: trunk/reactos/dll/directx/ddraw/callbacks_hel.c trunk/reactos/dll/directx/ddraw/ddraw.rbuild trunk/reactos/dll/directx/ddraw/rosdraw.h trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/callbacks_hel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/callback…
============================================================================== --- trunk/reactos/dll/directx/ddraw/callbacks_hel.c (original) +++ trunk/reactos/dll/directx/ddraw/callbacks_hel.c Thu Nov 30 01:09:52 2006 @@ -28,12 +28,12 @@ DX_STUB; } -/* + DWORD CALLBACK HelDdSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKey) { DX_STUB; } -*/ + DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode) { Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
============================================================================== --- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original) +++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Thu Nov 30 01:09:52 2006 @@ -29,6 +29,7 @@ <file>iface_kernel.c</file> <file>callbacks_hel.c</file> + <file>callbacks_surf_hel.c</file> <directory name="main"> <file>ddraw_main.c</file> Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/rosdraw.h (original) +++ trunk/reactos/dll/directx/ddraw/rosdraw.h Thu Nov 30 01:09:52 2006 @@ -571,6 +571,23 @@ DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode); DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface); +DWORD CALLBACK HelDdSurfAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface); +DWORD CALLBACK HelDdSurfBlt(LPDDHAL_BLTDATA lpBltData); +DWORD CALLBACK HelDdSurfDestroySurface(LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData); +DWORD CALLBACK HelDdSurfFlip(LPDDHAL_FLIPDATA lpFlipData); +DWORD CALLBACK HelDdSurfGetBltStatus(LPDDHAL_GETBLTSTATUSDATA lpGetBltStatusData); +DWORD CALLBACK HelDdSurfGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA lpGetFlipStatusData); +DWORD CALLBACK HelDdSurfLock(LPDDHAL_LOCKDATA lpLockData); +DWORD CALLBACK HelDdSurfreserved4(DWORD *lpPtr); +DWORD CALLBACK HelDdSurfSetClipList(LPDDHAL_SETCLIPLISTDATA lpSetClipListData); +DWORD CALLBACK HelDdSurfSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKeyData); +DWORD CALLBACK HelDdSurfSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA lpSetOverlayPositionData); +DWORD CALLBACK HelDdSurfSetPalette(LPDDHAL_SETPALETTEDATA lpSetPaletteData); +DWORD CALLBACK HelDdSurfUnlock(LPDDHAL_UNLOCKDATA lpUnLockData); +DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLayData); + + + /* Setting for HEL should be move to ros special reg key ? */ Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Thu Nov 30 01:09:52 2006 @@ -170,8 +170,7 @@ This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; - /* Mix the DDCALLBACKS */ - + /* Mix the DDCALLBACKS */ This->lpLcl->lpDDCB->cbDDCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDCallbacks); if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=3)) @@ -490,14 +489,41 @@ This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay; } - - /* Mix the DDPALETTE CALLBACKS - This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; - This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries; - This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); - */ + /* Mix the DDPALETTE CALLBACKS */ + This->lpLcl->lpDDCB->HALDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HALDDPalette); + + if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = + This->lpLcl->lpDDCB->HALDDPalette.DestroyPalette; + } + else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_DESTROYPALETTE; + + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = + This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette; + } + + if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = + This->lpLcl->lpDDCB->HALDDPalette.SetEntries; + } + else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = + This->lpLcl->lpDDCB->HELDDPalette.SetEntries; + } /* Mix the DDExeBuf CALLBACKS */ + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDExeBufCallbacks); if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=3)) { @@ -770,9 +796,9 @@ This->lpLcl->lpDDCB->HELDD.CreateSurface = HelDdCreateSurface; This->lpLcl->lpDDCB->HELDD.CreatePalette = HelDdCreatePalette; This->lpLcl->lpDDCB->HELDD.DestroyDriver = HelDdDestroyDriver; - //This->lpLcl->lpDDCB->HELDD.FlipToGDISurface = HelDdFlipToGDISurface + This->lpLcl->lpDDCB->HELDD.FlipToGDISurface = HelDdFlipToGDISurface; This->lpLcl->lpDDCB->HELDD.GetScanLine = HelDdGetScanLine; - // This->lpLcl->lpDDCB->HELDD.SetColorKey = HelDdSetColorKey; + //This->lpLcl->lpDDCB->HELDD.SetColorKey = HelDdSetColorKey; This->lpLcl->lpDDCB->HELDD.SetExclusiveMode = HelDdSetExclusiveMode; This->lpLcl->lpDDCB->HELDD.SetMode = HelDdSetMode; This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank; @@ -781,17 +807,15 @@ DDHAL_CB32_CREATESURFACE | DDHAL_CB32_CREATEPALETTE | DDHAL_CB32_DESTROYDRIVER | - // DDHAL_CB32_FLIPTOGDISURFACE | + DDHAL_CB32_FLIPTOGDISURFACE | DDHAL_CB32_GETSCANLINE | - // DDHAL_CB32_SETCOLORKEY | + //DDHAL_CB32_SETCOLORKEY | DDHAL_CB32_SETEXCLUSIVEMODE | DDHAL_CB32_SETMODE | DDHAL_CB32_WAITFORVERTICALBLANK ; - This->lpLcl->lpDDCB->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD); - - /* + This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface; This->lpLcl->lpDDCB->HELDDSurface.Blt = HelDdSurfBlt; This->lpLcl->lpDDCB->HELDDSurface.DestroySurface = HelDdSurfDestroySurface; @@ -806,8 +830,24 @@ This->lpLcl->lpDDCB->HELDDSurface.SetPalette = HelDdSurfSetPalette; This->lpLcl->lpDDCB->HELDDSurface.Unlock = HelDdSurfUnlock; This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay; - */ - + + This->lpLcl->lpDDCB->HELDDSurface.dwFlags = DDHAL_SURFCB32_ADDATTACHEDSURFACE | + DDHAL_SURFCB32_BLT | + DDHAL_SURFCB32_DESTROYSURFACE | + DDHAL_SURFCB32_FLIP | + DDHAL_SURFCB32_GETBLTSTATUS | + DDHAL_SURFCB32_GETFLIPSTATUS | + DDHAL_SURFCB32_LOCK | + DDHAL_SURFCB32_RESERVED4 | + DDHAL_SURFCB32_SETCLIPLIST | + DDHAL_SURFCB32_SETCOLORKEY | + DDHAL_SURFCB32_SETOVERLAYPOSITION | + DDHAL_SURFCB32_SETPALETTE | + DDHAL_SURFCB32_UNLOCK | + DDHAL_SURFCB32_UPDATEOVERLAY; + + This->lpLcl->lpDDCB->HELDDSurface.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDSurface); + /* This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries;
18 years
1
0
0
0
[janderwald] 24975: - beginning of a def conversion utility
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 30 00:08:15 2006 New Revision: 24975 URL:
http://svn.reactos.org/svn/reactos?rev=24975&view=rev
Log: - beginning of a def conversion utility Added: trunk/reactos/tools/fixdef/ (with props) trunk/reactos/tools/fixdef/fixdef.cpp (with props) trunk/reactos/tools/fixdef/fixdef.mak (with props) Modified: trunk/reactos/tools/tools.mak Propchange: trunk/reactos/tools/fixdef/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Nov 30 00:08:15 2006 @@ -1,0 +1,36 @@ +*.sys +*.exe +*.dll +*.cpl +*.a +*.o +*.d +*.coff +*.dsp +*.dsw +*.aps +*.ncb +*.opt +*.sym +*.plg +*.bak +*.zip +*.iso +*.img +*.cab +*.bat +*.log +*.patch +*.diff +makefile.auto +config.rbuild +obj-* +output-* +doxy-doc +cd +reactos +ros +*.s +*.sln +RosBE-Logs +*.suo Added: trunk/reactos/tools/fixdef/fixdef.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fixdef/fixdef.cpp?re…
============================================================================== --- trunk/reactos/tools/fixdef/fixdef.cpp (added) +++ trunk/reactos/tools/fixdef/fixdef.cpp Thu Nov 30 00:08:15 2006 @@ -1,0 +1,226 @@ + +#include <string> +#include <vector> +#include <iostream> +#include <tchar.h> +#include <stdio.h> +#include <stdlib.h> +#define _FINDDATA_T_DEFINED +#include <io.h> +#include <time.h> + + typedef std::basic_string<TCHAR> string; + typedef std::basic_istringstream<TCHAR> istringstream; + +#ifdef UNICODE + + using std::wcout; + using std::wcerr; + using std::endl; + +#define cout wcout +#define cerr wcerr + +#else + + using std::cout; + using std::cerr; + using std::endl; + +#endif + +using std::vector; +using std::endl; + + +bool scan_dir(string current_dir, vector<string> & def_files) +{ + vector<string> vect; + string val = current_dir; + val.insert (val.length(), _T("\\*")); + + struct _tfinddatai64_t c_file; + intptr_t hFile = _tfindfirsti64(val.c_str(), &c_file); + + if (hFile == -1L) + { + cerr << "scan_dir failed" << val << endl; + return false; + } + + do + { + + do + { + TCHAR * pos; + if ((pos = _tcsstr(c_file.name, _T(".def")))) + { + string modulename = c_file.name; + if (modulename.find (_T(".spec.def")) != string::npos) + { + /// + /// ignore spec files + /// + continue; + } + string fname = current_dir; + fname.insert (fname.length (), _T("\\")); + fname.insert (fname.length (), modulename); + cout << "adding file to scan list: "<< fname << endl; + def_files.push_back(fname); + } + if (c_file.attrib & _A_SUBDIR) + { + if (!_tcscmp(c_file.name, _T(".svn"))) + { + /// + /// ignore .svn directories + /// + continue; + } + if (c_file.name[0] != _T('.')) + { + string path = current_dir; + path.insert (path.length(), _T("\\")); + path.insert (path.length(), c_file.name); + vect.push_back (path); + } + } + + }while(_tfindnexti64(hFile, &c_file) == 0); + + _findclose(hFile); + hFile = -1L; + + while(!vect.empty ()) + { + current_dir = vect.front (); + vect.erase (vect.begin()); + val = current_dir; + val.insert (val.length(), _T("\\*")); + hFile = _tfindfirsti64(val.c_str(), &c_file); + if (hFile != -1L) + { + break; + } + } + + if (hFile == -1L) + { + break; + } + + }while(1); + + return !def_files.empty (); +} + +bool readFile(string filename, vector<string> & file) +{ + FILE * fd = _tfopen(filename.c_str(), _T("rt")); + if (!fd) + { + cerr << "Error: failed to open file " << filename << endl; + return false; + } + + do + { + TCHAR szBuffer[256]; + memset(szBuffer, 0x0, sizeof(szBuffer)); + + if(_fgetts(szBuffer, sizeof(szBuffer) / sizeof(char), fd)) + { + string line = szBuffer; + file.push_back (line); + } + }while(!feof(fd)); + + fclose(fd); + return true; +} + + +bool convertFile(string filename, vector<string> & file) +{ + bool modified = false; + + for(size_t i = 0; i < file.size(); i++) + { + string & line = file[i]; + if (line[0] == _T(';')) + { + /// + /// line is a comment ignore + /// + continue; + } + if (line.find(_T("@")) == string::npos) + { + // file has no @ + continue; + } + + /// + /// TODO implement algorithm + /// + + //cout << ">" << line; + } + + return modified; +} + +bool writeFile(string filename, vector<string> & file) +{ + FILE * fd = _tfopen(filename.c_str(), _T("wt")); + if (!fd) + { + cerr << "Error: failed to open file " << filename << endl; + return false; + } + + for(size_t i = 0; i < file.size (); i++) + { + string & line = file[i]; + _fputts(line.c_str (), fd); + } + + fclose(fd); + return true; +} + + +int _tmain(int argc, TCHAR ** argv) +{ + string current_dir; + vector<string> def_files; + + if (argc < 2) + { + cout << "Usage: " << argv[0] << "path to source" << endl; + return -1; + } + + if (!scan_dir(argv[1], def_files) || def_files.size() == 0) + { + cout << "Error: found no def files or invalid directory" << endl; + return -1; + } + + for (size_t i = 0; i < def_files.size(); i++) + { + vector<string> file; + file.clear (); + if (readFile(def_files[i], file)) + { + if (convertFile(def_files[i], file)) + { + writeFile(def_files[i], file); + } + } + } + + return 0; +} Propchange: trunk/reactos/tools/fixdef/fixdef.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/fixdef/fixdef.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fixdef/fixdef.mak?re…
============================================================================== --- trunk/reactos/tools/fixdef/fixdef.mak (added) +++ trunk/reactos/tools/fixdef/fixdef.mak Thu Nov 30 00:08:15 2006 @@ -1,0 +1,46 @@ +FIXDEF_BASE = $(TOOLS_BASE)$(SEP)fixdef +FIXDEF_BASE_ = $(FIXDEF_BASE)$(SEP) +FIXDEF_INT = $(INTERMEDIATE_)$(FIXDEF_BASE) +FIXDEF_INT_ = $(FIXDEF_INT)$(SEP) +FIXDEF_OUT = $(OUTPUT_)$(FIXDEF_BASE) +FIXDEF_OUT_ = $(FIXDEF_OUT)$(SEP) + +$(FIXDEF_INT): | $(TOOLS_INT) + $(ECHO_MKDIR) + ${mkdir} $@ + +ifneq ($(INTERMEDIATE),$(OUTPUT)) +$(FIXDEF_OUT): | $(TOOLS_OUT) + $(ECHO_MKDIR) + ${mkdir} $@ +endif + +FIXDEF_TARGET = \ + $(EXEPREFIX)$(FIXDEF_OUT_)FIXDEF$(EXEPOSTFIX) + +FIXDEF_SOURCES = $(addprefix $(FIXDEF_BASE_), \ + fixdef.cpp \ + ) + +FIXDEF_OBJECTS = \ + $(addprefix $(INTERMEDIATE_), $(FIXDEF_SOURCES:.cpp=.o)) + +FIXDEF_HOST_CFLAGS = $(TOOLS_CFLAGS) -D__USE_W32API -Iinclude -Iinclude/reactos -Iinclude/psdk + +FIXDEF_HOST_LFLAGS = $(TOOLS_LFLAGS) -lntdll + +.PHONY: FIXDEF +FIXDEF: $(FIXDEF_TARGET) + +$(FIXDEF_TARGET): $(FIXDEF_OBJECTS) | $(FIXDEF_OUT) + $(ECHO_LD) + ${host_gpp} $(FIXDEF_OBJECTS) $(FIXDEF_HOST_LFLAGS) -o $@ + +$(FIXDEF_INT_)fixdef.o: $(FIXDEF_BASE_)fixdef.cpp | $(FIXDEF_INT) + $(ECHO_CC) + ${host_gpp} $(FIXDEF_HOST_CFLAGS) -c $< -o $@ + +.PHONY: FIXDEF_clean +FIXDEF_clean: + -@$(rm) $(FIXDEF_TARGET) $(FIXDEF_OBJECTS) 2>$(NUL) +clean: FIXDEF_clean Propchange: trunk/reactos/tools/fixdef/fixdef.mak ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/tools/tools.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=24975&…
============================================================================== --- trunk/reactos/tools/tools.mak (original) +++ trunk/reactos/tools/tools.mak Thu Nov 30 00:08:15 2006 @@ -59,4 +59,5 @@ include tools/wpp/wpp.mak include tools/wrc/wrc.mak include tools/sysreg/sysreg.mak -include tools/dbgprint/dbgprint.mak +include tools/dbgprint/dbgprint.mak +include tools/fixdef/fixdef.mak
18 years
1
0
0
0
[ion] 24974: - Don't freeze on spurious interrupt.
by ion@svn.reactos.org
Author: ion Date: Wed Nov 29 22:23:06 2006 New Revision: 24974 URL:
http://svn.reactos.org/svn/reactos?rev=24974&view=rev
Log: - Don't freeze on spurious interrupt. Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/trap.s (original) +++ trunk/reactos/ntoskrnl/ke/i386/trap.s Wed Nov 29 22:23:06 2006 @@ -2016,7 +2016,6 @@ SpuriousInt: /* Exit the interrupt */ - jmp $ add esp, 8 jmp _Kei386EoiHelper@0
18 years
1
0
0
0
[ion] 24973: - Swap the IDT where we should, in KiSystemStartup instead of the freeldr.c hackfile. This, coupled with the previous patch, should make NTLDR-booting even more succesful since interrupts won't crash/be ignored.
by ion@svn.reactos.org
Author: ion Date: Wed Nov 29 22:20:17 2006 New Revision: 24973 URL:
http://svn.reactos.org/svn/reactos?rev=24973&view=rev
Log: - Swap the IDT where we should, in KiSystemStartup instead of the freeldr.c hackfile. This, coupled with the previous patch, should make NTLDR-booting even more succesful since interrupts won't crash/be ignored. Modified: trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c Wed Nov 29 22:20:17 2006 @@ -367,9 +367,6 @@ MmFreeLdrLastKrnlPhysAddr = MmFreeLdrLastKernelAddress - KSEG0_BASE + 0x200000; - /* Setup the IDT */ - KeInitExceptions(); // ONCE HACK BELOW IS GONE, MOVE TO KISYSTEMSTARTUP! - /* Set up the VDM Data */ NtEarlyInitVdm(); Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Wed Nov 29 22:20:17 2006 @@ -610,6 +610,9 @@ __writefsdword(KPCR_DR6, 0); __writefsdword(KPCR_DR7, 0); + /* Setup the IDT */ + KeInitExceptions(); + /* Load Ring 3 selectors for DS/ES */ Ke386SetDs(KGDT_R3_DATA | RPL_MASK); Ke386SetEs(KGDT_R3_DATA | RPL_MASK);
18 years
1
0
0
0
[ion] 24972: - Finally figured out a way to make the old HAL IRQ implementation work with the new Ke Interrupt implementation without requiring my new HAL IRQ code (which doesn't work). - Remove the "deprecated" directory from ntoskrnl since it now truly is. - Remove KeInitInterrupts hack. - Remove KiDispatchInterrupt2 export hack from kernel and stop using it from the HAL. - HAL can now be built/tested with Windows/TinyKRNL since the export hack is gone and interrupts are sent properly through
by ion@svn.reactos.org
Author: ion Date: Wed Nov 29 22:13:12 2006 New Revision: 24972 URL:
http://svn.reactos.org/svn/reactos?rev=24972&view=rev
Log: - Finally figured out a way to make the old HAL IRQ implementation work with the new Ke Interrupt implementation without requiring my new HAL IRQ code (which doesn't work). - Remove the "deprecated" directory from ntoskrnl since it now truly is. - Remove KeInitInterrupts hack. - Remove KiDispatchInterrupt2 export hack from kernel and stop using it from the HAL. - HAL can now be built/tested with Windows/TinyKRNL since the export hack is gone and interrupts are sent properly through the IDT. - Remove a bunch of completed krnlfun entries. - Fix progressbar during bootcd bug. Removed: trunk/reactos/ntoskrnl/deprecated/ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/hal/halx86/generic/irql.c trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/trap.s trunk/reactos/ntoskrnl/ntoskrnl.def trunk/reactos/ntoskrnl/ntoskrnl.rbuild Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Wed Nov 29 22:13:12 2006 @@ -156,7 +156,7 @@ FrLdrMapImage(FilePointer, szShortName); /* Update Processbar and return success */ - UiDrawProgressBarCenter(nPos, 100, szLoadingMsg); + if (!FrLdrBootType) UiDrawProgressBarCenter(nPos, 100, szLoadingMsg); return TRUE; } Modified: trunk/reactos/hal/halx86/generic/irql.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/irql.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/irql.c (original) +++ trunk/reactos/hal/halx86/generic/irql.c Wed Nov 29 22:13:12 2006 @@ -128,10 +128,129 @@ } VOID +HalpHardwareInt30(VOID) +{ + __asm__ __volatile__ ("int $0x30"); +} + +VOID +HalpHardwareInt31(VOID) +{ + __asm__ __volatile__ ("int $0x31"); +} + +VOID +HalpHardwareInt32(VOID) +{ + __asm__ __volatile__ ("int $0x32"); +} + +VOID +HalpHardwareInt33(VOID) +{ + __asm__ __volatile__ ("int $0x33"); +} + +VOID +HalpHardwareInt34(VOID) +{ + __asm__ __volatile__ ("int $0x34"); +} + +VOID +HalpHardwareInt35(VOID) +{ + __asm__ __volatile__ ("int $0x35"); +} + +VOID +HalpHardwareInt36(VOID) +{ + __asm__ __volatile__ ("int $0x36"); +} + +VOID +HalpHardwareInt37(VOID) +{ + __asm__ __volatile__ ("int $0x37"); +} + +VOID +HalpHardwareInt38(VOID) +{ + __asm__ __volatile__ ("int $0x38"); +} + +VOID +HalpHardwareInt39(VOID) +{ + __asm__ __volatile__ ("int $0x39"); +} + +VOID +HalpHardwareInt3A(VOID) +{ + __asm__ __volatile__ ("int $0x3A"); +} + +VOID +HalpHardwareInt3B(VOID) +{ + __asm__ __volatile__ ("int $0x3B"); +} + +VOID +HalpHardwareInt3C(VOID) +{ + __asm__ __volatile__ ("int $0x3C"); +} + +VOID +HalpHardwareInt3D(VOID) +{ + __asm__ __volatile__ ("int $0x3D"); +} + +VOID +HalpHardwareInt3E(VOID) +{ + __asm__ __volatile__ ("int $0x3E"); + while (TRUE); +} + +VOID +HalpHardwareInt3F(VOID) +{ + __asm__ __volatile__ ("int $0x3F"); +} + + +typedef VOID (*PHARDWARE_INT)(VOID); + +PHARDWARE_INT HalpHardwareInt[NR_IRQS] = +{ + HalpHardwareInt30, + HalpHardwareInt31, + HalpHardwareInt32, + HalpHardwareInt33, + HalpHardwareInt34, + HalpHardwareInt35, + HalpHardwareInt36, + HalpHardwareInt37, + HalpHardwareInt38, + HalpHardwareInt39, + HalpHardwareInt3A, + HalpHardwareInt3B, + HalpHardwareInt3C, + HalpHardwareInt3D, + HalpHardwareInt3E, + HalpHardwareInt3F +}; + +VOID HalpExecuteIrqs(KIRQL NewIrql) { ULONG IrqLimit, i; - IrqLimit = min(PROFILE_LEVEL - NewIrql, NR_IRQS); /* @@ -150,10 +269,10 @@ * For each deferred interrupt execute all the handlers at DIRQL. */ HalpPendingInterruptCount[i]--; - KiInterruptDispatch2(i + IRQ_BASE, NewIrql); + HalpHardwareInt[i](); } - KeGetPcr()->Irql--; - HalpEndSystemInterrupt(KeGetPcr()->Irql); + //KeGetPcr()->Irql--; + //HalpEndSystemInterrupt(KeGetPcr()->Irql); } } @@ -334,12 +453,13 @@ WRITE_PORT_UCHAR((PUCHAR)0x20,0x20); WRITE_PORT_UCHAR((PUCHAR)0xa0,0x20); } - +#if 0 if (KeGetPcr()->Irql >= Irql) { HalpPendingInterruptCount[irq]++; return(FALSE); } +#endif *OldIrql = KeGetPcr()->Irql; KeGetPcr()->Irql = Irql; Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=249…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Wed Nov 29 22:13:12 2006 @@ -29,16 +29,13 @@ // Ke: // - Figure out why the DPC stack doesn't really work. // - Add DR macro/save and VM macro/save. -// - New interrupt implementation. // - New optimized table-based tick-hashed timer implementation. // - New Thread Scheduler based on 2003. // - Implement KiCallbackReturn, KiGetTickCount, KiRaiseAssertion. // // Hal: // - New IRQL Implementation. -// - New PCI/Bus Handler Implementation. // - CMOS Initialization and CMOS Spinlock. -// - Timer/StallExecution Cleanup. // - Report resource usage to kernel (HalReportResourceUsage). // // Lpc: Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c Wed Nov 29 22:13:12 2006 @@ -369,7 +369,6 @@ /* Setup the IDT */ KeInitExceptions(); // ONCE HACK BELOW IS GONE, MOVE TO KISYSTEMSTARTUP! - KeInitInterrupts(); // ROS HACK DEPRECATED SOON BY NEW HAL /* Set up the VDM Data */ NtEarlyInitVdm(); Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/trap.s (original) +++ trunk/reactos/ntoskrnl/ke/i386/trap.s Wed Nov 29 22:13:12 2006 @@ -2010,15 +2010,14 @@ RELEASE_SPINLOCK(esi) /* Exit the interrupt */ - mov esi, $ cli call _HalEndSystemInterrupt@8 jmp _Kei386EoiHelper@0 SpuriousInt: /* Exit the interrupt */ + jmp $ add esp, 8 - mov esi, $ jmp _Kei386EoiHelper@0 #ifdef CONFIG_SMP Modified: trunk/reactos/ntoskrnl/ntoskrnl.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.def?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.def (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.def Wed Nov 29 22:13:12 2006 @@ -660,7 +660,6 @@ KiCheckForKernelApcDelivery@0 KiDeliverApc@12 KiDispatchInterrupt@0 -KiInterruptDispatch2@8 KiEnableTimerWatchdog KiIpiServiceRoutine@8 @KiReleaseSpinLock@4 Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Wed Nov 29 22:13:12 2006 @@ -36,7 +36,7 @@ <file>ctxswitch.S</file> <file>clock.S</file> <file>exp.c</file> - <!-- <file>irq.c</file> --> + <file>irq.c</file> <file>kiinit.c</file> <file>ldt.c</file> <file>mtrr.c</file> @@ -72,10 +72,6 @@ <file>thrdobj.c</file> <file>timer.c</file> <file>wait.c</file> - </directory> - <directory name="deprecated"> - <file>irqhand.S</file> - <file>irq.c</file> </directory> <directory name="cc"> <file>cacheman.c</file>
18 years
1
0
0
0
[greatlrd] 24971: fixing more of dections of DDCREATE_HARDWAREONLY and DDCREATE_EMULATIONONLY, we are now swicting betwin mix HEL and HAL, only HAL, or only HEL. But this is not complete yet
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Nov 29 22:12:06 2006 New Revision: 24971 URL:
http://svn.reactos.org/svn/reactos?rev=24971&view=rev
Log: fixing more of dections of DDCREATE_HARDWAREONLY and DDCREATE_EMULATIONONLY, we are now swicting betwin mix HEL and HAL, only HAL, or only HEL. But this is not complete yet Modified: trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Wed Nov 29 22:12:06 2006 @@ -499,65 +499,65 @@ /* Mix the DDExeBuf CALLBACKS */ - if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=3)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = This->lpLcl->lpDDCB->HALDDExeBuf.CanCreateExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; } - else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=2)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; } - if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=3)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = This->lpLcl->lpDDCB->HALDDExeBuf.CreateExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; } - else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=2)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; } - if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=3)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = This->lpLcl->lpDDCB->HALDDExeBuf.DestroyExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; } - else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=2)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; } - if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=3)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = This->lpLcl->lpDDCB->HALDDExeBuf.LockExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; } - else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=2)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; } - if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=3)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = This->lpLcl->lpDDCB->HALDDExeBuf.UnlockExecuteBuffer; This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; } - else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=2)) { This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer;
18 years
1
0
0
0
[greatlrd] 24970: fixing some of the mix betwin hel and hal. (still not complete) fixing some of dections of DDCREATE_HARDWAREONLY and DDCREATE_EMULATIONONLY, we are now swicting betwin mix HEL and HAL, only HAL, or only HEL. But this is not complete yet adding more comment so i do not forget in startuphal
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Nov 29 21:51:04 2006 New Revision: 24970 URL:
http://svn.reactos.org/svn/reactos?rev=24970&view=rev
Log: fixing some of the mix betwin hel and hal. (still not complete) fixing some of dections of DDCREATE_HARDWAREONLY and DDCREATE_EMULATIONONLY, we are now swicting betwin mix HEL and HAL, only HAL, or only HEL. But this is not complete yet adding more comment so i do not forget in startuphal Modified: trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Wed Nov 29 21:51:04 2006 @@ -170,9 +170,9 @@ This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; - /* Fixme the mix betwin hel and hal */ + /* Mix the DDCALLBACKS */ + This->lpLcl->lpDDCB->cbDDCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDCallbacks); - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=3)) { @@ -277,7 +277,520 @@ This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank; } - + /* Mix the DDSURFACE CALLBACKS */ + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDSurfaceCallbacks); + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = + This->lpLcl->lpDDCB->HALDDSurface.AddAttachedSurface; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = + This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = + This->lpLcl->lpDDCB->HALDDSurface.Blt; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = + This->lpLcl->lpDDCB->HELDDSurface.Blt; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = + This->lpLcl->lpDDCB->HALDDSurface.DestroySurface; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = + This->lpLcl->lpDDCB->HELDDSurface.DestroySurface; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = + This->lpLcl->lpDDCB->HALDDSurface.Flip; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = + This->lpLcl->lpDDCB->HELDDSurface.Flip; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = + This->lpLcl->lpDDCB->HALDDSurface.GetBltStatus; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = + This->lpLcl->lpDDCB->HELDDSurface.GetBltStatus; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = + This->lpLcl->lpDDCB->HALDDSurface.GetFlipStatus; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = + This->lpLcl->lpDDCB->HELDDSurface.GetFlipStatus; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = + This->lpLcl->lpDDCB->HALDDSurface.Lock; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = + This->lpLcl->lpDDCB->HELDDSurface.Lock; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = + This->lpLcl->lpDDCB->HALDDSurface.reserved4; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = + This->lpLcl->lpDDCB->HELDDSurface.reserved4; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = + This->lpLcl->lpDDCB->HALDDSurface.SetClipList; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = + This->lpLcl->lpDDCB->HELDDSurface.SetClipList; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = + This->lpLcl->lpDDCB->HALDDSurface.SetColorKey; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = + This->lpLcl->lpDDCB->HELDDSurface.SetColorKey; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = + This->lpLcl->lpDDCB->HALDDSurface.SetOverlayPosition; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = + This->lpLcl->lpDDCB->HELDDSurface.SetOverlayPosition; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = + This->lpLcl->lpDDCB->HALDDSurface.SetPalette; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = + This->lpLcl->lpDDCB->HELDDSurface.SetPalette; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = + This->lpLcl->lpDDCB->HALDDSurface.Unlock; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = + This->lpLcl->lpDDCB->HELDDSurface.Unlock; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = + This->lpLcl->lpDDCB->HALDDSurface.UpdateOverlay; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = + This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay; + } + + + /* Mix the DDPALETTE CALLBACKS + This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; + This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries; + This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); + */ + + /* Mix the DDExeBuf CALLBACKS */ + + if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.CanCreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; + } + else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; + } + + if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.CreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; + } + else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; + } + + if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.DestroyExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; + } + else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; + } + + if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.LockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; + } + else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; + } + + if (This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.UnlockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; + } + else if (This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; + } + + /* Fill some basic info for Surface */ + ddSurfGbl.lpDD = &ddgbl; + + /* FIXME + We need setup this also + This->lpLcl->lpDDCB->cbDDColorControlCallbacks + This->lpLcl->lpDDCB->cbDDKernelCallbacks + This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks + This->lpLcl->lpDDCB->cbDDMotionCompCallbacks + This->lpLcl->lpDDCB->cbDDVideoPortCallbacks + */ + + return DD_OK; +} + + +HRESULT WINAPI +StartDirectDrawHal(LPDIRECTDRAW* iface) +{ + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + DDHAL_GETDRIVERINFODATA DriverInfo; + + DDHALINFO mHALInfo; + DDHAL_CALLBACKS mCallbacks; + DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; + D3DHAL_CALLBACKS mD3dCallbacks; + D3DHAL_GLOBALDRIVERDATA mD3dDriverData; + UINT mcvmList; + VIDMEM *mpvmList; + + UINT mcFourCC; + DWORD *mpFourCC; + UINT mcTextures; + DDSURFACEDESC *mpTextures; + + /* HAL Startup process */ + BOOL newmode = FALSE; + + + RtlZeroMemory(&mHALInfo, sizeof(DDHALINFO)); + RtlZeroMemory(&mCallbacks, sizeof(DDHAL_CALLBACKS)); + + /* + Startup DX HAL step one of three + */ + if (!DdCreateDirectDrawObject(This->lpLcl->lpGbl, (HDC)This->lpLcl->hDC)) + { + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + return DD_FALSE; + } + + // Do not relase HDC it have been map in kernel mode + // DeleteDC(hdc); + + if (!DdReenableDirectDrawObject(This->lpLcl->lpGbl, &newmode)) + { + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + return DD_FALSE; + } + + + /* + Startup DX HAL step two of three + */ + + if (!DdQueryDirectDrawObject(This->lpLcl->lpGbl, + &mHALInfo, + &mCallbacks.HALDD, + &mCallbacks.HALDDSurface, + &mCallbacks.HALDDPalette, + &mD3dCallbacks, + &mD3dDriverData, + &mD3dBufferCallbacks, + NULL, + NULL, + NULL)) + { + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + mcvmList = mHALInfo.vmiData.dwNumHeaps; + mpvmList = (VIDMEM*) DxHeapMemAlloc(sizeof(VIDMEM) * mcvmList); + if (mpvmList == NULL) + { + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + mcFourCC = mHALInfo.ddCaps.dwNumFourCCCodes; + mpFourCC = (DWORD *) DxHeapMemAlloc(sizeof(DWORD) * mcFourCC); + if (mpFourCC == NULL) + { + DxHeapMemFree(mpvmList); + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + mcTextures = mD3dDriverData.dwNumTextureFormats; + mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * mcTextures); + if (mpTextures == NULL) + { + DxHeapMemFree( mpFourCC); + DxHeapMemFree( mpvmList); + DxHeapMemFree( This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + mHALInfo.vmiData.pvmList = mpvmList; + mHALInfo.lpdwFourCC = mpFourCC; + mD3dDriverData.lpTextureFormats = (DDSURFACEDESC*) mpTextures; + + if (!DdQueryDirectDrawObject( + This->lpLcl->lpGbl, + &mHALInfo, + &mCallbacks.HALDD, + &mCallbacks.HALDDSurface, + &mCallbacks.HALDDPalette, + &mD3dCallbacks, + &mD3dDriverData, + &mCallbacks.HALDDExeBuf, + (DDSURFACEDESC*)mpTextures, + mpFourCC, + mpvmList)) + + { + DxHeapMemFree(mpTextures); + DxHeapMemFree(mpFourCC); + DxHeapMemFree(mpvmList); + DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); + DeleteDC((HDC)This->lpLcl->hDC); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + /* + Copy over from HalInfo to DirectDrawGlobal + */ + + // this is wrong, cDriverName need be in ASC code not UNICODE + //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME); + + memcpy(&ddgbl.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO)); + memcpy(&ddgbl.ddCaps, &mHALInfo.ddCaps,sizeof(DDCORECAPS)); + + mHALInfo.dwNumModes = 1; + mHALInfo.lpModeInfo = This->lpLcl->lpGbl->lpModeInfo; + mHALInfo.dwMonitorFrequency = This->lpLcl->lpGbl->lpModeInfo[0].wRefreshRate; + + This->lpLcl->lpGbl->dwMonitorFrequency = mHALInfo.dwMonitorFrequency; + This->lpLcl->lpGbl->dwModeIndex = mHALInfo.dwModeIndex; + This->lpLcl->lpGbl->dwNumModes = mHALInfo.dwNumModes; + This->lpLcl->lpGbl->lpModeInfo = mHALInfo.lpModeInfo; + This->lpLcl->lpGbl->hInstance = mHALInfo.hInstance; + + This->lpLcl->lpGbl->lp16DD = This->lpLcl->lpGbl; + + + memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA)); + DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA); + DriverInfo.dwContext = This->lpLcl->lpGbl->hDD; + + /* Get the MiscellaneousCallbacks */ + DriverInfo.guidInfo = GUID_MiscellaneousCallbacks; + DriverInfo.lpvData = &ddgbl.lpDDCBtmp->HALDDMiscellaneous; + DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS); + mHALInfo.GetDriverInfo(&DriverInfo); + + + /* FIXME + The 3d and private data are not save at moment + + we need lest the private data being setup + for some driver are puting kmode memory there + the memory often contain the private struct + + surface, see MS DDK how MS example driver using + it + + the 3d interface are not so improten if u do not + want the 3d, and we are not writing 3d code yet + so we be okay for now. + */ + + + return DD_OK; +} + +HRESULT WINAPI +StartDirectDrawHel(LPDIRECTDRAW* iface) +{ + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + This->lpLcl->lpDDCB->HELDD.CanCreateSurface = HelDdCanCreateSurface; + This->lpLcl->lpDDCB->HELDD.CreateSurface = HelDdCreateSurface; + This->lpLcl->lpDDCB->HELDD.CreatePalette = HelDdCreatePalette; + This->lpLcl->lpDDCB->HELDD.DestroyDriver = HelDdDestroyDriver; + //This->lpLcl->lpDDCB->HELDD.FlipToGDISurface = HelDdFlipToGDISurface + This->lpLcl->lpDDCB->HELDD.GetScanLine = HelDdGetScanLine; + // This->lpLcl->lpDDCB->HELDD.SetColorKey = HelDdSetColorKey; + This->lpLcl->lpDDCB->HELDD.SetExclusiveMode = HelDdSetExclusiveMode; + This->lpLcl->lpDDCB->HELDD.SetMode = HelDdSetMode; + This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank; + + This->lpLcl->lpDDCB->HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE | + DDHAL_CB32_CREATESURFACE | + DDHAL_CB32_CREATEPALETTE | + DDHAL_CB32_DESTROYDRIVER | + // DDHAL_CB32_FLIPTOGDISURFACE | + DDHAL_CB32_GETSCANLINE | + // DDHAL_CB32_SETCOLORKEY | + DDHAL_CB32_SETEXCLUSIVEMODE | + DDHAL_CB32_SETMODE | + DDHAL_CB32_WAITFORVERTICALBLANK ; + + + This->lpLcl->lpDDCB->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD); + /* This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface; This->lpLcl->lpDDCB->HELDDSurface.Blt = HelDdSurfBlt; @@ -301,298 +814,6 @@ This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); */ - if (This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.CanCreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; - } - else if (This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; - } - - if (This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.CreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; - } - else if (This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; - } - - if (This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.DestroyExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; - } - else if (This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; - } - - if (This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.LockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; - } - else if (This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; - } - - if (This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.UnlockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; - } - else if (This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; - } - - /* Fill some basic info for Surface */ - ddSurfGbl.lpDD = &ddgbl; - - - return DD_OK; -} - - -HRESULT WINAPI -StartDirectDrawHal(LPDIRECTDRAW* iface) -{ - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DDHAL_GETDRIVERINFODATA DriverInfo; - - DDHALINFO mHALInfo; - DDHAL_CALLBACKS mCallbacks; - DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; - D3DHAL_CALLBACKS mD3dCallbacks; - D3DHAL_GLOBALDRIVERDATA mD3dDriverData; - UINT mcvmList; - VIDMEM *mpvmList; - - UINT mcFourCC; - DWORD *mpFourCC; - UINT mcTextures; - DDSURFACEDESC *mpTextures; - - /* HAL Startup process */ - BOOL newmode = FALSE; - - - RtlZeroMemory(&mHALInfo, sizeof(DDHALINFO)); - RtlZeroMemory(&mCallbacks, sizeof(DDHAL_CALLBACKS)); - - /* - Startup DX HAL step one of three - */ - if (!DdCreateDirectDrawObject(This->lpLcl->lpGbl, (HDC)This->lpLcl->hDC)) - { - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - return DD_FALSE; - } - - // Do not relase HDC it have been map in kernel mode - // DeleteDC(hdc); - - if (!DdReenableDirectDrawObject(This->lpLcl->lpGbl, &newmode)) - { - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - return DD_FALSE; - } - - - /* - Startup DX HAL step two of three - */ - - if (!DdQueryDirectDrawObject(This->lpLcl->lpGbl, - &mHALInfo, - &mCallbacks.HALDD, - &mCallbacks.HALDDSurface, - &mCallbacks.HALDDPalette, - &mD3dCallbacks, - &mD3dDriverData, - &mD3dBufferCallbacks, - NULL, - NULL, - NULL)) - { - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mcvmList = mHALInfo.vmiData.dwNumHeaps; - mpvmList = (VIDMEM*) DxHeapMemAlloc(sizeof(VIDMEM) * mcvmList); - if (mpvmList == NULL) - { - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mcFourCC = mHALInfo.ddCaps.dwNumFourCCCodes; - mpFourCC = (DWORD *) DxHeapMemAlloc(sizeof(DWORD) * mcFourCC); - if (mpFourCC == NULL) - { - DxHeapMemFree(mpvmList); - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mcTextures = mD3dDriverData.dwNumTextureFormats; - mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * mcTextures); - if (mpTextures == NULL) - { - DxHeapMemFree( mpFourCC); - DxHeapMemFree( mpvmList); - DxHeapMemFree( This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mHALInfo.vmiData.pvmList = mpvmList; - mHALInfo.lpdwFourCC = mpFourCC; - mD3dDriverData.lpTextureFormats = (DDSURFACEDESC*) mpTextures; - - if (!DdQueryDirectDrawObject( - This->lpLcl->lpGbl, - &mHALInfo, - &mCallbacks.HALDD, - &mCallbacks.HALDDSurface, - &mCallbacks.HALDDPalette, - &mD3dCallbacks, - &mD3dDriverData, - &mCallbacks.HALDDExeBuf, - (DDSURFACEDESC*)mpTextures, - mpFourCC, - mpvmList)) - - { - DxHeapMemFree(mpTextures); - DxHeapMemFree(mpFourCC); - DxHeapMemFree(mpvmList); - DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); - DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - /* - Copy over from HalInfo to DirectDrawGlobal - */ - - // this is wrong, cDriverName need be in ASC code not UNICODE - //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME); - - memcpy(&ddgbl.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO)); - memcpy(&ddgbl.ddCaps, &mHALInfo.ddCaps,sizeof(DDCORECAPS)); - - mHALInfo.dwNumModes = 1; - mHALInfo.lpModeInfo = This->lpLcl->lpGbl->lpModeInfo; - mHALInfo.dwMonitorFrequency = This->lpLcl->lpGbl->lpModeInfo[0].wRefreshRate; - - This->lpLcl->lpGbl->dwMonitorFrequency = mHALInfo.dwMonitorFrequency; - This->lpLcl->lpGbl->dwModeIndex = mHALInfo.dwModeIndex; - This->lpLcl->lpGbl->dwNumModes = mHALInfo.dwNumModes; - This->lpLcl->lpGbl->lpModeInfo = mHALInfo.lpModeInfo; - This->lpLcl->lpGbl->hInstance = mHALInfo.hInstance; - - This->lpLcl->lpGbl->lp16DD = This->lpLcl->lpGbl; - - - memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA)); - DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA); - DriverInfo.dwContext = This->lpLcl->lpGbl->hDD; - - /* Get the MiscellaneousCallbacks */ - DriverInfo.guidInfo = GUID_MiscellaneousCallbacks; - DriverInfo.lpvData = &ddgbl.lpDDCBtmp->HALDDMiscellaneous; - DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS); - mHALInfo.GetDriverInfo(&DriverInfo); - - - return DD_OK; -} - -HRESULT WINAPI -StartDirectDrawHel(LPDIRECTDRAW* iface) -{ - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - - This->lpLcl->lpDDCB->HELDD.CanCreateSurface = HelDdCanCreateSurface; - This->lpLcl->lpDDCB->HELDD.CreateSurface = HelDdCreateSurface; - This->lpLcl->lpDDCB->HELDD.CreatePalette = HelDdCreatePalette; - This->lpLcl->lpDDCB->HELDD.DestroyDriver = HelDdDestroyDriver; - //This->lpLcl->lpDDCB->HELDD.FlipToGDISurface = HelDdFlipToGDISurface - This->lpLcl->lpDDCB->HELDD.GetScanLine = HelDdGetScanLine; - // This->lpLcl->lpDDCB->HELDD.SetColorKey = HelDdSetColorKey; - This->lpLcl->lpDDCB->HELDD.SetExclusiveMode = HelDdSetExclusiveMode; - This->lpLcl->lpDDCB->HELDD.SetMode = HelDdSetMode; - This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank; - - This->lpLcl->lpDDCB->HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE | - DDHAL_CB32_CREATESURFACE | - DDHAL_CB32_CREATEPALETTE | - DDHAL_CB32_DESTROYDRIVER | - // DDHAL_CB32_FLIPTOGDISURFACE | - DDHAL_CB32_GETSCANLINE | - // DDHAL_CB32_SETCOLORKEY | - DDHAL_CB32_SETEXCLUSIVEMODE | - DDHAL_CB32_SETMODE | - DDHAL_CB32_WAITFORVERTICALBLANK ; - - - This->lpLcl->lpDDCB->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD); - - /* - This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface; - This->lpLcl->lpDDCB->HELDDSurface.Blt = HelDdSurfBlt; - This->lpLcl->lpDDCB->HELDDSurface.DestroySurface = HelDdSurfDestroySurface; - This->lpLcl->lpDDCB->HELDDSurface.Flip = HelDdSurfFlip; - This->lpLcl->lpDDCB->HELDDSurface.GetBltStatus = HelDdSurfGetBltStatus; - This->lpLcl->lpDDCB->HELDDSurface.GetFlipStatus = HelDdSurfGetFlipStatus; - This->lpLcl->lpDDCB->HELDDSurface.Lock = HelDdSurfLock; - This->lpLcl->lpDDCB->HELDDSurface.reserved4 = HelDdSurfreserved4; - This->lpLcl->lpDDCB->HELDDSurface.SetClipList = HelDdSurfSetClipList; - This->lpLcl->lpDDCB->HELDDSurface.SetColorKey = HelDdSurfSetColorKey; - This->lpLcl->lpDDCB->HELDDSurface.SetOverlayPosition = HelDdSurfSetOverlayPosition; - This->lpLcl->lpDDCB->HELDDSurface.SetPalette = HelDdSurfSetPalette; - This->lpLcl->lpDDCB->HELDDSurface.Unlock = HelDdSurfUnlock; - This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay; - */ - - /* - This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; - This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries; - This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); - */ - /* This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer = HelDdExeCanCreateExecuteBuffer; This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer = HelDdExeCreateExecuteBuffer;
18 years
1
0
0
0
[ion] 24969: - Fix again
by ion@svn.reactos.org
Author: ion Date: Wed Nov 29 20:57:56 2006 New Revision: 24969 URL:
http://svn.reactos.org/svn/reactos?rev=24969&view=rev
Log: - Fix again Modified: trunk/reactos/hal/halx86/mp/halinit.c Modified: trunk/reactos/hal/halx86/mp/halinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/halinit.c?re…
============================================================================== --- trunk/reactos/hal/halx86/mp/halinit.c (original) +++ trunk/reactos/hal/halx86/mp/halinit.c Wed Nov 29 20:57:56 2006 @@ -93,7 +93,7 @@ } /* Initialize the PICs */ - HalpInitPICs(); + //HalpInitPICs(); /* Force initial PIC state */ KfRaiseIrql(KeGetCurrentIrql());
18 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
33
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Results per page:
10
25
50
100
200