Compare commits

...

2916 Commits

Author SHA1 Message Date
Gé van Geldorp
462609b831 Release version preparation
svn path=/branches/ros-branch-0_2_3/; revision=9910
2004-06-27 20:57:51 +00:00
Eric Kohl
b54ce3f58d Revert relocator fix.
svn path=/branches/ros-branch-0_2_3/; revision=9907
2004-06-27 12:28:52 +00:00
Eric Kohl
ff923f3b3d Stop at the real end of the relocation table.
svn path=/branches/ros-branch-0_2_3/; revision=9882
2004-06-26 11:24:42 +00:00
Eric Kohl
8ab68f83ec Fix crash in loader relocation code.
svn path=/branches/ros-branch-0_2_3/; revision=9873
2004-06-25 19:01:51 +00:00
Gé van Geldorp
0cc580bc78 Code freeze --> RC2
svn path=/branches/ros-branch-0_2_3/; revision=9847
2004-06-23 21:50:19 +00:00
Gé van Geldorp
bbb635a45d Create temp directory
svn path=/branches/ros-branch-0_2_3/; revision=9832
2004-06-23 16:44:26 +00:00
Gé van Geldorp
d6c9ddd0f2 Put Command Prompt link on Administrators desktop
svn path=/branches/ros-branch-0_2_3/; revision=9828
2004-06-23 10:23:08 +00:00
Gé van Geldorp
e3d1315034 Remove duplicate "All Users" path component
svn path=/branches/ros-branch-0_2_3/; revision=9827
2004-06-23 10:20:53 +00:00
Gé van Geldorp
8faa2e3ef5 Update version number to 0.2.x
svn path=/branches/ros-branch-0_2_3/; revision=9816
2004-06-22 23:27:12 +00:00
Gé van Geldorp
aaa1b2b5a6 Merge from HEAD:
- Convert between RGBQUAD and PALETTEENTRY

svn path=/branches/ros-branch-0_2_3/; revision=9815
2004-06-22 20:09:59 +00:00
Martin Fuchs
bd1b0ce302 disable explorer sidebar in SDI mode
svn path=/branches/ros-branch-0_2_3/; revision=9802
2004-06-21 19:31:16 +00:00
Gé van Geldorp
1ec70212e9 Merge from HEAD:
- Prefer non-topmost windows when activating another window

svn path=/branches/ros-branch-0_2_3/; revision=9777
2004-06-20 22:27:54 +00:00
Gé van Geldorp
15e91de079 Merge from HEAD:
- Don't activate invisible windows

svn path=/branches/ros-branch-0_2_3/; revision=9775
2004-06-20 22:25:52 +00:00
Gé van Geldorp
73f910f6ec Merge from HEAD:
- Activate window on non-client click too

svn path=/branches/ros-branch-0_2_3/; revision=9766
2004-06-20 16:27:50 +00:00
Filip Navara
15576a6c36 Merge from HEAD:
- Fixed NtUserDestroyWindow to correctly destroy owned windows. Fixes bugs #342 and #350.

svn path=/branches/ros-branch-0_2_3/; revision=9759
2004-06-20 12:55:08 +00:00
Filip Navara
dc00e1d093 Merge from HEAD:
- Fixed memory corruption in IopInitializeBuiltinDriver.

svn path=/branches/ros-branch-0_2_3/; revision=9758
2004-06-20 12:54:09 +00:00
Filip Navara
a2de7a31f7 Merge from HEAD:
- Use raw size for image sections if virtual size isn't specified. Patch by Nathan Lineback <lineback@toastytech.com> from BugZilla #364.

svn path=/branches/ros-branch-0_2_3/; revision=9757
2004-06-20 12:53:39 +00:00
Filip Navara
b0e3c8ace6 Merge from HEAD:
- Call the "load default cursor" callback. Fixes bug #358.

svn path=/branches/ros-branch-0_2_3/; revision=9756
2004-06-20 12:52:56 +00:00
Filip Navara
db58e88c54 Merge from HEAD:
- Corrected shell paths.

svn path=/branches/ros-branch-0_2_3/; revision=9755
2004-06-20 12:51:55 +00:00
Filip Navara
216afa0719 Merge from HEAD:
- Fixed compilation problems with MinGW runtime 3.3.

svn path=/branches/ros-branch-0_2_3/; revision=9754
2004-06-20 12:51:04 +00:00
Martin Fuchs
3c3ef25598 fix opening explorer sub folders in MDI mode - problem spotted and debugged by Ge van Geldorp
svn path=/branches/ros-branch-0_2_3/; revision=9750
2004-06-20 12:11:13 +00:00
Gé van Geldorp
4de4deacae Reserve ordinals 90 and 91. Fixes bug 182.
svn path=/branches/ros-branch-0_2_3/; revision=9748
2004-06-20 10:40:39 +00:00
Gé van Geldorp
c55ea84429 Handle ordinals which are not exported
svn path=/branches/ros-branch-0_2_3/; revision=9746
2004-06-20 10:37:20 +00:00
Filip Navara
2de346d014 - Force importing _vsnprintf from MSVCRT. The NTDLL version doesn't support %f specifiers.
svn path=/branches/ros-branch-0_2_3/; revision=9729
2004-06-19 17:59:56 +00:00
Filip Navara
7f481ed0d0 - VideoPortInt10 should copy back the output registers to caller.
svn path=/branches/ros-branch-0_2_3/; revision=9711
2004-06-18 17:19:45 +00:00
Martin Fuchs
119b4396b2 re-enable DesktopWindow::OnDefaultCommand to open explorer windows on desktop double clicks
svn path=/branches/ros-branch-0_2_3/; revision=9708
2004-06-18 16:53:28 +00:00
Filip Navara
5312ab85dc - Map correct amount of the video memory.
svn path=/branches/ros-branch-0_2_3/; revision=9704
2004-06-18 15:50:12 +00:00
Eric Kohl
6de8ac1660 Disable non-functional settings pages (Computer, Display and Keyboard settings).
svn path=/branches/ros-branch-0_2_3/; revision=9701
2004-06-17 18:31:14 +00:00
Eric Kohl
fd6a5d6d4c Add missing nls settings for Great Britain.
This fixes bug #344.

svn path=/branches/ros-branch-0_2_3/; revision=9699
2004-06-17 18:28:15 +00:00
Eric Kohl
b6e54c6e5b Fix typos.
svn path=/branches/ros-branch-0_2_3/; revision=9697
2004-06-17 10:51:45 +00:00
Filip Navara
5995e56ce2 - Change build type to RC1 on release branch.
svn path=/branches/ros-branch-0_2_3/; revision=9692
2004-06-16 21:49:29 +00:00
The ReactOS Team
d0404923d7 This commit was manufactured by cvs2svn to create branch
'ros-branch-0_2_3'.

svn path=/branches/ros-branch-0_2_3/; revision=9689
2004-06-16 18:50:19 +00:00
Gé van Geldorp
0a30ec98a3 Update porting status
svn path=/trunk/; revision=9688
2004-06-16 18:50:19 +00:00
Gé van Geldorp
b3e8303421 Sync to Wine-20040615:
Robert Reif <reif@earthlink.net>
- Added some trace and debug printing.
- Fixed a problem were a trace accesses a data member that may be
  outside of the actual data structure passed in.
- Added some more debug traces.
- Don't try to map the mapper device.
Mike McCormack <mike@codeweavers.com>
- Fix PlaySound.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- Fixed missing inversion in bit manipulation.
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.

svn path=/trunk/; revision=9686
2004-06-16 18:48:46 +00:00
Gé van Geldorp
a41cfac6b9 Sync to Wine-20040615:
Robert Reif <reif@earthlink.net>
- Added tracing to all functions.
- Added error explanations.
- Changed debug channel from msacm to wavemap so not confused with
  msacm.
- Handle case where partial structure update requested.
- Minor white space cleanup.
- Returns proper error code when trying to get caps when no devices
  present.
- Fixed a bug where wrong a return value was returned when mapping is
  not possible.

svn path=/trunk/; revision=9685
2004-06-16 18:40:05 +00:00
Gé van Geldorp
fd397eeccd Sync to Wine-20040615:
Hans Leidekker <hans@it.vu.nl>
- Link to ntdll.
Raphael Junqueira <fenix@club-internet.fr>
- Stub for SHFlushSFCacheWrap.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Stefan Leichter <Stefan.Leichter@camLine.com>
- Moved stub of StopWatch from ascii to unicode.

svn path=/trunk/; revision=9684
2004-06-16 18:27:33 +00:00
Gé van Geldorp
2b3293eb3a Sync to Wine-20040615:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix ref count on standard proxy creation.
- Release channel buffer in StdMarshal_UnmarshalInterface, since we no
  longer use it and the proxy should have taken a reference on it.
- Add a few comments.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.

svn path=/trunk/; revision=9683
2004-06-16 18:21:24 +00:00
Gé van Geldorp
129d08fec4 Sync to Wine-20040615:
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.

svn path=/trunk/; revision=9682
2004-06-16 18:13:23 +00:00
Filip Navara
4addf164b6 - Disable the "Floppy count: x" debug message.
svn path=/trunk/; revision=9681
2004-06-16 16:59:27 +00:00
Gé van Geldorp
92599b546e Sync to Wine-20040615:
Marcus Meissner <marcus@jet.franken.de>
- Revert broken strict aliasing fix.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix ref count on standard proxy creation.
- Release channel buffer in StdMarshal_UnmarshalInterface, since we no
  longer use it and the proxy should have taken a reference on it.
- Add a few comments.
- Fixed CoMarshalInterThreadInterfaceInStream and
  CoGetInterfaceAndReleaseStream.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.

svn path=/trunk/; revision=9680
2004-06-16 07:06:50 +00:00
Gé van Geldorp
6c4df3df68 Sync to Wine-20040615:
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
- WNetGetConnection(): use QueryDosDevice to return a fake remote name
  instead of the drive label.

svn path=/trunk/; revision=9679
2004-06-16 06:58:48 +00:00
Gé van Geldorp
e054bf54e2 Sync to Wine-20040615:
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.
Ilya Korniyko <k_ilya@ukr.net>
- Encoding fixes in Ukrainian translation.
Wolfgang Schwotzer <wolfgang.schwotzer@gmx.net>
- Support lpstrCustomFilter and return nFilterIndex in file dialog.
Rein Klazes <rklazes@xs4all.nl>
- In FILEDLG_ScanDir do not try to set the current directory to a path
  that is empty.

svn path=/trunk/; revision=9678
2004-06-16 06:54:39 +00:00
Gé van Geldorp
11761ed436 Sync to Wine-20040615:
Maxime Bellenge <maxime.bellenge@laposte.net>
- Implemented PSH_WIZARD97_OLD and PSH_WIZARD97_NEW property sheet
  styles.
- Add DT_END_ELLIPSIS as defaut style for text.
Ilya Korniyko <k_ilya@ukr.net>
- Encoding fixes in Ukrainian translation.
Filip Navara <xnavara@volny.cz>
- Let the subclassing stack grow the opposite way to make the code
  more transparent.
- Remove SubclassWndProc and move its logic to DefSubclassProc.
Dimitrie O. Paun <dpaun@rogers.com>
- Clear the state image bits only if LVS_EX_CHECKBOXES is set.
- Fix obvious logical error in focus handling.
- Indentation and formatting fixes.
- (based on a patch by Krishna Murthy).
Ulrich Czekalla <ulrich@codeweavers.com>
- Handle case where iterator range contains 0 elements.
- Handle case when item text is empty.
  According to MSDN, length should be returned when lParam is NULL.
Patrik Stridvall <ps@leissner.se>
- StrSpnW doesn't exist in comctl32.dll but StrCSpnW does.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implemented TCM_SETITEMEXTRA.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Don't draw whole button pressed when separate dropdown pressed, just
  the separate dropdown itself.
- TBN_DRAGOUT and NM_RDBLCLK notifications.
- Remove unneeded member of private toolbar struct.

svn path=/trunk/; revision=9677
2004-06-16 06:46:13 +00:00
Gé van Geldorp
dc9dfeec01 Remove debug stuff accidentaly left in
svn path=/trunk/; revision=9676
2004-06-16 06:18:14 +00:00
Gé van Geldorp
fbfd3a4820 Marshall WM_CREATE/WM_NCCREATE messages
svn path=/trunk/; revision=9675
2004-06-16 06:09:40 +00:00
Gé van Geldorp
3cca4fd859 Build "new" floppy driver instead of non-functional "old" one
svn path=/trunk/; revision=9674
2004-06-15 22:33:47 +00:00
Eric Kohl
2fbcaac90d Detect floppy disk drives.
svn path=/trunk/; revision=9673
2004-06-15 12:22:19 +00:00
Hartmut Birr
cfef139c5b - Reduced the size of the necessary inquiry data length to recognize a device as valid.
svn path=/trunk/; revision=9672
2004-06-15 09:29:41 +00:00
Hartmut Birr
4536f9c25b - Interpret the sign for qualifier 'l'.
svn path=/trunk/; revision=9671
2004-06-15 08:53:53 +00:00
Hartmut Birr
aefc8f79e7 - Initialized the variable status to get on success a proper return value.
svn path=/trunk/; revision=9670
2004-06-15 08:17:23 +00:00
Art Yerkes
5fd39d97bb recv now works every time
- Standardized on recvfrom request and reply everywhere
- Added a continuous parameter to FillWSABuffers for stream sockets
- Added function TryToSatisfyRecvRequest
- Create MDLs for the WSABUFS.  These are needed because we aren't in our
  home process when tcpip calls back with data.
- Removed extraneous and potentially confusing lock ReadRequestQueueLock
  Now both ReadRequestQueue and ReceiveQueue rely on ReceiveQueueLock

svn path=/trunk/; revision=9669
2004-06-15 02:56:13 +00:00
Filip Navara
9725dc0746 - Update trasformation matrix in SetViewportOrgEx.
svn path=/trunk/; revision=9668
2004-06-14 20:58:51 +00:00
Filip Navara
4cb0e04a46 - Packing fixes
svn path=/trunk/; revision=9667
2004-06-14 20:05:00 +00:00
Art Yerkes
0999a0ef81 Preliminary version of recv.
svn path=/trunk/; revision=9666
2004-06-14 03:22:27 +00:00
Art Yerkes
f773e32aab rawip: Removed the deallocation of the client-supplied mdl. This does not
appear to be part of the definition and is not done in the UDP case.
event: I moved the close notify into it's own function so that it can be
worked on separately.

svn path=/trunk/; revision=9665
2004-06-14 01:40:48 +00:00
Filip Navara
6435dec245 - Compile kernel32 using w32api.
- Fixed some packing issues in DDK headers (more to come).

svn path=/trunk/; revision=9664
2004-06-13 20:04:56 +00:00
Filip Navara
3aa5dd5be2 - Fixed list traversing in MmAlterRegion to correctly handle Length that is greater than real memory area size.
svn path=/trunk/; revision=9663
2004-06-13 14:05:53 +00:00
Martin Fuchs
1a9133bf9b Unicode fix
svn path=/trunk/; revision=9662
2004-06-13 12:56:39 +00:00
Martin Fuchs
9ca2c517db XMLStorage update: XMLReaderBase
svn path=/trunk/; revision=9661
2004-06-13 12:45:29 +00:00
Filip Navara
ebb7ad1e4a - Fixed prototypes of NtAddAtom, NtFindAtom, NtProtectVirtualMemory and KeQueryInterruptTime.
svn path=/trunk/; revision=9660
2004-06-13 10:35:53 +00:00
Art Yerkes
25ae3e20a7 Removed redundant tracking (now incorporated into NdisAllocatePacket, etc)
that was causing a bugcheck in the 'ping to us' case.  The memory was detected
tracked twice (correctly).

This condition was detected by mifritcher after I checked in.

svn path=/trunk/; revision=9659
2004-06-12 04:46:18 +00:00
Gé van Geldorp
57c3c75356 Set MaximumLength to size of allocated memory
svn path=/trunk/; revision=9658
2004-06-11 20:15:07 +00:00
Gé van Geldorp
b2e222b305 Patch by Michael Fritscher <michael@fritscher.net>
Add /? and /s cmdline options

svn path=/trunk/; revision=9657
2004-06-11 14:10:12 +00:00
Gé van Geldorp
58b454b469 Patch by Michael Fritscher <michael@fritscher.net>
Fix CVS warnings.

svn path=/trunk/; revision=9656
2004-06-11 13:59:16 +00:00
Eric Kohl
839baba4ae The root bus driver should return an empty resource list on IRP_MN_QUERY_RESOURCES.
svn path=/trunk/; revision=9655
2004-06-11 09:33:42 +00:00
Gé van Geldorp
ab0a1921c1 Prevent CVS warnings about .*.d files
svn path=/trunk/; revision=9654
2004-06-11 09:10:17 +00:00
Eric Kohl
fbda4aa735 Retrieve Hardware IDs and Compatible IDs from the bus driver and attach them to the device node.
svn path=/trunk/; revision=9653
2004-06-10 11:00:28 +00:00
Hartmut Birr
00df170a8a - Enabled the dependency check for the storage drivers.
svn path=/trunk/; revision=9652
2004-06-10 08:20:20 +00:00
Hartmut Birr
5f843bef93 - Use a bitmap for managing the srb extensions.
- Removed the complete request and next request counter.
  The counters are always wrong, because some miniport drivers fires up
  to much notification requests.
- Enable the queues for the miniport driver, if they are supported.
- Fixed a bug in ScsiPortCompleteRequest.

svn path=/trunk/; revision=9651
2004-06-10 08:14:57 +00:00
Hartmut Birr
b5273a652c - Allocate for each srb its one sense info buffer.
- Reinitialize the transfer size if a retry is necessary in ScsiClassSendSrbSynchronous.

svn path=/trunk/; revision=9650
2004-06-10 07:56:42 +00:00
Hartmut Birr
c3e66860e4 - Exchanged source and target in WRITE_REGISTER_BUFFER_xxx.
svn path=/trunk/; revision=9649
2004-06-10 07:50:30 +00:00
Steven Edwards
5298bf9c05 added \n for DPRINT
svn path=/trunk/; revision=9648
2004-06-09 20:39:41 +00:00
Art Yerkes
c1d0686eaa This is a merge onto head of the last two months worth of changes to the
networking code.

There is individual change info on the branch arty_20040329.

Here is a summary of what changed:

tcpip:

- Added a mostly working transport/tcp branch based on oskittcp
  (checked in at drivers/lib/oskittcp).  This code shares almost nothing
  with the previous version.

- Regularized IRP handling

- Fixed ownership of buffers throughout tcpip.sys.  Buffers are now
  required to be copied in a few more cases, but everybody can call
  anybody else and not have to worry about keeping a buffer alive
  for any specific reason.

- Also moved lots more operations onto the stack (small datastructures
  and pointers).  This will result in a further simplification of the
  code here.

- Made each completion routine solely responsible for freeing memory
  from the corresponding action.

- Removed reference counted small address structures in favor if inlines

- Changed and clarified ownership rules almost everwhere

- Fixed a few more type punning style errors

- Added more info used by iphlpapi

- Added some memory tracing stuff

ndis:

- Fixed one or two type punning errors

ws2_32:

- Added getservbyname and getprotobyname (partial)

oskittcp:

- Diagnostics everywhere

- Eliminated dependence on raw_ip input

- Simplified buffering and signalling model a bit

- Added memory checking as in tcpip

- more to come

svn path=/trunk/; revision=9647
2004-06-09 18:11:39 +00:00
Eric Kohl
25e4bf3404 Build Hardware IDs and Compatible IDs for PCI devices.
svn path=/trunk/; revision=9646
2004-06-09 14:22:53 +00:00
Filip Navara
869566fc97 - Correctly set Irp->IoStatus.Information when handling IOCTL_BOOTVID_INITIALIZE request. This fixes the occasional page faults during bugchecks when NTOSKRNL:InbvResetDisplay tried to call function pointed by uninitialized variable.
svn path=/trunk/; revision=9645
2004-06-08 19:31:10 +00:00
Hartmut Birr
a51ef0df37 - Fixed the counting of pending irps.
svn path=/trunk/; revision=9644
2004-06-07 20:03:00 +00:00
Filip Navara
ba3d08e286 - Fixed redefinition of VERSION.
svn path=/trunk/; revision=9643
2004-06-07 18:03:12 +00:00
Filip Navara
4400aed363 - Include bootdata/hiveinst.inf when building the Live CD registry hives.
svn path=/trunk/; revision=9642
2004-06-07 17:31:50 +00:00
Hartmut Birr
da9b36f495 - Implemented ScsiPortCompleteRequest.
- Fixed the calculation of the max transfer size.
- Rewrote parts of SpiScanAdapter and SpiSendInquiry to speed up device detection.
- Fixed the handling of sense info data for HBA's which are auto request sense capability.
- Added some more debug messages.

svn path=/trunk/; revision=9641
2004-06-07 16:37:07 +00:00
Eric Kohl
5dabb7db10 Implement mouse driver autodetection and installation.
svn path=/trunk/; revision=9640
2004-06-07 12:24:00 +00:00
Hartmut Birr
440fa78c14 - Check if the temp directory exist, if not use the current directory.
svn path=/trunk/; revision=9639
2004-06-06 17:33:13 +00:00
Hartmut Birr
4a7c01adb6 - Cancelled my last change.
svn path=/trunk/; revision=9638
2004-06-06 17:29:57 +00:00
Eric Kohl
36b12d1025 Use hardware description if available to initialize the serial mouse port.
svn path=/trunk/; revision=9637
2004-06-06 15:55:03 +00:00
Hartmut Birr
1d4397159c - Allocate memory for mdl's for paging io from stack instead of the non paged pool.
svn path=/trunk/; revision=9636
2004-06-06 09:13:21 +00:00
Hartmut Birr
efc9160052 - Get first the parameters and do then the processing.
svn path=/trunk/; revision=9635
2004-06-06 09:05:21 +00:00
Hartmut Birr
5c92baff3c - Fixed the set command for WinXP.
- The second parameter must be zero in the call to SetEnvironmentVariable
  if the variable should be deleted.

svn path=/trunk/; revision=9634
2004-06-06 09:03:07 +00:00
Hartmut Birr
fbd64e0eb9 - Removed MakeSureDirectoryPathExistsEx.
- Use the current directory if GetTempPath fails.
- Inherit the handles to the child process (in Execute).
- Assume that the current process is always a console process if ntdll exist
  but not contains the functions NtQueryInformationProcess or NtReadVirtualMemory.

svn path=/trunk/; revision=9633
2004-06-06 08:58:56 +00:00
Hartmut Birr
419db01ef7 - Check if the temp path exist in GetTempPathW.
svn path=/trunk/; revision=9632
2004-06-06 08:50:26 +00:00
Hartmut Birr
353214e42e - Allocate memory for mdl's for paging io from stack instead of the non paged pool.
svn path=/trunk/; revision=9631
2004-06-06 08:36:31 +00:00
Hartmut Birr
3b09731efb - Store page numbers instead of physical address's within mdls.
svn path=/trunk/; revision=9630
2004-06-06 07:52:22 +00:00
Hartmut Birr
b4d6f4e01a - Added the dependence files to the clean target.
svn path=/trunk/; revision=9629
2004-06-05 20:10:41 +00:00
Hartmut Birr
113740ebbd - Fixed the start offset of a partition within an extended partition (in xHalIoWritePartitionTable).
svn path=/trunk/; revision=9628
2004-06-05 20:05:06 +00:00
Eric Kohl
1d623bc9b8 Store serial port identifiers at controller keys.
svn path=/trunk/; revision=9627
2004-06-05 19:52:23 +00:00
Hartmut Birr
893efd8a1f - Added a check for a waitable objects in NtWaitForSingleObject and NtWaitForMultipleObjects.
svn path=/trunk/; revision=9626
2004-06-05 18:52:35 +00:00
Filip Navara
6110c706c4 - Fixed getting of menu item texts in GetMenuItemInfo[AW]. Fixes bug #316.
- Fixed memory leak in MenuDrawPopupMenu.

svn path=/trunk/; revision=9625
2004-06-05 18:39:46 +00:00
Casper Hornstrup
037ba1baea Revert:
2004-06-05  Casper S. Hornstrup  <chorns@users.sourceforge.net>

	* Makefile: Split target all into three parts, one that must be executed
	alone and two that can be executed concurrently.

svn path=/trunk/; revision=9624
2004-06-05 13:39:02 +00:00
Hartmut Birr
c81a4db568 - Changed back to the old variable NASM_CMD.
svn path=/trunk/; revision=9623
2004-06-05 12:06:41 +00:00
Casper Hornstrup
f30f61c8fa 2004-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Split target all into three parts, one that must be executed
	alone and two that can be executed concurrently.

svn path=/trunk/; revision=9622
2004-06-05 11:11:13 +00:00
Casper Hornstrup
97d7e660f0 2004-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Skip automatic dependency tracking if
	DEPENDENCIES=no.

svn path=/trunk/; revision=9621
2004-06-05 10:47:27 +00:00
Hartmut Birr
f79f677f01 - Added a comment for NASM_CMD.
svn path=/trunk/; revision=9620
2004-06-05 10:21:59 +00:00
Hartmut Birr
c530406b93 - Changed back to the old variable NASM_CMD.
svn path=/trunk/; revision=9619
2004-06-05 09:47:36 +00:00
Filip Navara
73dfa9e66a - Disable paging file for Live CD.
svn path=/trunk/; revision=9618
2004-06-05 09:35:52 +00:00
Filip Navara
f3f89873bd - Report the /MININT option for Live CD boots.
svn path=/trunk/; revision=9617
2004-06-05 09:35:51 +00:00
Hartmut Birr
3d8820b2b1 - Added the '<>|' key.
svn path=/trunk/; revision=9616
2004-06-05 09:08:58 +00:00
Filip Navara
39ff6d3136 - Fixed calculation of MFT record size.
- Fixed attribute finding/dumping bounds checking.
- Fixed reading of volume information MFT record.
- Disabled debug messages.

svn path=/trunk/; revision=9615
2004-06-05 08:28:37 +00:00
Filip Navara
70dfb7876f Merged changes from joliet_20040527 branch:
- Experimental Joliet generating support.
- Fixed cdname_exists to check only entries in specific directory.
- Move the DIRECTORY_FLAG logic to parse_filename_into_dirrecord.

svn path=/trunk/; revision=9614
2004-06-04 23:50:15 +00:00
Filip Navara
b820cca03e - Process the "DelReg" section in .inf files.
svn path=/trunk/; revision=9613
2004-06-04 23:47:04 +00:00
Filip Navara
fe2abd0550 - Support expanding environment variables in the setup command line.
svn path=/trunk/; revision=9612
2004-06-04 23:46:02 +00:00
Filip Navara
a880f2ee82 - Basic Live CD building infrastructure.
svn path=/trunk/; revision=9611
2004-06-04 23:44:27 +00:00
Thomas Bluemel
320eabb37f added missing cvsignore file
svn path=/trunk/; revision=9610
2004-06-04 13:49:15 +00:00
Thomas Bluemel
4358005fe4 fixed wrong directory for kbddv. Thanks to ai2097.
svn path=/trunk/; revision=9609
2004-06-04 13:30:27 +00:00
KJK::Hyperion
8a4f16c276 Fixed compilation in environments where the native non-local goto isn't available
svn path=/trunk/; revision=9608
2004-06-04 00:49:40 +00:00
KJK::Hyperion
31af77a32a Setjmp has one argument and returns zero
svn path=/trunk/; revision=9607
2004-06-04 00:47:47 +00:00
KJK::Hyperion
6312f5152f "Using multiple compilers is good for your code", chapter umpteenth: removing the SEH library test (until I have a better example) because it made some non-portable assumptions about the stack layout (could cause STATUS_INVALID_UNWIND_TARGET exceptions with some compilers and full optimization)
svn path=/trunk/; revision=9606
2004-06-03 22:30:22 +00:00
KJK::Hyperion
f739268bbb Fixes for Borland C++ compilation, and one variable is now qualified "volatile" to disable dangerous optimizations
svn path=/trunk/; revision=9603
2004-06-03 22:19:10 +00:00
Eric Kohl
df6802c1fd Add US-Dvorak keyboard layout and enable swedish keyboard layout.
Patch by ai2097.
This fixes bug #329.

svn path=/trunk/; revision=9602
2004-06-03 11:20:10 +00:00
KJK::Hyperion
1d286fa480 Small test case for the SEH library
svn path=/trunk/; revision=9601
2004-06-03 04:15:40 +00:00
KJK::Hyperion
6ce11dc878 Small fixes to the SEH library
svn path=/trunk/; revision=9600
2004-06-03 04:14:07 +00:00
KJK::Hyperion
cb341561af Corrected a stupid mistake
Modified the build system to make kernel-mode components use the SEH library's built-in setjmp/longjmp

svn path=/trunk/; revision=9599
2004-06-03 03:09:01 +00:00
KJK::Hyperion
ce86f5b576 Final touches to the SEH library: now comes with a very basic setjmp/longjmp implementation for when the compiler's native one can't be used
svn path=/trunk/; revision=9598
2004-06-03 02:23:34 +00:00
Eric Kohl
ecc193a6f0 Revert useless changes.
svn path=/trunk/; revision=9597
2004-06-02 22:19:54 +00:00
Eric Kohl
f472268186 Set selected keyboard layout and install language.
svn path=/trunk/; revision=9596
2004-06-02 22:18:06 +00:00
Eric Kohl
d311d3a57f Keep zero-initialized varaibles in the .data section.
svn path=/trunk/; revision=9595
2004-06-02 20:37:46 +00:00
Hartmut Birr
e0027b1777 - Fixed the searching for boot load drivers. This solves the pci driver loading problem.
svn path=/trunk/; revision=9594
2004-06-02 20:30:56 +00:00
Hartmut Birr
26916eed77 - Fixed the makefiles for the build on windows.
svn path=/trunk/; revision=9593
2004-06-02 20:26:08 +00:00
KJK::Hyperion
739c9c2b0a Added license text (MIT license) to the SEH library, added the header files
svn path=/trunk/; revision=9592
2004-06-02 19:22:06 +00:00
KJK::Hyperion
a8943a8c91 SEH library
svn path=/trunk/; revision=9591
2004-06-02 18:36:55 +00:00
Gé van Geldorp
07320b09dd Patch by Pablo Borobia <pablog7@argentina.com>
Work on clipboard.

svn path=/trunk/; revision=9590
2004-06-02 18:29:21 +00:00
Gé van Geldorp
08108f008e Patch by Pablo Borobia <pablog7@argentina.com>
Correct search path for DLL loading (including directory from which .exe
was loaded).

svn path=/trunk/; revision=9589
2004-06-02 18:26:58 +00:00
KJK::Hyperion
3a1705b0b1 Changed the build system to treat nasm as a first-class citizen, making it produce output in the correct format (Microsoft COFF) and cleaning up some bit rot (unused makefile variables, different conventions from the rest of the build system, etc.)
svn path=/trunk/; revision=9588
2004-06-02 18:24:09 +00:00
Royce Mitchell III
5053990958 change to zoomin Makefile to get it compiling, and enable touch, genguid, zoomin, winemine, kill, tcat, and tlist - patch by Travis Snoozy <ai2097@yahoo.com>
svn path=/trunk/; revision=9587
2004-06-02 02:27:04 +00:00
Steven Edwards
08ff887056 revert to 1.3. I didnt mean to commit that
svn path=/trunk/; revision=9586
2004-06-01 19:08:53 +00:00
Steven Edwards
73888a7753 add tgetopt to the list of static libs
svn path=/trunk/; revision=9585
2004-06-01 19:06:50 +00:00
Eric Kohl
f95308afa8 For some strange reason IniFileSectionListHead is not initialized correctly.
Intialize it maually in order to prevent access violations.

svn path=/trunk/; revision=9584
2004-06-01 11:12:59 +00:00
Aleksey Bragin
361a0a9bb7 Patch 257 in bugzilla: "Import Regedit translations from WINE.
Existing resource 'About' from WINE has been removed
since ReactOS already has it."

svn path=/trunk/; revision=9583
2004-06-01 10:20:24 +00:00
Gunnar Dalsnes
8448faa277 moved the safe mem copy routines
svn path=/trunk/; revision=9582
2004-06-01 10:16:26 +00:00
Steven Edwards
05b4d3fb1d Add regsvr32
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9580
2004-06-01 01:46:51 +00:00
Steven Edwards
56481cd659 Make the freeldr build system more like the reactos module
build system. (top level rules.mak, etc....)

Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9579
2004-06-01 01:21:07 +00:00
Steven Edwards
7aeeda0f3c Fix building and use W32API
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9578
2004-06-01 01:13:29 +00:00
Steven Edwards
d2a5a8678b change xInterlockedAddLargeStatistic and ExInterlockedCompareExchange64 to be implemented.
svn path=/trunk/; revision=9577
2004-06-01 01:00:25 +00:00
Gunnar Dalsnes
5a9d7b96f4 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9576
2004-06-01 00:14:07 +00:00
Gunnar Dalsnes
18fcfd015e removed something i shouldn't have
svn path=/trunk/; revision=9575
2004-05-31 23:37:22 +00:00
Martin Fuchs
dc4726b0da integrate optional SDI mode into main explorer branch
svn path=/trunk/; revision=9574
2004-05-31 22:39:12 +00:00
Filip Navara
48da820991 Merge DDE patch from Wine:
Dmitry Timoshkov <dmitry@codeweavers.com>
    Fix a bug in ShellExecute which called DdeCreateStringHandleW
    with a wrong parameter. Revert previous erroneous fix.

(Fixes return value of DdeQueryString[AW] and error codes)

svn path=/trunk/; revision=9573
2004-05-31 19:52:47 +00:00
Gunnar Dalsnes
381799ee02 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9572
2004-05-31 19:51:47 +00:00
Gunnar Dalsnes
3ebfb48eb8 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9571
2004-05-31 19:45:16 +00:00
Gunnar Dalsnes
cd5c05ea8b create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9570
2004-05-31 19:33:59 +00:00
James Tabor
9666870f38 Temp fix for GlobalMemoryStatus, pleas test.
svn path=/trunk/; revision=9569
2004-05-31 16:54:04 +00:00
Casper Hornstrup
0d5d9a4b7d 2004-05-31 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/reactos/version.h (KERNEL_VERSION_BUILD_TYPE): Replace possible
	value FINAL with RELEASE.

svn path=/trunk/; revision=9568
2004-05-31 12:21:24 +00:00
Gé van Geldorp
6855f27251 Temporarily undo KeAttachProcess() done by win32k
svn path=/trunk/; revision=9567
2004-05-31 11:47:05 +00:00
Eric Kohl
f9375c3f90 Add more processor information.
Patch by Christoph_vW. Fixes bug #321.

svn path=/trunk/; revision=9566
2004-05-31 11:41:14 +00:00
Thomas Bluemel
481600afb3 changed a string
svn path=/trunk/; revision=9565
2004-05-31 08:45:46 +00:00
Filip Navara
58211be6c8 - Write the system boot device and start options to registry, also create the MiniNT registry key if needed.
svn path=/trunk/; revision=9564
2004-05-30 21:40:47 +00:00
Filip Navara
c5cd2328e8 - Implementation of IoQueryDeviceDescription. Patch by Alex Ionescu.
svn path=/trunk/; revision=9563
2004-05-30 18:30:03 +00:00
Eric Kohl
9c2056bb25 Read device settings from txtsetup.sif.
svn path=/trunk/; revision=9562
2004-05-30 14:54:02 +00:00
Jason Filby
e4bd8fff85 Prevent unnecessary code where count is zero in NtGdiExtTextOut
svn path=/trunk/; revision=9561
2004-05-30 14:51:45 +00:00
Thomas Bluemel
56099c14d4 little GDI speed improvements
svn path=/trunk/; revision=9560
2004-05-30 14:01:13 +00:00
Eric Kohl
2e86c2a5bc Add device settings information.
svn path=/trunk/; revision=9559
2004-05-30 13:03:04 +00:00
Hartmut Birr
02c974661f - Fixed a wrong address in MmAlterViewAttributes which possible does cause a crash if the region is longer than one page.
svn path=/trunk/; revision=9558
2004-05-30 12:55:11 +00:00
Filip Navara
4bbc945c9c - Fixed some NULL-terminating issues that caused the 'videoprt.sys???????????????' module name problem.
svn path=/trunk/; revision=9557
2004-05-30 11:47:43 +00:00
Hartmut Birr
9fa3a2fdb7 - Print the memory map at start up to the debug port.
svn path=/trunk/; revision=9556
2004-05-29 22:10:05 +00:00
Hartmut Birr
d73db829fa - Moved the definition of all dll base addresses to baseaddress.cfg.
svn path=/trunk/; revision=9555
2004-05-29 21:55:09 +00:00
Filip Navara
55532b15d9 - When checking for ReactOS cd-rom, in addition to 'reactos/ntoskrnl.exe' check also for 'reactos/system32/ntoskrnl.exe'.
svn path=/trunk/; revision=9554
2004-05-29 21:28:28 +00:00
Hartmut Birr
716bbd44ba - Moved the definition of all dll base addresses to baseaddress.cfg.
svn path=/trunk/; revision=9553
2004-05-29 21:24:48 +00:00
Filip Navara
ceb8aca194 - Fix the "use of cast expressions as lvalues is deprecated" warning.
svn path=/trunk/; revision=9552
2004-05-29 21:21:06 +00:00
Filip Navara
9136088529 - Fixed DPRINTs.
- Added support for including other .inf files while building the standard hives.

svn path=/trunk/; revision=9551
2004-05-29 21:15:58 +00:00
Art Yerkes
dd2e0b0978 Added csq to build.
svn path=/trunk/; revision=9548
2004-05-29 17:00:41 +00:00
Filip Navara
8900df33c8 - Changed font substitution: MS Sans Serif -> Bitstream Vera Sans.
svn path=/trunk/; revision=9547
2004-05-29 15:53:56 +00:00
Filip Navara
45d5d0cea1 - Correctly initialize the startup info in WinExec.
svn path=/trunk/; revision=9546
2004-05-29 15:10:28 +00:00
Filip Navara
4faf15614f - Prepend "\\??\" to the file name in NtGdiAddFontResource.
svn path=/trunk/; revision=9545
2004-05-29 15:10:27 +00:00
Filip Navara
1aeb737c6b - Fixed unicode string copying bug in NtGdiAddFontResource.
svn path=/trunk/; revision=9544
2004-05-29 13:12:08 +00:00
Filip Navara
b94f2fca33 - Fixed declaration of IMAGE_EXPORT_DIRECTORY structure.
svn path=/trunk/; revision=9543
2004-05-29 11:58:16 +00:00
Filip Navara
206a67a937 - The last parameter of NtReadVirtualMemory should be optional.
svn path=/trunk/; revision=9542
2004-05-29 11:53:43 +00:00
Filip Navara
206298fe27 - RaiseException should pass the exception parameters even if the exception is non-continuable.
svn path=/trunk/; revision=9541
2004-05-29 11:51:33 +00:00
Art Yerkes
0f0b33c44c NdisQueryPacketLength -- Based in an obvious way on a similar macro.
svn path=/trunk/; revision=9539
2004-05-29 10:45:26 +00:00
Art Yerkes
05769811b4 Fixes for gcc-3.4.0 (pasting the __FUNCTION__ constant with a string)
and cast lvalue (reported by thomas weidenmueller)

svn path=/trunk/; revision=9537
2004-05-29 09:59:25 +00:00
Steven Edwards
76fea742f0 moved oskittcp as it is a driver lib.
svn path=/trunk/; revision=9529
2004-05-29 00:56:56 +00:00
Steven Edwards
d31c888e86 moved oskittcp as it is a driver lib.
svn path=/trunk/; revision=9527
2004-05-29 00:16:39 +00:00
Gé van Geldorp
683ba367cc Clean up calls from win32k to csrss
svn path=/trunk/; revision=9526
2004-05-28 21:33:41 +00:00
Royce Mitchell III
63fc502d5a put version information where it's supposed to go - thanks to Ge
svn path=/trunk/; revision=9525
2004-05-28 21:21:06 +00:00
Filip Navara
f1b0bedbad - Revert the PS/2 timeouts to the old values.
svn path=/trunk/; revision=9524
2004-05-28 21:17:42 +00:00
Royce Mitchell III
7440bee0cf reactos-specific debugging functions KeRosDumpStackFrames and KeRosPrintAddress
svn path=/trunk/; revision=9523
2004-05-28 21:16:27 +00:00
Royce Mitchell III
2e294f5461 OS version information - patch by Christoph von Wittich
svn path=/trunk/; revision=9522
2004-05-28 19:58:30 +00:00
Gé van Geldorp
69f3448639 Turn net/netstat and net/ipconfig back on again, since the build problems
were solved

svn path=/trunk/; revision=9521
2004-05-28 18:30:22 +00:00
Gé van Geldorp
137743321e Don't redefine WINAPI. Spotted by Travis Snoozy <ai2097@yahoo.com>
svn path=/trunk/; revision=9520
2004-05-28 18:25:05 +00:00
Steven Edwards
942d157b7a Remove dummy WINAPI define
svn path=/trunk/; revision=9519
2004-05-28 18:21:18 +00:00
Steven Edwards
663c447ca6 cleanup of the SDK and disable use of the old WINE tree.
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9518
2004-05-28 18:18:43 +00:00
Gé van Geldorp
26beb80a11 Add rule for generating .i (preprocessed) files from .c files
svn path=/trunk/; revision=9517
2004-05-28 18:16:46 +00:00
Royce Mitchell III
11f4efc511 upgrading user32 test to Wine-20040527 - disabled a test in the 'msg' test because it fails on XP SP1.
svn path=/trunk/; revision=9516
2004-05-28 17:56:17 +00:00
Royce Mitchell III
b9b553dbf6 added constants needed by wine's "user32 msg" test
svn path=/trunk/; revision=9515
2004-05-28 14:31:49 +00:00
Thomas Bluemel
004720f1a6 fixed typo
svn path=/trunk/; revision=9514
2004-05-28 13:23:24 +00:00
Thomas Bluemel
336746ec95 1. properly check parameters in SetFilePointer(Ex)()
2. fixed several functions to fail if dealing with console handles

svn path=/trunk/; revision=9513
2004-05-28 13:17:32 +00:00
Eric Kohl
938ede25cd - Implement a generic selection list.
- Use selection list in device settings pages.

svn path=/trunk/; revision=9512
2004-05-28 12:14:00 +00:00
Royce Mitchell III
69a06d8f31 added CS_DROPSHADOW, needed by latest version of wine's user32 test app
svn path=/trunk/; revision=9511
2004-05-28 03:43:12 +00:00
Mark Tempel
bd2990f457 removed programs that link to iphlpapi till exports are worked out.
svn path=/trunk/; revision=9510
2004-05-28 02:32:43 +00:00
Thomas Bluemel
d7b5932acd fixed filename in include statement and added some debug prints for stubs
svn path=/trunk/; revision=9508
2004-05-27 14:50:17 +00:00
Royce Mitchell III
961036b735 eliminate unnecessary multiplications in the inner loops of DIB_1BPP_BitBltSrcCopy_From1BPP
svn path=/trunk/; revision=9507
2004-05-27 12:35:23 +00:00
Hartmut Birr
6e3bbc606d - Don't change the environment block if the number of variables has not changed (in BlockEnvToEnviron).
- Use a copy of the environment strings (in BlockEnvToEnviron).

svn path=/trunk/; revision=9506
2004-05-27 11:49:48 +00:00
Thomas Bluemel
94c04c2051 fixed missing class dereferencings and store a list of windows in the class object
svn path=/trunk/; revision=9505
2004-05-27 11:47:42 +00:00
Filip Navara
ae85951413 - New font substitution: MS Sans Serif -> Bitstream Vera Serif
svn path=/trunk/; revision=9504
2004-05-26 21:47:07 +00:00
Eric Kohl
43836af86c - Implement dummy device settings pages.
- Hide the cursor at startup.

svn path=/trunk/; revision=9503
2004-05-26 20:58:37 +00:00
Aleksey Bragin
ac9cb4c5a6 Fix warnings by vandread.
svn path=/trunk/; revision=9502
2004-05-26 20:37:25 +00:00
Filip Navara
5141945b57 - Return success for SystemFileCacheInformation requests to NtQuerySystemInformation, so we can see some information in the Task Manager.
svn path=/trunk/; revision=9501
2004-05-26 19:56:35 +00:00
Filip Navara
72afcc3bb8 - Fixed the third passed parameter to NtSetInformationThread call in ImpersonateLoggedOnUser.
svn path=/trunk/; revision=9500
2004-05-26 19:53:48 +00:00
Thomas Bluemel
cb1ea2ade7 selecting a new clipping region into a dc doesn't return the previous clipping region handle
svn path=/trunk/; revision=9499
2004-05-26 18:59:21 +00:00
Thomas Bluemel
6248b04e6f fixed returning uninitialized variable in NtGdiSelectVisRgn() and NtGdiExtSelectClipRgn()
svn path=/trunk/; revision=9498
2004-05-26 18:49:06 +00:00
Eric Kohl
8158fc02d0 Append two newlines to the "Press any key to boot form CD....." string.
svn path=/trunk/; revision=9497
2004-05-26 10:58:29 +00:00
Thomas Bluemel
d7d7bbef13 added stubs for SetFileSecurityW(), GetNamedSecurityInfoA/W() and SetNamedSecurityInfoA/W()
svn path=/trunk/; revision=9496
2004-05-26 09:50:10 +00:00
Filip Navara
0fc5792047 - Set CurrentThread->u1.ExitTime to exit time in PsTerminateCurrentThread. Patch by Alex Ionescu.
svn path=/trunk/; revision=9495
2004-05-25 22:03:48 +00:00
Filip Navara
d35144407f - Enabled the 'Press any key to boot from CD' message in the ISO
boot code and show it only when some hard disk is present.
- Adjusted detection timeouts for PS/2 and RS232 to the minimum
  allowed by the specifications so we don't spend ages in hardware detection.
- Experimental NTFS reading support. (No boot code, no attribute lists, no decompression)

svn path=/trunk/; revision=9494
2004-05-25 21:47:39 +00:00
Filip Navara
470210fb06 - Enabled the 'Press any key to boot from CD' message in the ISO
boot code and show it only when some hard disk is present.
- Adjusted detection timeouts for PS/2 and RS232 to the minimum
  allowed by the specifications so we don't spend ages in hardware detection.
- Experimental NTFS reading support. (No boot code, no attribute lists, no decompression)

svn path=/trunk/; revision=9493
2004-05-25 21:31:27 +00:00
Filip Navara
5a22e5bcf0 - Fixed definition of assert macro.
- Fixed few DPRINTs to compile.
- Handle OF_CREATE flag of OpenFile.

svn path=/trunk/; revision=9492
2004-05-25 20:04:14 +00:00
Aleksey Bragin
f11893f56e Sample man files
svn path=/trunk/; revision=9491
2004-05-25 18:50:54 +00:00
Aleksey Bragin
0f711c642b New version of man by Semyon Novikov. Manual pages should be located in c:\\man for now, later it will be enhanced to environment variable.
I have changed the makefile so it is compatible with ReactOS, and compiles just by running 'make'. There are some warnings also, but I didn't have time to fix them.

svn path=/trunk/; revision=9490
2004-05-25 18:49:04 +00:00
Filip Navara
7a98b74d8b - Run Task Manager when CTRL-ALT-DEL is pressed.
svn path=/trunk/; revision=9489
2004-05-25 15:53:16 +00:00
Filip Navara
6368fbd7a8 - Support for window-less hotkeys.
- Send hotkeys even if there's no focus window.

svn path=/trunk/; revision=9488
2004-05-25 15:52:45 +00:00
Hartmut Birr
e58206820b - Implemented ScsiPortGetPhysicalAddress also for addresses from sense info buffer.
- Allocated the sense info buffer within contiguous physical memory.
- Don't send an sence request after an error if the miniport driver is autosense-capable.

svn path=/trunk/; revision=9487
2004-05-24 20:33:41 +00:00
Eric Kohl
b718b8e348 Implement kernel-mode range lists.
Install target must not rebuild executables.

svn path=/trunk/; revision=9486
2004-05-24 12:08:55 +00:00
Eric Kohl
82a4c658f4 Implement kernel-mode range lists.
svn path=/trunk/; revision=9485
2004-05-24 12:05:54 +00:00
Eric Kohl
47f7ff67c1 Implement RtlInvertRangeList() and RtlMergeRangeList().
svn path=/trunk/; revision=9484
2004-05-24 12:03:24 +00:00
Hartmut Birr
8c86d7049f - Fixed my copy-and-paste bug. Thanks to Royce III.
svn path=/trunk/; revision=9483
2004-05-23 15:49:56 +00:00
Thomas Bluemel
5096908ac7 ignore the hInstance field while searching classes if it's NULL
svn path=/trunk/; revision=9482
2004-05-23 14:04:58 +00:00
Hartmut Birr
924e3b2bea - Don't return a file or allocation size for directories.
svn path=/trunk/; revision=9481
2004-05-23 13:34:32 +00:00
Hartmut Birr
84d6759c0a - Fixed the calculated file attribute in CdfsFileFlagsToAttributes.
svn path=/trunk/; revision=9480
2004-05-23 13:27:26 +00:00
Eric Kohl
fc9d0d4b4d - Implement RtlFindRange().
- Add documentation.

svn path=/trunk/; revision=9479
2004-05-23 11:56:16 +00:00
Thomas Bluemel
27119bd65c fixed typos
svn path=/trunk/; revision=9478
2004-05-23 09:36:47 +00:00
Royce Mitchell III
fffba95c47 remove UNIMPLEMENTED from NtUserIsClipboardFormatAvailable and replace it with a DPRINT1 warning that it is not implemented. This change gets Irfanview working.
svn path=/trunk/; revision=9477
2004-05-23 04:04:10 +00:00
Filip Navara
11a1d291a0 - Disable NtGdiRealizePalette. It has a lot of bugs and really doesn't do any of the work it should do.
svn path=/trunk/; revision=9474
2004-05-22 22:07:42 +00:00
Thomas Bluemel
f2992e0c09 prevent memory leaks if callbacks to usermode never return
svn path=/trunk/; revision=9473
2004-05-22 21:12:15 +00:00
Hartmut Birr
ef7b36dd46 - Do not immediately write the zeroed region to the disk for a cached file.
- Fixed a problem, which does occur if the cluster size is lower than the segment size.

svn path=/trunk/; revision=9472
2004-05-22 18:28:18 +00:00
Thomas Bluemel
d805aabcae silence debug message
svn path=/trunk/; revision=9471
2004-05-22 17:51:08 +00:00
Thomas Bluemel
c6bdf3f977 1. added basic reference counting for message queues
2. fixed memory leak when a thread terminates while dispatching a message
3. wake the sender's thread in case of 2.

svn path=/trunk/; revision=9470
2004-05-22 16:48:50 +00:00
Martin Fuchs
4307e3115e code comments
svn path=/trunk/; revision=9469
2004-05-22 13:18:45 +00:00
Filip Navara
86ada6ab1c - Revert change to VGA register values that I accidently commited.
svn path=/trunk/; revision=9468
2004-05-22 12:23:12 +00:00
Eric Kohl
a197c442b7 Center install wizard.
Don't skip to next page as long as required data have not been entered.

svn path=/trunk/; revision=9467
2004-05-22 12:04:10 +00:00
Thomas Bluemel
dd55a50761 1. reverted my last change to SendMessageTimeout() which was wrong
2. fixed UserGetWindowIcon(), SendMessageTimeout() usually overwrites the result variable, even if it failed!

svn path=/trunk/; revision=9466
2004-05-22 09:22:41 +00:00
Filip Navara
1404258b13 - Remove WinLogon icon, because it's copyrighted by Microsoft.
svn path=/trunk/; revision=9465
2004-05-22 09:10:33 +00:00
Filip Navara
ed16c950dc - Check buffer sizes and color counts for IOCTL_VIDEO_SET_COLOR_REGISTERS request.
svn path=/trunk/; revision=9464
2004-05-22 08:53:26 +00:00
Filip Navara
1c1f4e3945 - Don't delete icons that we got by WM_GETICON or GetClassIcon.
svn path=/trunk/; revision=9463
2004-05-22 08:35:38 +00:00
Thomas Bluemel
4c8d47cc6b fixed SendMessageTimeout() to return the correct result even when it timed out
svn path=/trunk/; revision=9462
2004-05-22 08:27:15 +00:00
Hartmut Birr
a4931b6ee8 - removed an obsolete call to ExAllocatePool in CHECKPOINT
svn path=/trunk/; revision=9461
2004-05-22 08:12:49 +00:00
Art Yerkes
a31ff7a76b I forgot to increase the number of strings loaded from the registry. fixed.
svn path=/trunk/; revision=9460
2004-05-22 02:54:32 +00:00
Art Yerkes
7f1e933e8e Blight pointed out that we didn't have all the registers in js. This fixes
that.

svn path=/trunk/; revision=9459
2004-05-22 02:50:25 +00:00
Art Yerkes
6f17d958c6 Blight pointed out that I was missing some regs from the end of the trap frame.
These are now fixed.

svn path=/trunk/; revision=9458
2004-05-22 01:55:31 +00:00
Filip Navara
17983ae6be - Added support for special value "LiveCD" of SystemPath option
for loading ReactOS. It uses the known boot drive information
  as the boot path.

svn path=/trunk/; revision=9457
2004-05-21 20:29:56 +00:00
Filip Navara
1c9e1c3a8b - Fixed a bug in IsoSearchDirectoryBufferForFile. Compare the offset first, so we don't access invalid memory.
svn path=/trunk/; revision=9456
2004-05-21 20:06:09 +00:00
Filip Navara
ce81c53f81 - End-Of-Line marker at the real end of line shouldn't advance the vertical offset.
svn path=/trunk/; revision=9455
2004-05-21 17:34:24 +00:00
Filip Navara
d76f0c8745 - Support for the End-Of-Line RLE mark.
- Treat the bitmap header field bV5ClrUsed correctly if it's set to zero.

svn path=/trunk/; revision=9454
2004-05-21 17:05:46 +00:00
Thomas Bluemel
08855e847a don't clip moving rectangles to the work area for topmost windows
svn path=/trunk/; revision=9453
2004-05-21 12:46:59 +00:00
Thomas Bluemel
03de8510c2 removed obsolete fields from the W32PROCESS structure
svn path=/trunk/; revision=9452
2004-05-21 10:31:00 +00:00
Thomas Bluemel
4349fe8990 implemented DisableProcessWindowsGhosting() (window ghosting is not yet implemented though)
svn path=/trunk/; revision=9451
2004-05-21 10:09:31 +00:00
Thomas Bluemel
6851738b5a fixed message timeout crash, caused by inserting dispatching messages into the wrong dispatching list
svn path=/trunk/; revision=9450
2004-05-20 21:48:41 +00:00
Thomas Bluemel
c9bec757df fixed handling of caption buttons
svn path=/trunk/; revision=9449
2004-05-20 14:53:14 +00:00
Thomas Bluemel
0cc4a84668 clip to the work area when dragging a window
svn path=/trunk/; revision=9448
2004-05-20 14:34:14 +00:00
Thomas Bluemel
0a242842b2 fixed FillRect() to properly handle system color constants (thanks to Royce for spotting this bug)
svn path=/trunk/; revision=9447
2004-05-20 14:12:21 +00:00
Eric Kohl
f44bcb1cdb Add some security function stubs.
svn path=/trunk/; revision=9446
2004-05-20 12:42:51 +00:00
Hartmut Birr
4a1429bb28 - Do not change the mapping count of a page if the physical address falls
in the range of valid physical memory (in MmMapIoSpace and MmUnmapIoSpace).

svn path=/trunk/; revision=9445
2004-05-20 08:37:21 +00:00
Royce Mitchell III
a7cf6b254f get current HINSTANCE if given NULL in CreateWindowExA&W - fixes bug I found today with my little 'window stresser' app.
svn path=/trunk/; revision=9444
2004-05-20 04:10:01 +00:00
Thomas Bluemel
46d6fe4163 set proper lasterror code in RegisterWindowMessage()
svn path=/trunk/; revision=9443
2004-05-19 19:16:47 +00:00
Thomas Bluemel
23c42995a1 fixed RegisterWindowMessage()
svn path=/trunk/; revision=9442
2004-05-19 19:09:20 +00:00
Thomas Bluemel
1f14756983 attempt to fix handling of timed out sending of messages to be thread-safe
svn path=/trunk/; revision=9441
2004-05-19 18:45:31 +00:00
Thomas Bluemel
90b8b7f3d6 use FASTCALL calling convention for internal routines
svn path=/trunk/; revision=9440
2004-05-18 22:32:48 +00:00
Steven Edwards
0fcdaa8c81 Sylvain Petreolle -
Hacked TGMarltt to work on Windows as well as Linux and ReactOS with FreeType.

svn path=/trunk/; revision=9439
2004-05-18 16:22:49 +00:00
Thomas Bluemel
e765178153 ported CreatePolyPolygonRgn() and CreatePolygonRgn() from wine
svn path=/trunk/; revision=9438
2004-05-18 15:25:25 +00:00
Thomas Bluemel
40c3c7cd37 fixed memory leak
svn path=/trunk/; revision=9437
2004-05-18 14:06:42 +00:00
Thomas Bluemel
7ea71b67f4 safe parameter handling for PolyPolygonRgn() and PolygonRgn(). The actual region calculation for both functions is not yet implemented though!
svn path=/trunk/; revision=9436
2004-05-18 13:57:41 +00:00
Martin Fuchs
4b62bbcaa8 prompt with error messageboxes for problems when reading init files
svn path=/trunk/; revision=9435
2004-05-18 12:38:39 +00:00
Eric Kohl
9c4dd6241a Implement SeQueryAuthenticationIdToken().
Add audit function stubs.

svn path=/trunk/; revision=9434
2004-05-18 12:24:40 +00:00
Martin Fuchs
0cc2f5d9be return more verbose XML parser error messages
svn path=/trunk/; revision=9433
2004-05-18 12:10:36 +00:00
Hartmut Birr
c49f961993 - Do print readable sector numbers in DiskReadLogicalSectors.
svn path=/trunk/; revision=9432
2004-05-17 20:30:55 +00:00
Hartmut Birr
869728e524 - Implemented the printing of 64 bit numbers.
svn path=/trunk/; revision=9431
2004-05-17 20:25:01 +00:00
Hartmut Birr
d462152e6d - Fixed the calculation of the start for a partition within an extended partition.
svn path=/trunk/; revision=9430
2004-05-17 20:20:17 +00:00
Martin Fuchs
3128a0aff7 add missing precomp.h header file
svn path=/trunk/; revision=9429
2004-05-17 19:56:04 +00:00
Gé van Geldorp
8f30493913 Prevent unnecessary relinks when TARGET_REGTESTS = yes
svn path=/trunk/; revision=9428
2004-05-17 19:45:10 +00:00
Steven Edwards
0e7124da95 committed Marlett replacement as binary
svn path=/trunk/; revision=9427
2004-05-17 17:41:08 +00:00
Steven Edwards
0bf4f46ded trying to fix this to be binary
svn path=/trunk/; revision=9426
2004-05-17 17:40:21 +00:00
Steven Edwards
997484141f Untested !!!!
Added Font substition support for Marlett via TGMarlett

svn path=/trunk/; revision=9425
2004-05-17 17:32:19 +00:00
Steven Edwards
6eb086ebc9 added Transgamings Marlett font replacement licensed
under the BSD license.

svn path=/trunk/; revision=9424
2004-05-17 17:30:24 +00:00
Filip Navara
aaa859c4a6 - Fixed Window Class menu handling that I broke with my last patch.
svn path=/trunk/; revision=9423
2004-05-17 16:38:58 +00:00
Eric Kohl
06ed586fb1 Add documentation for some range list functions.
svn path=/trunk/; revision=9422
2004-05-17 13:21:52 +00:00
Eric Kohl
53a3421952 Add range list flags.
svn path=/trunk/; revision=9421
2004-05-17 13:20:05 +00:00
Martin Fuchs
06c03f786a use precompiled headers for VC++ builds
svn path=/trunk/; revision=9420
2004-05-17 13:11:06 +00:00
Filip Navara
fb5e84bd1f - Set Mdl->Process in MmMapLockedPages to current process and back to NULL in MmUnmapLockedPages.
svn path=/trunk/; revision=9419
2004-05-16 22:27:57 +00:00
Filip Navara
caa8f5caae - Don't use object that's already unlocked.
svn path=/trunk/; revision=9418
2004-05-16 19:42:32 +00:00
Filip Navara
eb9fa5b0a5 Window Class handling fixes:
- Corrected styles/names for builtin classes.
- Make NtUserRegisterClassExWOW a bit more like in windows.
- More Windows-like handling of hInstance in RegisterClassEx[AW].
- Very basic work on global vs. local window classes.

svn path=/trunk/; revision=9417
2004-05-16 19:31:09 +00:00
Thomas Bluemel
192d918fb4 fixed missing dereferencing of threads in PostThreadMessage()
svn path=/trunk/; revision=9416
2004-05-16 18:33:40 +00:00
Thomas Bluemel
4bee3087ac fixed dereferencing bug
svn path=/trunk/; revision=9415
2004-05-16 13:57:49 +00:00
Thomas Bluemel
3538785e6a replaced UnsafeIntCreateRectRgnIndirect() and UnsafeIntUnionRectWithRgn() with macros to directly call the appropriate function
svn path=/trunk/; revision=9414
2004-05-16 09:51:27 +00:00
Thomas Bluemel
607ca343e7 fixed typo
svn path=/trunk/; revision=9413
2004-05-15 23:07:11 +00:00
Hartmut Birr
d16209b9dc - Improved the reading and writing of fragmented files.
svn path=/trunk/; revision=9412
2004-05-15 23:00:02 +00:00
Hartmut Birr
189436c3ef - Fixed the implementation of IoBuildPartialMdl.
svn path=/trunk/; revision=9411
2004-05-15 22:51:38 +00:00
Thomas Bluemel
43783f95c5 Anich Gregor: Basic implementation of GetUserObjectInformation() (needed by the nvidia opengl ICD)
svn path=/trunk/; revision=9410
2004-05-15 22:50:04 +00:00
Hartmut Birr
bdd1e9e8c6 - Fixed the implementation of MmMapIoSpace.
svn path=/trunk/; revision=9409
2004-05-15 22:45:51 +00:00
Jason Filby
0dbe70cad7 Eng memory test
svn path=/trunk/; revision=9408
2004-05-15 20:30:19 +00:00
Hartmut Birr
aa82813f06 - Simplified the converting of environment variables.
svn path=/trunk/; revision=9407
2004-05-15 20:25:09 +00:00
Thomas Bluemel
4b6ab2d1c6 removed assertion
svn path=/trunk/; revision=9406
2004-05-15 20:19:20 +00:00
Eric Kohl
c0fb78df09 Implement RtlIsRangeAvailable().
svn path=/trunk/; revision=9405
2004-05-15 19:41:10 +00:00
Eric Kohl
9f5e364685 Add range list status codes.
svn path=/trunk/; revision=9404
2004-05-15 19:39:35 +00:00
Hartmut Birr
fbef35d884 - Fixed the execution of batch files.
svn path=/trunk/; revision=9403
2004-05-15 19:24:59 +00:00
Thomas Bluemel
6387f49323 removed #ifdef (due to wine sync)
svn path=/trunk/; revision=9402
2004-05-15 18:20:26 +00:00
Gé van Geldorp
75cf55e8b3 Test was backwards
svn path=/trunk/; revision=9401
2004-05-15 16:29:55 +00:00
Gé van Geldorp
1805ae9248 ASSERT() was a no-op in win32k, even for debug builds
svn path=/trunk/; revision=9400
2004-05-15 16:17:59 +00:00
Filip Navara
9fa3c615c7 - Fixed cut & paste error in NtGdiGetDIBColorTable and NtGdiSetDIBColorTable.
- Fixed implementation of DIB_MapPaletteColors. It shoud take palette from DC and the index array is of type PUSHORT, not PULONG.

svn path=/trunk/; revision=9399
2004-05-15 15:04:43 +00:00
Eric Kohl
2f7fa4426a Implement range list copy and delete functions.
svn path=/trunk/; revision=9398
2004-05-15 14:26:08 +00:00
Jason Filby
d1d7eaa06b Stub __badioinfo
svn path=/trunk/; revision=9397
2004-05-15 12:56:53 +00:00
Filip Navara
4e81b67c89 - Use NtGdiBitBlt in NtGdiStretchDIBits if source and destination dimensions are equal.
svn path=/trunk/; revision=9396
2004-05-15 11:20:38 +00:00
Thomas Bluemel
39fee6b8c7 combobox popups should be always-on-top
svn path=/trunk/; revision=9395
2004-05-15 10:08:45 +00:00
Filip Navara
bc072fb755 - Recalculate the menu bar size when resizing window.
svn path=/trunk/; revision=9394
2004-05-15 08:53:06 +00:00
Filip Navara
6952a5644f - New implementation of GetDIBColorTable and SetDIBColorTable.
svn path=/trunk/; revision=9393
2004-05-15 08:52:25 +00:00
Gé van Geldorp
1825cf4a15 Only split update region into client and non-client parts if there actually
is something to split

svn path=/trunk/; revision=9392
2004-05-15 08:01:56 +00:00
Gé van Geldorp
5884627fe6 Silence debug messages
svn path=/trunk/; revision=9391
2004-05-15 07:49:05 +00:00
Gé van Geldorp
1c108dfcbd Implement complex clipping for StretchBlt
svn path=/trunk/; revision=9390
2004-05-15 06:54:47 +00:00
Thomas Bluemel
b3b134ecfa changed cursors/icons to use the window station handle table
svn path=/trunk/; revision=9389
2004-05-14 23:57:32 +00:00
Gé van Geldorp
4b8fc8e4e4 Implement complex clipping for StretchBlt
svn path=/trunk/; revision=9388
2004-05-14 22:56:18 +00:00
Filip Navara
0c9315b3dc - Fixed implementation of NtGdiGetNearestColor.
svn path=/trunk/; revision=9387
2004-05-14 22:20:46 +00:00
Filip Navara
759afa4f19 - Define KEBUGCHECK macro to make compiling KJS working again.
svn path=/trunk/; revision=9386
2004-05-14 21:25:08 +00:00
Filip Navara
3221290df2 - Minor corrections to EqualRect and SubtractRect.
svn path=/trunk/; revision=9385
2004-05-14 17:02:40 +00:00
Filip Navara
394e0f648e - NtGdiCreateRectRgn should accept negative width and height. It's supposed to be handled just like in NtGdiSetRectRgn.
svn path=/trunk/; revision=9384
2004-05-14 16:56:48 +00:00
Filip Navara
3f9294eaee - Fix ExtSelectClipRgn and some other clipping functions.
svn path=/trunk/; revision=9383
2004-05-14 16:55:18 +00:00
Filip Navara
1e4d1cd885 - Fix DPRINT.
svn path=/trunk/; revision=9382
2004-05-14 16:50:44 +00:00
Filip Navara
95a2d3b54f - Modify DPRINTs to print window styles in hexadecimal notation.
svn path=/trunk/; revision=9381
2004-05-14 16:50:16 +00:00
Filip Navara
fb5a06a8d1 - Check for the WS_CLIPSIBLINGS flag on the correct window.
svn path=/trunk/; revision=9380
2004-05-14 16:48:47 +00:00
Filip Navara
1f1079ac18 - Don't modify Msg->pt for mouse messages. It's supposed to be always in screen coordinates, not it client coordinates.
svn path=/trunk/; revision=9379
2004-05-14 16:48:04 +00:00
Eric Kohl
4087ebf77f Implement basic range list functions.
svn path=/trunk/; revision=9378
2004-05-14 12:11:52 +00:00
James Tabor
57df925ccb Use updated version of SystemHandleInformation.
svn path=/trunk/; revision=9377
2004-05-14 09:25:41 +00:00
Filip Navara
6ea0fbf3f3 - Implementation of RtlDuplicateUnicodeString.
- Copied implementation of RtlGetVersion from ntoskrnl.
- Stubs for RtlNtPathNameToDosPathName and RtlpEnsureBufferSize. These functions are needed by native Windows DLLs.
- Export RtlRandomEx as a wrapper for RtlRandom.

svn path=/trunk/; revision=9376
2004-05-13 21:01:14 +00:00
Filip Navara
f4b54419c3 - Added missing unlocking of handle table in RtlLookupAtomInAtomTable.
svn path=/trunk/; revision=9375
2004-05-13 20:48:31 +00:00
Filip Navara
41df8b886e - Make WinPosSearchChildren more readable.
svn path=/trunk/; revision=9374
2004-05-13 20:46:28 +00:00
Filip Navara
63c655e5d1 - Add some stubs needed by native Windows DLLs.
svn path=/trunk/; revision=9373
2004-05-13 20:42:28 +00:00
Filip Navara
81728cf1b8 - Fix common controls subclassing.
svn path=/trunk/; revision=9372
2004-05-13 20:34:24 +00:00
Filip Navara
624300da51 - Report a failure for FindNextFile(NULL) instead of crashing.
svn path=/trunk/; revision=9371
2004-05-13 20:32:18 +00:00
Filip Navara
620a45896a - Report failure when function imported by ordinal isn't found.
svn path=/trunk/; revision=9370
2004-05-13 20:30:26 +00:00
Filip Navara
c9b5101395 - Handle more notification messages to prevent "-- %p WM_COMMAND %x unhandled" messages.
svn path=/trunk/; revision=9369
2004-05-13 20:28:58 +00:00
Filip Navara
66a1b30c14 - Add REST_NONLEGACYSHELLMODE policy.
svn path=/trunk/; revision=9368
2004-05-13 20:27:04 +00:00
Filip Navara
3da87fae97 - Don't allow making a window with negative dimensions in WM_WINDOWPOSCHANGING.
svn path=/trunk/; revision=9367
2004-05-13 20:25:50 +00:00
Filip Navara
83c27bebc6 - Force recalulation size of menu items when new item is added.
- Make MDI injected icons working.
- Minor corrections to menu code size handling.

svn path=/trunk/; revision=9366
2004-05-13 20:21:27 +00:00
Filip Navara
5c60bbb820 - Define RB_GETBANDMARGINS and RB_SETWINDOWTHEME.
svn path=/trunk/; revision=9365
2004-05-13 20:17:12 +00:00
Filip Navara
08358fce51 - Don't pass garbage to RtlQueryAtomInAtomTable. It doesn't like it...
svn path=/trunk/; revision=9364
2004-05-13 20:10:15 +00:00
Steven Edwards
036d02e291 Added .cvsignore for oskittcp
svn path=/trunk/; revision=9363
2004-05-13 20:03:03 +00:00
Jason Filby
58f0550e7b Regression-test enable win32k; patch by Casper Hornstrup
svn path=/trunk/; revision=9362
2004-05-13 19:31:09 +00:00
Jason Filby
6dac2c7d87 Remove unused variable; patch by Casper Hornstrup
svn path=/trunk/; revision=9361
2004-05-13 19:28:57 +00:00
Filip Navara
89ac0e36c9 - Print class name in DPRINT1 in NtUserFindWindowEx.
svn path=/trunk/; revision=9360
2004-05-12 20:45:05 +00:00
Filip Navara
a1c9203ceb - Fixed the WM_SYSCOMMAND with SC_SIZE messages to have correct codes in wParam.
svn path=/trunk/; revision=9359
2004-05-12 20:34:38 +00:00
Thomas Bluemel
f4371386e4 GetWindowInfo() doesn't check the cbSize parameter
svn path=/trunk/; revision=9358
2004-05-12 15:28:01 +00:00
Gé van Geldorp
a218ec6e0b Fix scrollbar controls
svn path=/trunk/; revision=9357
2004-05-12 09:47:16 +00:00
Gé van Geldorp
45ac874e11 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9356
2004-05-11 20:52:10 +00:00
Gé van Geldorp
b8c9de400f Fix command line handling (mostly double-quoting stuff)
svn path=/trunk/; revision=9355
2004-05-11 20:44:30 +00:00
Gé van Geldorp
fc1b4d644e Allow caller to continue after NtUserOpenClipboard()
svn path=/trunk/; revision=9353
2004-05-10 23:05:13 +00:00
Filip Navara
71f57b72d4 - Workaround for supporting a reads from pipe after the other end has been closed and data are still available in the buffers.
svn path=/trunk/; revision=9352
2004-05-10 19:58:10 +00:00
Thomas Bluemel
21a782aceb take back changes to window styles, they broke our gui consoles
svn path=/trunk/; revision=9351
2004-05-10 19:23:37 +00:00
Gé van Geldorp
1b645d2622 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9350
2004-05-10 18:02:20 +00:00
Gé van Geldorp
2fbb38750c Update to FreeType 2.1.8
svn path=/trunk/; revision=9349
2004-05-10 17:48:36 +00:00
Thomas Bluemel
418b7e53a6 use a common header for most files in win32k to make use of precompiled headers
svn path=/trunk/; revision=9348
2004-05-10 17:07:20 +00:00
Thomas Bluemel
23dcd0a6f2 fixed compiling issues with gcc 3.4
svn path=/trunk/; revision=9347
2004-05-10 13:35:28 +00:00
Thomas Bluemel
32478ebba8 fixed compiling issues with gcc 3.4
svn path=/trunk/; revision=9346
2004-05-10 13:29:59 +00:00
Eric Kohl
dc5862b16e Enable missing EnumDisplayMonitors.
svn path=/trunk/; revision=9345
2004-05-10 12:34:44 +00:00
Gé van Geldorp
eca151dba3 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9344
2004-05-10 12:21:22 +00:00
Gé van Geldorp
cf6301c2d6 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9343
2004-05-10 11:56:07 +00:00
Gé van Geldorp
a2c82e3283 Avoid collision with compiler generated label
svn path=/trunk/; revision=9342
2004-05-10 11:13:15 +00:00
Gé van Geldorp
7177d62015 Skip leading comment lines
svn path=/trunk/; revision=9341
2004-05-10 10:51:36 +00:00
Thomas Bluemel
37af37614a Royce3: fixed compiling issues with g++
svn path=/trunk/; revision=9340
2004-05-10 07:44:43 +00:00
Hartmut Birr
c1574ff8d1 - Put the event from file object as user event into the irp in IopCloseFile
and IopDeleteFile. This is necessary because the event from fileobject
  isn't set automatically after a close/cleanup call.

svn path=/trunk/; revision=9339
2004-05-09 15:02:07 +00:00
Hartmut Birr
ad49710348 - Set the correct cdb length for the mode sens command in CdromClassCreateDeviceObject.
svn path=/trunk/; revision=9338
2004-05-09 14:50:50 +00:00
Eric Kohl
c2f0a2f385 Support multi-block bins.
svn path=/trunk/; revision=9337
2004-05-09 14:50:09 +00:00
Eric Kohl
f760135f5d - Implement multi-block bins. This removes all existing size limits within the registry.
- Janitorial work.

svn path=/trunk/; revision=9336
2004-05-09 12:23:35 +00:00
Thomas Bluemel
cc056e8bb5 handle WM_SETCUROR messages for the desktop window
svn path=/trunk/; revision=9335
2004-05-08 19:35:32 +00:00
Thomas Bluemel
c12dfa13b6 assign even more styles for overlapped windows
svn path=/trunk/; revision=9334
2004-05-08 16:06:54 +00:00
Gé van Geldorp
066123fa60 Update porting status
svn path=/trunk/; revision=9333
2004-05-08 14:16:09 +00:00
Gé van Geldorp
dd3c643b4d Sync to Wine-20040505:
Francois Gouget <fgouget@codeweavers.com>
- Taking into account wavemap and midimap there can be up to 8 output
  drivers. So increase the size of the MMDrvs array accordingly.
- Skip already loaded drivers before complaining (asserting) that they
  don't fit in the MMDrvs array.
- Make static Unicode strings const.

svn path=/trunk/; revision=9331
2004-05-08 14:07:55 +00:00
Gé van Geldorp
f19704b04f Sync to Wine-20040505:
Francois Gouget <fgouget@free.fr>
- Make Unicode strings 'static const'.
- Assorted spelling fixes.
- Make our ascii strings static const.
- Remove a couple string variables that were used only once and use the
  string literal directly.
- Use named constants instead of magic numbers.
- Remove wszRegSeparator from devenum_private.h since it's neither
  exported by createdevenum.c nor used by anyone else.
Kevin Koltzau <kevin@plop.org>
- Allow UrlCombine to calculate size of required buffer.

svn path=/trunk/; revision=9330
2004-05-08 13:49:05 +00:00
Gé van Geldorp
1b91a499fe Ulrich Czekalla <ulrich@codeweavers.com>
- Delegates messages directly to the edit control window proc instead of
  containing an edit control. Fixes problems with subclassing the
  richedit control.
Francois Gouget <fgouget@free.fr>
- Make Unicode const strings static so they are not copied to the stack
  each time we enter the function.

svn path=/trunk/; revision=9329
2004-05-08 13:41:00 +00:00
Gé van Geldorp
f7a4bc8f45 Sync to Wine-20040505:
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- Add a stub for StgCreateStorageEx(). Returns
  STG_E_UNIMPLEMENTEDFUNCTION as per MSDN. Fixes an error saving files
  in Word XP.
- Make our ascii strings static const.
  Remove a couple string variables that were used only once and use the
  string literal directly.
Marcus Meissner <marcus@jet.franken.de>
- Fixed strict aliasing issues in dlls/ole32.
- Implemented CoReleaseMarshalData.
- Fixed lvalue casts.
- Fixed strict aliasing issues in dlls/ole32.
Filip Navara <xnavara@volny.cz>
- Get rid of E_UNSPEC non-standard error value.

svn path=/trunk/; revision=9328
2004-05-08 13:32:51 +00:00
Eric Kohl
4c54d1cace Implement recursive deletion of start menu groups and desktop items.
svn path=/trunk/; revision=9327
2004-05-08 13:11:07 +00:00
Thomas Bluemel
b1e6d9458c minor fixes
svn path=/trunk/; revision=9326
2004-05-08 13:06:12 +00:00
Gé van Geldorp
af54a29030 Sync to Wine-20040505:
Mike McCormack <mike@codeweavers.com>
- Implemented WNetEnumCachedPasswords.

svn path=/trunk/; revision=9325
2004-05-08 12:58:08 +00:00
Gé van Geldorp
4e0fa347fa Sync to Wine-20040505:
Pavel Roskin <proski@gnu.org>
- Make the file type combobox non-editable.
Ilya Korniyko <k_ilya@ukr.net>
- Added Ukrainian translations.
Wolfgang Schwotzer <woschwot@gmx.net>
- Update OFN_READONLY flag when closing file dialog.
- Make file dialog support FNERR_BUFFERTOSMALL if buffer too small.
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- If lpstrTitle is NULL, set it to either 'Open File' or 'Save as'.
- Constify the string constants.
- Make Unicode const strings static so they are not copied to the stack
  each time we enter the function.

svn path=/trunk/; revision=9324
2004-05-08 12:53:14 +00:00
Thomas Bluemel
9c710c79db silence debug messages
svn path=/trunk/; revision=9323
2004-05-08 12:49:34 +00:00
Thomas Bluemel
c862df0add fixed handling of CW_USEDEFAULT with CreateWindow(Ex)()
svn path=/trunk/; revision=9322
2004-05-08 12:42:46 +00:00
Gé van Geldorp
2f07e000b4 Sync to Wine-20040505:
Ilya Korniyko <k_ilya@ukr.net>
- Added Ukrainian translations.
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- Make our ascii strings static const.
- Remove a couple string variables that were used only once and use the
  string literal directly.
Krzysztof Foltman <kfoltman@portal.onet.pl>
- make monthcal a child of datetime (it was a sibling before, causing
  completely incorrect message flow)
- update monthcal after date change in datetime
- choose different coordinates when DTS_SHOWNONE is not used
- embedded monthcal is now 200 pixels wide
- selecting a day in embedded monthcal updates the datetime and hides
  the monthcal
- changing months/years by clicking month name/year in title bar works
- embedded month calendar is correctly destroyed (it used to stick on
  the screen long after the datetime's container was closed)
- next/prev month don't stick anymore
- min/max ranges initialized to some reasonable values
- fixed some bugs caused by reversed order of arguments of MONTHCAL_CopyTime
- update current month/year after setting current date
- changing months etc doesn't send MCN_SELECT (which could be sent
  only after a particular day was clicked)
- changed (hit && MCHT_CALENDARDATE) to (hit == MCHT_CALENDARDATE)
Huw Davies <huw@codeweavers.com>
- Deleting column zero should only delete the column and not the item
  data.
- Implemented TVS_NOSCROLL.
Maxime Bellenge <maxime.bellenge@laposte.net>
- Add NM_RCLICK notification support for toolbars.
- Fix the size of the listview items in the customize dialog.
- Fix TB_GETSTYLE message to return the style of the toolbar and not the
  style of a button.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Optimise accessing toolbar style by storing it in the TOOLBAR_INFO
  structure.
- Replace {Get,Set}WindowLong by {Get,Set}WindowLongPtr where
  appropriate.

svn path=/trunk/; revision=9321
2004-05-08 11:41:05 +00:00
Gé van Geldorp
739592deab Patch by tonik <spammed@fromru.com>
GuiConsoleUpdateBitmap ignores the color attribute of the first character in
line, instead it takes the attribute of the last character of the previous line.

svn path=/trunk/; revision=9320
2004-05-08 09:19:53 +00:00
Filip Navara
eb065653f6 - Protect against reads from (and writes to) closed named pipes.
svn path=/trunk/; revision=9319
2004-05-07 12:13:13 +00:00
Eric Kohl
83d8ef34bb Enable the creation of nested desktop and start menu groups.
svn path=/trunk/; revision=9318
2004-05-07 11:18:53 +00:00
Royce Mitchell III
60676825a8 use bugcheck macros where appropriate so users have a better idea of why they crashed.
svn path=/trunk/; revision=9317
2004-05-07 05:12:10 +00:00
Royce Mitchell III
85f77bb306 fixed output from test
svn path=/trunk/; revision=9316
2004-05-07 04:04:10 +00:00
Thomas Bluemel
bcde8100ea fixed GetThreadDesktop() (not fully working yet because it requires a ObFindHandleForObject() implementation in case the requested thread doesn't belong to the calling process)
svn path=/trunk/; revision=9315
2004-05-05 22:47:06 +00:00
Thomas Bluemel
879f672ffe rewrote NtUserBuildHwndList()
svn path=/trunk/; revision=9314
2004-05-05 22:26:04 +00:00
Thomas Bluemel
e8953aae82 properly handle HTTRANSPARENT hittest with mouse messages
svn path=/trunk/; revision=9313
2004-05-05 22:13:17 +00:00
Filip Navara
333e6a58cb - Fixed various problems (hangs/crashes) with connecting, disconnecting and closing named pipes.
svn path=/trunk/; revision=9312
2004-05-05 18:30:16 +00:00
Filip Navara
65093d7a1e - Compile RPCRT4 without debug messages.
svn path=/trunk/; revision=9311
2004-05-05 18:30:13 +00:00
Eric Kohl
233a41e696 Implement AddItemW().
svn path=/trunk/; revision=9310
2004-05-05 15:29:15 +00:00
Thomas Bluemel
34d4fe2efd support the WS_EX_LEFTSCROLLBAR
svn path=/trunk/; revision=9309
2004-05-05 13:58:59 +00:00
Mike Nordell
2ff07f4497 Return reasonably correct result querying a null memory area. Still a TODO left.
svn path=/trunk/; revision=9308
2004-05-05 02:00:01 +00:00
Filip Navara
857e0edb82 - Fix recognition of CALL instruction. Spotted by Anich Gregor.
svn path=/trunk/; revision=9307
2004-05-04 21:16:51 +00:00
James Tabor
311d1ab004 Added Spinlock in ObpGetHandleCountbyHandleTable.
svn path=/trunk/; revision=9306
2004-05-04 20:18:52 +00:00
Filip Navara
4aeca8b2b1 - Remove old RPCRT4.
svn path=/trunk/; revision=9305
2004-05-04 20:12:04 +00:00
Thomas Bluemel
97a1bb9c2e added option -s to silence status output while processing
svn path=/trunk/; revision=9304
2004-05-04 20:10:18 +00:00
Filip Navara
1021b58459 - Merge RPC runtime from Wine.
svn path=/trunk/; revision=9303
2004-05-04 20:10:07 +00:00
Filip Navara
3eb8552cf1 - Remove old RPCRT4.
svn path=/trunk/; revision=9302
2004-05-04 20:03:37 +00:00
Filip Navara
cf6647ab2e - Forgot to commit this file when syncing the kernel32 test.
svn path=/trunk/; revision=9301
2004-05-04 19:55:10 +00:00
Filip Navara
ae6296eb10 - Remove IPHLPAPI headers copied from Wine.
- Add the necessary structures to W32API headers.

svn path=/trunk/; revision=9300
2004-05-04 19:53:14 +00:00
Filip Navara
c789493a59 - Updated kernel32 test to Wine-20040504.
svn path=/trunk/; revision=9299
2004-05-04 17:25:19 +00:00
Eric Kohl
57aa128d43 Implement DeleteItemW().
svn path=/trunk/; revision=9298
2004-05-04 13:11:22 +00:00
Gé van Geldorp
a02cf9bbfb Implement GetMenuItemInfoA/W
svn path=/trunk/; revision=9297
2004-05-03 22:16:09 +00:00
Filip Navara
73812409b4 - Implementation of IOCTL_VIDEO_QUERY_CURRENT_MODE. Based on patch by Herv� Poussineau.
svn path=/trunk/; revision=9296
2004-05-03 17:15:14 +00:00
Thomas Bluemel
99282d8160 forgot to remove some temporary debug output
svn path=/trunk/; revision=9295
2004-05-03 17:12:27 +00:00
Thomas Bluemel
69e19de407 cleanup of the unicode mess (im)ported from wine
svn path=/trunk/; revision=9294
2004-05-03 16:59:59 +00:00
Steven Edwards
2bde1ad87b removed WINE from list of EXTERNALS, disabled building psx and os2 subsystem from externals for the time being.
svn path=/trunk/; revision=9293
2004-05-03 15:29:01 +00:00
Thomas Bluemel
eae24c4093 implemented LoadModule()
svn path=/trunk/; revision=9292
2004-05-03 14:34:44 +00:00
Eric Kohl
03cfc7943a - Implement DeleteGroup().
- Implement ANSI profile directory functions.

svn path=/trunk/; revision=9291
2004-05-03 12:05:44 +00:00
Hartmut Birr
560afee25c - Don't read the disk informations at boot time from removable medias like zip drives.
This prevents from merging removable disks into the order of partitions from hard disks.

svn path=/trunk/; revision=9289
2004-05-02 22:54:45 +00:00
Hartmut Birr
2440a90d73 - Don't assign arc names to removable media drives like zip drives.
svn path=/trunk/; revision=9288
2004-05-02 22:49:24 +00:00
Gé van Geldorp
8220b586b4 Handle MENUITEMINFOW compiled with _WIN32_WINNT < 0x0500 (MENUITEMINFOW
misses the HBITMAP hbmpItem at the end in that case).

svn path=/trunk/; revision=9287
2004-05-02 21:41:18 +00:00
Mike Nordell
01e86752a1 Make loader tell what module it is relocating (debug)
svn path=/trunk/; revision=9286
2004-05-02 20:53:50 +00:00
Hartmut Birr
7450b416e4 - Fixed checking for a FAT file system on a removable media.
- Check more exactly for a FAT file system.

svn path=/trunk/; revision=9285
2004-05-02 20:16:46 +00:00
Hartmut Birr
38ed29a671 - Check more exactly for a FAT file system.
svn path=/trunk/; revision=9284
2004-05-02 20:12:38 +00:00
Hartmut Birr
a4b7d6a7a5 - Removed old debug code which may crash a user mode application.
svn path=/trunk/; revision=9283
2004-05-02 20:08:29 +00:00
Eric Kohl
00010bb088 Add missing io performance counters.
SystemPerformanceInformation reads io counters.

svn path=/trunk/; revision=9282
2004-05-02 19:34:21 +00:00
Thomas Bluemel
9ea61adcf9 implemented IsWindowInDestroy()
svn path=/trunk/; revision=9281
2004-05-02 17:25:21 +00:00
Thomas Bluemel
b2aa394176 implemented GetThreadLocale() and partly implemented SetThreadLocale()
svn path=/trunk/; revision=9280
2004-05-02 15:47:34 +00:00
Thomas Bluemel
3cc6704954 ported GetBinaryType() from wine
svn path=/trunk/; revision=9279
2004-05-02 14:47:05 +00:00
Art Yerkes
6ec9cfe422 Explanation of the files here.
svn path=/trunk/; revision=9278
2004-05-02 07:36:36 +00:00
Art Yerkes
223730ca41 First rev where a full connect - receive - disconnect cycle worked, although
data wasn't delivered to the client program.  The TCP performed correctly in
handling incoming data, connecting and acknowledging traffic.  Pared down
files to minimum needed.  I'll be able to do more later with the directory
structure, but this is quite workable.

Now working on the rest of the interface to the upper layer.

I'm trying to make this interface as generic as possible so that when IPv6
is added to reactos, there won't have to be too many changes.

svn path=/trunk/; revision=9277
2004-05-02 07:24:43 +00:00
James Tabor
f9df303240 Proper way for counting process handles.
svn path=/trunk/; revision=9275
2004-05-02 04:40:25 +00:00
Gé van Geldorp
f36cfa653a Always reset AUTO_RESIZE flag on exit from REBAR_ForceResize
svn path=/trunk/; revision=9274
2004-05-01 21:22:18 +00:00
Eric Kohl
db2d21de92 Fix Nt/ZwGetTickCount.
svn path=/trunk/; revision=9273
2004-05-01 19:22:49 +00:00
Thomas Bluemel
9c2e9ae15d include welcome.exe on the bootcd
svn path=/trunk/; revision=9272
2004-05-01 19:05:29 +00:00
Mike Nordell
6afc02946b Display module names with the stack trace on unhandled exception (debug)
svn path=/trunk/; revision=9271
2004-05-01 18:09:53 +00:00
Thomas Bluemel
1c49860e46 implemented AnyPopup()
svn path=/trunk/; revision=9270
2004-05-01 18:06:59 +00:00
Mike Nordell
86805ab86a MmQuerySectionView now returns correct AllocationBase (Hartmut Birr)
svn path=/trunk/; revision=9269
2004-05-01 17:11:34 +00:00
Thomas Bluemel
9e1f523308 implemented LockWindowStation() and UnlockWindowStation() (forgot to commit these changes in my previous commit)
svn path=/trunk/; revision=9268
2004-05-01 17:06:55 +00:00
Thomas Bluemel
56ee4446f0 implemented RegisterLogonProcess(), LockWindowStation() and UnlockWindowStation()
svn path=/trunk/; revision=9267
2004-05-01 16:43:15 +00:00
Eric Kohl
346aa0cca2 - Set ALLUSERSPROFILE environment variable upon logon.
- Implement CreateGroup().

svn path=/trunk/; revision=9266
2004-05-01 11:55:38 +00:00
Eric Kohl
58fa3560b2 Add required user shell folder settings.
svn path=/trunk/; revision=9265
2004-05-01 11:53:20 +00:00
Thomas Bluemel
29963dba5d don't use DrawFocusFrame for thin window moving rectangles
svn path=/trunk/; revision=9264
2004-05-01 11:43:52 +00:00
Thomas Bluemel
36599d2a2b fixed DrawFocusRect() to use values from SPI_GETFOCUSBORDERWIDTH/HEIGHT
svn path=/trunk/; revision=9263
2004-05-01 11:38:28 +00:00
Thomas Bluemel
9900ed382e changed SetCursorPos() to use SendInput()
svn path=/trunk/; revision=9262
2004-05-01 09:31:59 +00:00
Gé van Geldorp
d490382a4f Use only LSBit for 1bpp putpixel
svn path=/trunk/; revision=9261
2004-05-01 09:04:37 +00:00
Thomas Bluemel
b4abd1fae0 setup the cursor in the middle of the screen
svn path=/trunk/; revision=9260
2004-05-01 08:55:04 +00:00
Thomas Bluemel
b88aed24cb fix mouse clipping
svn path=/trunk/; revision=9259
2004-05-01 08:47:14 +00:00
Filip Navara
1eeed5accd - Add ASSERT for a palette size.
svn path=/trunk/; revision=9258
2004-05-01 00:51:51 +00:00
Mike Nordell
5b7d8220d3 Make MmQuerySectionView tell how many bytes it actually did set. Fixes VirtualQuery.
svn path=/trunk/; revision=9257
2004-05-01 00:25:41 +00:00
Filip Navara
8b99b4b1c0 - Avoid potencial access violation. Might fix bug #297.
svn path=/trunk/; revision=9256
2004-04-30 23:42:20 +00:00
Thomas Bluemel
c2d319d2d2 use SendInput() to send mouse input data
svn path=/trunk/; revision=9255
2004-04-30 22:18:00 +00:00
Gé van Geldorp
d25a045798 Change bugcheck parameter to easily find out which SESSION5_INITIALIZATION_FAILED
bugcheck occurred

svn path=/trunk/; revision=9254
2004-04-30 20:49:39 +00:00
Steven Edwards
afb4fdb6f1 Remove Visual Mingw. It didnt build anyway,
svn path=/trunk/; revision=9253
2004-04-30 17:56:14 +00:00
Filip Navara
c7eed44a94 CMD Enhancements:
- Fixed UNICODE build.
- Make the DIR /W behave like in Windows.
- Fixed various problems with command input going mad when the screen contents have scrolled.

svn path=/trunk/; revision=9252
2004-04-30 16:52:42 +00:00
Thomas Bluemel
8352c9c082 fixed brush origin
svn path=/trunk/; revision=9251
2004-04-30 14:22:44 +00:00
Gé van Geldorp
db615bc523 Fix TB_GETSTYLE to return the style of the toolbar when wParam is 0.
Spotted by Maxime Belleng� <maxime.bellenge@laposte.net>.
Fixes bug #290.

svn path=/trunk/; revision=9250
2004-04-30 09:55:16 +00:00
Thomas Bluemel
8d041e5355 silence debug message
svn path=/trunk/; revision=9249
2004-04-29 22:42:51 +00:00
Gé van Geldorp
e9a87d53bd Return NULL only in error case
svn path=/trunk/; revision=9248
2004-04-29 21:17:36 +00:00
Gé van Geldorp
edbeb9c88b Implement DDE Execute:
- Do required translations (KernelMode -> UserMode format, ASCII/Unicode)
  in GetMessage
- Call window proc directly from DispatchMessage instead of via callback
- Apply message filter to WM_PAINT and WM_NCPAINT messages
- Implement marshalling of pointer lParams for PostMessage

svn path=/trunk/; revision=9247
2004-04-29 21:13:16 +00:00
Thomas Bluemel
0f0200e106 don't crash if no thread desktop set
svn path=/trunk/; revision=9246
2004-04-29 20:41:03 +00:00
Thomas Bluemel
ddcbbf2e8d implemented keybd_event(), mouse_event(), BlockInput() and SendInput() - the server side however isn't implemented yet
svn path=/trunk/; revision=9245
2004-04-29 20:26:35 +00:00
Filip Navara
ed9f67afe7 - Initialize the serial port to reasonable state after the detection. (Needed by Virtual PC)
svn path=/trunk/; revision=9244
2004-04-29 17:06:21 +00:00
Filip Navara
0419425cb7 - Simplified the mapping of video memory. Now it works in Virtual PC 2004.
svn path=/trunk/; revision=9243
2004-04-29 16:55:37 +00:00
Eric Kohl
4056581a21 Implement AddDesktopItem() and DeleteDesktopItem().
svn path=/trunk/; revision=9242
2004-04-29 14:41:26 +00:00
Mike Nordell
de1dd3b0d4 stop kernel crashing on thread termination
svn path=/trunk/; revision=9240
2004-04-28 23:46:26 +00:00
Hartmut Birr
8111f57e17 - Dereference the idle process in some of the NtQuerySystemInformation functions.
svn path=/trunk/; revision=9239
2004-04-28 20:50:02 +00:00
Hartmut Birr
a0588eb04b - Set the offset for a physical page in MmGetPhysicalAddress.
svn path=/trunk/; revision=9238
2004-04-28 20:46:03 +00:00
Hartmut Birr
3c66806fb0 - Call the DriverStartIo routine at DISPATCH_LEVEL in IoStartPacket.
svn path=/trunk/; revision=9237
2004-04-28 20:42:01 +00:00
Hartmut Birr
e9ee16d561 - Fixed _chmod and _wchmod.
svn path=/trunk/; revision=9236
2004-04-28 20:20:00 +00:00
Filip Navara
47b812dde4 - Simplified handling of palettes selected into device contexts. Now DC->w.hPalette should always point to palette object and shoudn't be NULL.
- Fixed bitfield conversion when creating Color -> Mono XLATEOBJs. Fixes bug #275.

svn path=/trunk/; revision=9235
2004-04-28 18:38:07 +00:00
Aleksey Bragin
3f814d3837 Sorry about that it took so long to commit this file - I was installing a new HDD -> means a new OS installation, etc.
svn path=/trunk/; revision=9234
2004-04-28 12:55:21 +00:00
Jason Filby
de492d049e Followed Casper's advice to use macros to simplify regression tests
svn path=/trunk/; revision=9233
2004-04-27 20:31:32 +00:00
Filip Navara
6cb09490e5 - Fixed line endings and imm32.dll name.
svn path=/trunk/; revision=9232
2004-04-27 20:16:42 +00:00
Jason Filby
17bf83aa38 Second MDL test
svn path=/trunk/; revision=9231
2004-04-27 17:48:52 +00:00
Steven Edwards
855d8095ef Added imm32 and psapi to the CD.
(sorry if this messes up this is the first time I
am doing development from a Linux cross-compile)

svn path=/trunk/; revision=9230
2004-04-26 20:33:13 +00:00
Gunnar Dalsnes
42ad6cb85f make sure temp directory exist
svn path=/trunk/; revision=9229
2004-04-26 20:26:15 +00:00
Gunnar Dalsnes
63bc13d624 fix broken MakeSureDirectoryPathExists. It depended on Wine's
CreateDirectory, which seems to be more relaxed that the ros/Windows
version.

svn path=/trunk/; revision=9228
2004-04-26 20:24:04 +00:00
Gunnar Dalsnes
bdce3452a0 build imagehlp
svn path=/trunk/; revision=9227
2004-04-26 20:20:11 +00:00
Gunnar Dalsnes
68d020f48d make imagehlp import lib
svn path=/trunk/; revision=9226
2004-04-26 20:19:21 +00:00
Thomas Bluemel
be07990679 fixed NtGdiPtVisible()
svn path=/trunk/; revision=9225
2004-04-26 19:58:45 +00:00
Thomas Bluemel
4043538723 fixed hittest calculation
svn path=/trunk/; revision=9224
2004-04-26 17:49:04 +00:00
James Tabor
772e31feb1 Added Process HandleCount information.
svn path=/trunk/; revision=9223
2004-04-26 05:46:35 +00:00
Martin Fuchs
375cb8f522 handle GetDateFormat) failures
(idea by Thomas Weidenmueller)

svn path=/trunk/; revision=9222
2004-04-25 20:22:04 +00:00
Thomas Bluemel
c038032038 implemented GetDCBrushColor(), SetDCBrushColor(), GetDCPenColor() and SetDCPenColor(). they're UNTESTED so far!
svn path=/trunk/; revision=9221
2004-04-25 20:05:30 +00:00
Thomas Bluemel
ffa06b86eb implemented ExtSelectClipRgn() (untested!)
svn path=/trunk/; revision=9220
2004-04-25 16:40:39 +00:00
Thomas Bluemel
d69e5f4dee implemented ExcludeClipRect()
svn path=/trunk/; revision=9219
2004-04-25 16:06:20 +00:00
Thomas Bluemel
6a433d3812 implemented PtVisible()
svn path=/trunk/; revision=9218
2004-04-25 15:52:31 +00:00
Thomas Bluemel
eb9b7d6f5d implemented GetCurrentObject()
svn path=/trunk/; revision=9217
2004-04-25 15:31:43 +00:00
Thomas Bluemel
18d53db81a use "readable" parameter names in functions
svn path=/trunk/; revision=9216
2004-04-25 14:46:54 +00:00
Thomas Bluemel
1cacbc22e0 set proper errorcode in some functions
svn path=/trunk/; revision=9215
2004-04-25 12:51:53 +00:00
Thomas Bluemel
b22facf240 1. implemented hatched brushes
2. fixed memory leak when deleting patterned brushes
3. use brush origin in dib code

svn path=/trunk/; revision=9214
2004-04-25 11:34:13 +00:00
Filip Navara
2dcb05259a - Minor correction to RPC structures.
svn path=/trunk/; revision=9212
2004-04-24 21:35:24 +00:00
Thomas Bluemel
ed71de17e7 proper implementation of FrameRgn() (cannot be ported from wine because wine's implementation is wrong)
svn path=/trunk/; revision=9211
2004-04-24 14:21:37 +00:00
James Tabor
d0983a67cd Set 386 as default cpu type.
svn path=/trunk/; revision=9210
2004-04-24 05:11:54 +00:00
Thomas Bluemel
aeef6123b6 fixed some error cases
svn path=/trunk/; revision=9207
2004-04-23 21:35:59 +00:00
Filip Navara
e7d451e2fd - Correctly swap the Red and Blue colors while setting the palette on non-VGA compatible adapters.
svn path=/trunk/; revision=9206
2004-04-23 20:12:57 +00:00
Filip Navara
4e374dbe4b - Fix the emulation of 'inl' instruction in V86 mode.
svn path=/trunk/; revision=9205
2004-04-23 20:11:11 +00:00
Thomas Bluemel
eabb3b47ad fixed calculation of the non-client-area when WS_BORDER is set
svn path=/trunk/; revision=9204
2004-04-23 19:29:04 +00:00
Hartmut Birr
ac9fc6496a - Initialized the srb on each call to SpiSendInquiry.
svn path=/trunk/; revision=9203
2004-04-23 14:29:07 +00:00
Thomas Bluemel
5ad3f25a47 implemented InvertRgn()
svn path=/trunk/; revision=9202
2004-04-23 13:34:04 +00:00
James Tabor
8ab1cba914 Fixed my mistake in SystemProcessorInformation.
svn path=/trunk/; revision=9201
2004-04-23 06:19:28 +00:00
James Tabor
e20d930ab0 Fixed SystemProcessorInformation.
svn path=/trunk/; revision=9200
2004-04-23 05:37:10 +00:00
James Tabor
87065d0083 Fix return for cpuid.
svn path=/trunk/; revision=9199
2004-04-23 05:34:54 +00:00
James Tabor
8745574fb5 Fix GlobalMemoryStatus & Ex.
svn path=/trunk/; revision=9196
2004-04-22 02:20:52 +00:00
James Tabor
28dfa0ecb7 Implemented new Ros exclusive function SystemFullMemoryInformation.
This is used for suppling virtual user memory usage for GlobalMemoryStatusEx.

svn path=/trunk/; revision=9195
2004-04-22 01:57:49 +00:00
Hartmut Birr
22adb5da88 - Made some flags for the flag value from the FILE structure compatible with the mingw headers.
- Use _IO_LBF instead of _IOLBF, because _IOSTRG and _IOLBF has the same value.

svn path=/trunk/; revision=9194
2004-04-21 21:40:43 +00:00
Gunnar Dalsnes
8a39d95805 temp.workaround: allways free irp
svn path=/trunk/; revision=9191
2004-04-20 23:14:35 +00:00
James Tabor
9acfed6d38 Filip Navara NtGetTickCount implementation.
svn path=/trunk/; revision=9190
2004-04-20 20:39:19 +00:00
Gunnar Dalsnes
03cfbfef0a make mdl usage/impl. more windows compliant
svn path=/trunk/; revision=9189
2004-04-20 19:04:11 +00:00
Gunnar Dalsnes
d169532a77 make mdl impl. more windows compliant
svn path=/trunk/; revision=9188
2004-04-20 18:59:00 +00:00
Jason Filby
87b81bac7c Correct test for MmSizeOfMdl
svn path=/trunk/; revision=9187
2004-04-20 18:52:04 +00:00
Eric Kohl
9e797fd74b Fix typos.
svn path=/trunk/; revision=9186
2004-04-19 10:55:04 +00:00
Eric Kohl
ddaf880002 - Use new userenv.h prototypes.
- Add new dialogs to Czech language for translation.
- Make install wizard code UNICODE aware.

svn path=/trunk/; revision=9185
2004-04-19 10:54:23 +00:00
Eric Kohl
2716e12077 Implement CreateUserProfileA().
svn path=/trunk/; revision=9184
2004-04-19 10:51:17 +00:00
Eric Kohl
0441662dd1 Add private prototypes. Don't contribute them to MinGW!
svn path=/trunk/; revision=9183
2004-04-19 10:50:19 +00:00
Hartmut Birr
4debbe40cc - Fixed the open counter in IntVideoPortDispatchClose.
svn path=/trunk/; revision=9182
2004-04-18 12:59:14 +00:00
James Tabor
331cdb2fcd Add BasePriorty to ProcessBasicInformaion.
svn path=/trunk/; revision=9181
2004-04-18 06:08:36 +00:00
James Tabor
92d947082b Fix Kernel User Timer.
svn path=/trunk/; revision=9177
2004-04-18 00:52:57 +00:00
James Tabor
27b608d040 Fix Kernel User Timer and added ProcessTimes to QueryInformatinProcess
svn path=/trunk/; revision=9176
2004-04-18 00:50:53 +00:00
Thomas Bluemel
b5ae6df350 reverted last change
svn path=/trunk/; revision=9175
2004-04-17 20:23:20 +00:00
Eric Kohl
4845295e63 'Del *.*' ignores directories.
This fixes bug 291.

svn path=/trunk/; revision=9174
2004-04-17 12:01:04 +00:00
Thomas Bluemel
9e9160f508 fixed some scrollbar issues
svn path=/trunk/; revision=9173
2004-04-17 11:00:14 +00:00
Filip Navara
61878c60d2 - Improved RPC headers.
svn path=/trunk/; revision=9170
2004-04-17 07:41:26 +00:00
Gé van Geldorp
b656708fcc Merge back commit from WineHQ
svn path=/trunk/; revision=9169
2004-04-17 07:32:44 +00:00
Filip Navara
b4ff26c3b6 Temporary revert this patch, because it causes a lot of crashes. I sent a message to wine-devel describing the problem.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix subclassing to support nested messages.

svn path=/trunk/; revision=9168
2004-04-16 23:44:19 +00:00
Thomas Bluemel
fb5087e80c fixed missing window dereferences and a minor thread-safety bug
svn path=/trunk/; revision=9167
2004-04-16 21:50:26 +00:00
Filip Navara
b6da18c3a0 Force resize before calling RBN_HEIGHTCHANGE notification.
svn path=/trunk/; revision=9166
2004-04-16 20:52:51 +00:00
Thomas Bluemel
c4bde9bbf1 properly remove mousemove messages
svn path=/trunk/; revision=9165
2004-04-16 18:53:53 +00:00
Eric Kohl
f269c53d06 Clear data buffer before sending the INQUIRY command.
svn path=/trunk/; revision=9164
2004-04-16 13:39:46 +00:00
Eric Kohl
dc45d5f3f3 Implement the GUI setup wizard.
svn path=/trunk/; revision=9163
2004-04-16 13:37:18 +00:00
Gé van Geldorp
956eca91cf Update status of ported DLLs
svn path=/trunk/; revision=9162
2004-04-16 09:13:21 +00:00
Gé van Geldorp
3f429071a7 Sync to Wine-20040408
svn path=/trunk/; revision=9160
2004-04-16 09:11:30 +00:00
Gé van Geldorp
4374bb1685 Sync to Wine-20040408
Eric Pouech <pouech-eric@wanadoo.fr>
- implemented MCI_SOUND command
- fixed MCI command table in resource
- added a TODO list on MCI handling
Christian Costa <titan.costa@wanadoo.fr>
- MCI strings are case insensitive.
- Fixed a returned error value.
- Default to FOURCC_DOS if no IOProc found.

svn path=/trunk/; revision=9159
2004-04-16 09:04:04 +00:00
Gé van Geldorp
36e8261e77 Sync to Wine-20040408:
Alexandre Julliard:
- Added memicmpW.

svn path=/trunk/; revision=9158
2004-04-16 08:58:34 +00:00
Gé van Geldorp
e20e56a546 Sync to Wine-20040408:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implement SHMessageBoxCheck functions && add dialog resources.
- Add SHWaitForSendMessageThread, SHAnsiToUnicodeCP,SHStripMneumonicW,
  SHSearchMapInt.
- Make copies of keys when creating, free them when done.
- Use KEY_ALL_ACCESS when writing US reg values.
- SHRegWriteUSValueW: Handle all flag combinations.
- Make some A calls use the W version.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.
Ulrich Czekalla <ulrich@codeweavers.com>
- Implement FixSlashesAndColonW and add stub for SHGetAppCompatFlags.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- UrlCanonicalizeW: Remove \r and \n at the end of lpszUrlCpy, with test
  cases.

svn path=/trunk/; revision=9157
2004-04-16 08:47:55 +00:00
Gé van Geldorp
768e79dd1f Sync to Wine-20040408:
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.

svn path=/trunk/; revision=9156
2004-04-16 08:36:17 +00:00
Gé van Geldorp
d32be1b605 Sync to Wine-20040408:
Warren Turkal <wt@midsouth.rr.com>
- Fixed the implementation of CoTreatAsClass.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=9155
2004-04-16 08:31:25 +00:00
James Tabor
1954069fed VmWare is having problems with Volatile and Atomic process counters at boot time. Fix later
svn path=/trunk/; revision=9154
2004-04-16 01:28:15 +00:00
Thomas Bluemel
fb6ac7fe65 minor fix
svn path=/trunk/; revision=9153
2004-04-16 01:27:44 +00:00
Thomas Bluemel
8eca059c02 1. move SendMessage calls out of the message queue processing code
2. fixed translation of coordinates calculation in different thread states (capturing, in menus, ...)
3. Proper implementation of Set/GetWindowText/Length() (as described in
4. speed improvements

svn path=/trunk/; revision=9152
2004-04-15 23:36:03 +00:00
Thomas Bluemel
1771d71894 fix linking error
svn path=/trunk/; revision=9151
2004-04-15 18:52:45 +00:00
Thomas Bluemel
2751202062 Masahiro Taguchi - small windowbar sizing fix for WS_EX_TOOLWINDOW
svn path=/trunk/; revision=9150
2004-04-15 11:44:03 +00:00
Gé van Geldorp
b8549e32fa Sync to Wine-20040408:
Juan Lang <juan_lang@yahoo.com>
- implement loading network providers
- implement enumeration functions
- some improved error checking and A->W conversion

svn path=/trunk/; revision=9149
2004-04-15 09:28:04 +00:00
Gé van Geldorp
3d289e8e05 Sync to Wine-20040408:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Separate US English resources from English ones.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.
Marcelo Duarte <wine-devel@bol.com.br>
- Minor updates in resource for Portuguese.
Rein Klazes <rklazes@xs4all.nl>
- Fix a possible null pointer crash in FILEDLG95_LOOKIN_Init.

svn path=/trunk/; revision=9148
2004-04-15 08:42:21 +00:00
Gé van Geldorp
5f3c9e9df2 Sync to Wine-20040408:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Add cursor resource.
- Implement TB_MOVEBUTTON.
- Implement drag customise.
- Send TBN_TOOLBARCHANGE and TBN_DELETINGBUTTON.
- Spelling fixes.
- Fix subclassing to support nested messages.
- Document control completeness.
- Remove unneeded include.
- Fix TEXT define.
- Fix tabs.
- Small optimisation in DrawInsert.
- Fix LButtonDown from previous change.
- Don't use BF_ADJUST flag for dropdown buttons.
- Fix LButtonDblClk.
- Fix SetBitmapSize.
- Fix SetButtonInfo.
- Documentation update.
- Better hot item handling.
- Fix DrawMasked to always use the right image list and bitmap index.
- Document completeness.
- Finish tooltip support.
- Honour WM_SETREDRAW.
- Fix all calls of InvalidateRect.
- Implement TB_LOADIMAGES, TB_MAPACCELERATOR{A,W}, TB_MARKBUTTON and
  undocumented message 0x460.
- Better debug output of undocumented message 0x45D.
- Add support for a toolbar global iListGap.
- Make TOOLBAR_CalcToolbar and TOOLBAR_DrawButton not rely on "magic
  numbers" and calculate sizes and positions more like native.
- Rewrite drawing code.
- TTM_TRACKACTIVATE can have NULL lParam when deactivating.
- Factor out common code from TOOLTIPS_DelTool{A,W}.
- Update all indices correctly after delete.
- Unicode notification detection should be local to each tool.
- Implement TTN_GETDISPINFOW notification.
Alexandre Julliard
- Do not kill the animation thread with TerminateThread, let it finish
  properly.
- Fixed a couple of races with the animation thread.
Juan Lang <juan_lang@yahoo.com>
- Prevent negative coords for line, turn off redraw when initializing,
  document one difference in native/builtin behavior.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Mike McCormack <mike@codeweavers.com>
- Make sure the rebar size is above a minimum.
- Make sure to take account of hidden bands during layout.
- Don't calculate the redundant and unused REBAR_ROW structures.
Filip Navara <xnavara@volny.cz>
- Support for RBBS_HIDETITLE style.
Ulrich Czekalla <ulrich@codeweavers.com>
- Fix rebar band insertion and non-client calculation in pager control.
Huw Davies <huw@codeweavers.com>
- Fix dumb error from rev. 1.158.
- When setting the buddy to 0 then we must still resize the updown
  control.
- Added CS_HREDRAW.
Ge van Geldorp <gvg@reactos.com>
- Explicitly ask for image list with screen depth as ILC_COLOR can/will
  limit the depth to 4bpp now.

svn path=/trunk/; revision=9147
2004-04-15 08:29:57 +00:00
Thomas Bluemel
b5c06d7dbd better handling of invalid strings in IntSafeCopyUnicodeString()
svn path=/trunk/; revision=9146
2004-04-14 23:40:43 +00:00
James Tabor
a746bec6f1 Improved Passive Level kernel and user time counters.
svn path=/trunk/; revision=9145
2004-04-14 23:32:53 +00:00
Thomas Bluemel
9a4b93f87e rewrote NtUserFindWindowEx() so it works as it's supposed to. This function is currently called from FindWindowEx(), however there should be a usermode implementation of FindWindowEx() that sends WM_GETTEXT messages to windows belonging to the caller's process. This is not done and should not be done from the kernel mode version.
svn path=/trunk/; revision=9144
2004-04-14 23:17:56 +00:00
Thomas Bluemel
78b070f6b0 enable a debug message
svn path=/trunk/; revision=9143
2004-04-14 20:18:12 +00:00
Thomas Bluemel
c62a106e0c removed unused variable
svn path=/trunk/; revision=9142
2004-04-14 19:07:14 +00:00
Thomas Bluemel
34ec714d1b treat WM_NCMOUSEMOVE message as WM_MOUSEMOVE messages
svn path=/trunk/; revision=9141
2004-04-14 19:06:02 +00:00
Thomas Bluemel
9816ef1a2b forgot to commit a fix
svn path=/trunk/; revision=9140
2004-04-14 17:35:47 +00:00
Thomas Bluemel
81a46fb20d fixed major bugs in the message queue
svn path=/trunk/; revision=9139
2004-04-14 17:19:38 +00:00
James Tabor
b325c3fecb Need more time to work audit patch
svn path=/trunk/; revision=9138
2004-04-14 17:14:45 +00:00
James Tabor
93a7d0e19d Fix by Marc Schtz.
svn path=/trunk/; revision=9137
2004-04-14 12:17:26 +00:00
James Tabor
7d88f002d2 Implementation of system performance auditing hax.
svn path=/trunk/; revision=9136
2004-04-14 07:11:20 +00:00
Thomas Bluemel
900e819d27 little fix
svn path=/trunk/; revision=9135
2004-04-13 23:25:54 +00:00
Thomas Bluemel
b4472c0848 fixed implementation of ChildWindowFromPointEx()
svn path=/trunk/; revision=9134
2004-04-13 23:12:30 +00:00
Thomas Bluemel
bbd9b3d4a8 added paramter -e to skip and count empty lines
svn path=/trunk/; revision=9133
2004-04-13 21:34:45 +00:00
Martin Fuchs
b1a7c433b7 correct error handling in SHELL32_ParseNextElement()
svn path=/trunk/; revision=9132
2004-04-13 20:55:45 +00:00
Martin Fuchs
23a76b4fa1 return "file not found" error values instead of E_INVALIDARG if _ILCreateFromPathA() failed to find files
svn path=/trunk/; revision=9131
2004-04-13 20:54:05 +00:00
Martin Fuchs
ecef0f56e1 merge Wine commit:
Filip Navara <xnavara@volny.cz>
Get rid of non-standard ERROR_UNKNOWN value. The IShellLink case was
tested, others were replaced with reasonable values.

svn path=/trunk/; revision=9130
2004-04-13 20:50:04 +00:00
Martin Fuchs
df24731574 make drive letters in PIDLs always uppercase to enable PIDL comparison
svn path=/trunk/; revision=9129
2004-04-13 20:47:19 +00:00
Jason Filby
4245c59dc1 Update memory regression test and split MDL tests into new file series
svn path=/trunk/; revision=9128
2004-04-13 20:30:58 +00:00
Martin Fuchs
d6e3263af5 return TRUE for TVM_EXPAND if treeview item is already expanded
svn path=/trunk/; revision=9127
2004-04-13 19:51:44 +00:00
Martin Fuchs
ee28a3ec39 spelling fixes
svn path=/trunk/; revision=9126
2004-04-13 19:23:15 +00:00
Thomas Bluemel
e2cebfc8d6 fixed crashes caused by an invalid pointer
svn path=/trunk/; revision=9125
2004-04-13 18:40:00 +00:00
Thomas Bluemel
2a3a6e1dda directly get the window text when drawing the caption bar
svn path=/trunk/; revision=9124
2004-04-13 17:25:22 +00:00
Thomas Bluemel
fa3672479b properly free unicode string
svn path=/trunk/; revision=9123
2004-04-13 16:55:54 +00:00
Thomas Bluemel
83af90bff4 don't pass ansi strings to win32k!!!!
svn path=/trunk/; revision=9122
2004-04-13 16:48:45 +00:00
Thomas Bluemel
83af3eae1d post focus messages to different threads
svn path=/trunk/; revision=9121
2004-04-13 13:50:31 +00:00
Thomas Bluemel
b9a55f9ce0 fixed memory leak
svn path=/trunk/; revision=9120
2004-04-13 00:06:50 +00:00
KJK::Hyperion
ba45b57272 System call thunk generation made marginally more portable:
- generate real C functions with inline asm. Should fix a problem with cross-compilation on 64-bit hosts
 - store parameter count, not parameter block size in sysfuncs.lst

svn path=/trunk/; revision=9119
2004-04-12 22:07:45 +00:00
James Tabor
b7a5d0ed98 Add Debug header.
svn path=/trunk/; revision=9118
2004-04-12 19:52:36 +00:00
Martin Fuchs
bdf792d41a ShellBrowserChild: jump to addressbar target
svn path=/trunk/; revision=9117
2004-04-12 19:49:12 +00:00
Martin Fuchs
77fbf2134e comments
svn path=/trunk/; revision=9116
2004-04-12 18:07:38 +00:00
Martin Fuchs
ec66d1b6b9 show waitcursor when switching to anotehr dir
svn path=/trunk/; revision=9115
2004-04-12 17:57:44 +00:00
Filip Navara
c93eb9e54e - Reverted my last changed, should go to branch!
svn path=/trunk/; revision=9114
2004-04-12 17:31:01 +00:00
Filip Navara
75a32eddd8 - Reverted my last changed, should go to branch!
svn path=/trunk/; revision=9112
2004-04-12 17:20:47 +00:00
Filip Navara
15d5f5709e - Initial hacky implementation of some SCM calls needed by coLinux.
svn path=/trunk/; revision=9110
2004-04-12 17:14:55 +00:00
Filip Navara
318d9e885e - Return some reasonable values from GlobalMemoryStatusEx.
svn path=/trunk/; revision=9109
2004-04-12 17:09:36 +00:00
Martin Fuchs
f6288bd6e9 immediatelly maximize first MDI child window
svn path=/trunk/; revision=9108
2004-04-12 17:09:04 +00:00
Thomas Bluemel
17b4be229e minor fix
svn path=/trunk/; revision=9107
2004-04-12 16:14:54 +00:00
Thomas Bluemel
ba87b6d902 don't copy files if already present
svn path=/trunk/; revision=9106
2004-04-12 16:09:45 +00:00
Martin Fuchs
6a3ea3a956 - fix Entry::read_tree() and get_next_path_component()
- jump to FileChildWindow's directory when entered in address bar

svn path=/trunk/; revision=9105
2004-04-12 15:58:48 +00:00
Filip Navara
d24371eaec - Remove the hack implemenation of LookupPrivilegeValueW.
- Don't check for load driver privilege yet.
- Don't try to acquire load driver privilege in Services.

svn path=/trunk/; revision=9103
2004-04-12 15:22:53 +00:00
Martin Fuchs
95182ed8f5 remove MB_ERR_INVALID_CHARS flag
svn path=/trunk/; revision=9102
2004-04-12 15:08:14 +00:00
Filip Navara
a885a5c4bc - Minor correction to returned error.
svn path=/trunk/; revision=9101
2004-04-12 14:46:02 +00:00
Thomas Bluemel
83d22245fd make the bitmap look like it's supposed to
svn path=/trunk/; revision=9100
2004-04-12 14:10:50 +00:00
Thomas Bluemel
755a1a820f reverted, my mistake
svn path=/trunk/; revision=9099
2004-04-12 13:13:38 +00:00
Thomas Bluemel
a1240dac2e forgot adding the floppy driver
svn path=/trunk/; revision=9098
2004-04-12 13:10:19 +00:00
Filip Navara
de77cb9e79 - Fixed connection/disconnecting/closing handling, so we don't connect to dead and disconnected pipes.
- Handle the OPEN_EXISTING flag correctly.
- Report reasonable error messages instead of STATUS_UNSUCCESSFUL.

svn path=/trunk/; revision=9097
2004-04-12 13:03:29 +00:00
Thomas Bluemel
d7bba47d07 added some makefiles
svn path=/trunk/; revision=9096
2004-04-12 12:08:53 +00:00
Martin Fuchs
ea01087f9c check in gpl.txt as binary UTF-16 file
svn path=/trunk/; revision=9095
2004-04-12 11:07:54 +00:00
Martin Fuchs
7550de503a remove gpl.txt before adding again with -kb
svn path=/trunk/; revision=9094
2004-04-12 11:07:13 +00:00
Martin Fuchs
bdc459faa9 one more error handling fix for GetTimeFormatA()
svn path=/trunk/; revision=9093
2004-04-12 10:49:48 +00:00
Martin Fuchs
a46eec6cea - RosGetTimeFormat(): replace "if (!cchTime) ; else ..." by "if (cchTime)" and adjust comment
- Kohn Emil Dan <emild@cs.technion.ac.il>:

1) RosGetTimeFormat() has a small bug. The last statement should be
return nPos;
and not
return cchTime;

2) GetTimeFormatA() is not implemented. I have written an implementation
for it, which calls GetTimeFormatW(), and converts the string parameters
back and forth.

(committed with adjustments for correct error handling)

svn path=/trunk/; revision=9092
2004-04-12 10:19:43 +00:00
Filip Navara
03124cf16a - Don't declare DWORDLONG as double!
svn path=/trunk/; revision=9091
2004-04-12 09:50:01 +00:00
Martin Fuchs
387d641ed5 optimize favorites sidebar
svn path=/trunk/; revision=9090
2004-04-12 07:38:17 +00:00
Martin Fuchs
2a1a6cbf85 simplified chinese resources by Larry Li <larry@mimios.com>
svn path=/trunk/; revision=9089
2004-04-12 07:37:08 +00:00
Filip Navara
1ff2de0b1a - Implement LookupPrivilegeValueW.
svn path=/trunk/; revision=9087
2004-04-11 19:21:43 +00:00
Gé van Geldorp
968753f694 Add fastinstall target which copies the files but doesn't rebuild the
registry

svn path=/trunk/; revision=9086
2004-04-11 16:51:56 +00:00
Jason Filby
e2c7015e0a Reenable NDEBUG
svn path=/trunk/; revision=9085
2004-04-11 16:10:05 +00:00
Jason Filby
763fb168d1 AcquireLoadDriverPrivilege() to fix problem with SCM not being able to load drivers. Patch by Filip Navara.
svn path=/trunk/; revision=9084
2004-04-11 16:09:11 +00:00
Jason Filby
f2d2a85374 Two DPRINTs for NtLoadDriver failure cases
svn path=/trunk/; revision=9083
2004-04-11 15:31:21 +00:00
Jason Filby
73cb58e922 Add missing include tchar.h
svn path=/trunk/; revision=9082
2004-04-11 13:39:59 +00:00
Martin Fuchs
e848449f54 correct IShellFolder::GetAttributesOf() for the case *dwAttributes=0
svn path=/trunk/; revision=9081
2004-04-11 13:24:29 +00:00
Gé van Geldorp
45267ce58d Bump version number
svn path=/trunk/; revision=9080
2004-04-11 09:57:18 +00:00
Gé van Geldorp
b17d0f5101 - Implement NULL module case for EngFindImageProcAddress
- Add stubs for EngFindImageProcAddress()able not present yet

svn path=/trunk/; revision=9079
2004-04-11 09:09:38 +00:00
Eric Kohl
eddb2f5168 Implement tape IO functions.
svn path=/trunk/; revision=9078
2004-04-10 23:20:17 +00:00
Gunnar Dalsnes
dbb520a63f indent using astyle v1.15.3: astyle --style=ansi -c -s3 -S --convert-tabs %1
svn path=/trunk/; revision=9077
2004-04-10 22:36:07 +00:00
Martin Fuchs
4a875cac12 awake address bar to life
svn path=/trunk/; revision=9076
2004-04-10 20:31:18 +00:00
Filip Navara
30ed90f0b3 - Fix a stupid bug that prevented writing to pipes from working.
svn path=/trunk/; revision=9075
2004-04-10 16:20:59 +00:00
Eric Kohl
cc1629adc6 Fix TAPE_GET_POSITION and TAPE_SET_POSITION structures.
svn path=/trunk/; revision=9074
2004-04-10 16:05:18 +00:00
Martin Fuchs
35290117a3 adjust for WINE
svn path=/trunk/; revision=9073
2004-04-10 14:15:54 +00:00
Martin Fuchs
fe26854c52 avoid to use return length of RegQueryValueW
svn path=/trunk/; revision=9072
2004-04-10 12:56:18 +00:00
Martin Fuchs
74b7a8a0ca fix toggeling of toolbar windows
svn path=/trunk/; revision=9070
2004-04-10 12:07:11 +00:00
Martin Fuchs
f9cb0ec833 activate web bookmarks in cabinet windows
svn path=/trunk/; revision=9069
2004-04-10 10:12:35 +00:00
Filip Navara
17abe3357c - Implement FindWindowEx for case when ClassName == NULL.
svn path=/trunk/; revision=9068
2004-04-10 07:37:28 +00:00
Filip Navara
d0003f99f5 - Handle the case where no BrushOrigin is given even under EngStretchBlt and EngMaskBitBlt.
svn path=/trunk/; revision=9067
2004-04-10 00:58:14 +00:00
Filip Navara
565d0c19a4 - Remove forgotten DbgPrint.
svn path=/trunk/; revision=9066
2004-04-10 00:54:35 +00:00
Thomas Bluemel
cef28e1bf5 handle the case where no BrushOrigin is given
svn path=/trunk/; revision=9065
2004-04-09 22:27:39 +00:00
Gé van Geldorp
80a373534a Compensate BrushOrigin for translation
svn path=/trunk/; revision=9063
2004-04-09 22:13:26 +00:00
Filip Navara
97635093cd - Commit the correct changes to HEAD.
svn path=/trunk/; revision=9062
2004-04-09 22:00:38 +00:00
Filip Navara
12b4cb63bf - Include "roscfg.h".
svn path=/trunk/; revision=9061
2004-04-09 21:22:18 +00:00
Filip Navara
ca61a750e8 - Fixed DPRINTs.
svn path=/trunk/; revision=9060
2004-04-09 21:01:02 +00:00
Filip Navara
159aae243b Compile Win32k using W32API [Part II]:
- Replace usage of "ntddvid.h" header with "ntddvdeo.h".
- Remove some old and now unused headers.

svn path=/trunk/; revision=9059
2004-04-09 20:39:11 +00:00
Martin Fuchs
4043af4b0b Merge Wine shell32 commit:
Francois Gouget <fgouget@free.fr>
Cleanup the handling of the extension in SHELL_FindExecutable():
- Eliminate the corresponding fixed-size buffer which removes the limitation to 3 character extensions.
- Fix handling of the trailing '.' case.
- Do a case-insensitive check for the extension in win.ini.
  Increase the size of the command buffer to 1024.

svn path=/trunk/; revision=9058
2004-04-09 20:33:45 +00:00
Filip Navara
d05fb60776 Add LPC_MESSAGE_BASE_SIZE definition.
svn path=/trunk/; revision=9057
2004-04-09 20:29:29 +00:00
Martin Fuchs
b165b56577 Merge Wine shell32 commits:
Juan Lang <juan_lang@yahoo.com>
- comment fixes
- improved error checking and conformance with Windows
- remove some spurious error messages
- Move control panel applet enumeration to cpanelfolder.c.
- move CreateMyCompEnumList and CreateDesktopEnumList to their respective files
- rewrite CreateFolderEnumList to only FindFirstFile/FindNextFile once

svn path=/trunk/; revision=9056
2004-04-09 20:24:24 +00:00
Filip Navara
f2e2102f39 Fixed .cvsignore.
svn path=/trunk/; revision=9055
2004-04-09 20:24:13 +00:00
Martin Fuchs
a80aa40a8f fix floating favorites menus
svn path=/trunk/; revision=9054
2004-04-09 20:16:47 +00:00
Filip Navara
31c1c21824 - Compile Win32k, GDI, USER32 and CSRSS using W32API.
svn path=/trunk/; revision=9053
2004-04-09 20:03:21 +00:00
Martin Fuchs
db6bcc0793 remove unused variable
svn path=/trunk/; revision=9052
2004-04-09 19:46:15 +00:00
Martin Fuchs
bd41908243 remove unused variable
svn path=/trunk/; revision=9051
2004-04-09 19:45:37 +00:00
Martin Fuchs
05cab1ebfd replace previous favorites start menu folder implementation by fast FavoritesMenu (using the internal XML bookmark informations)
svn path=/trunk/; revision=9050
2004-04-09 19:42:21 +00:00
Thomas Bluemel
50133e0fad added tool for easy installation of the VMware SVGA driver
svn path=/trunk/; revision=9047
2004-04-09 18:27:11 +00:00
Martin Fuchs
7f72303d64 fix XML formating
svn path=/trunk/; revision=9045
2004-04-09 11:51:37 +00:00
Filip Navara
37bfcac65a - Register the standard control classes in GetClassInfo[Ex][AW] if needed.
svn path=/trunk/; revision=9044
2004-04-08 21:14:21 +00:00
Filip Navara
d7d8c7ba0f - Fix a small bug in RtlUnwind.
svn path=/trunk/; revision=9043
2004-04-08 21:14:18 +00:00
Jason Filby
c7da1f1e6a Correct test of value returned from MmQuerySystemSize
svn path=/trunk/; revision=9042
2004-04-08 20:50:02 +00:00
Jason Filby
80198861f1 Remove a DbgPrint used in testing
svn path=/trunk/; revision=9041
2004-04-08 20:49:15 +00:00
Jason Filby
7b4c7821ec Implement MmIsNonPagedSystemAddressValid as a call to MmIsAddressValid
svn path=/trunk/; revision=9040
2004-04-08 20:27:10 +00:00
Jason Filby
9108d0353a Fix MmIsAddressValid to check if VirtualAddress >= KERNEL_BASE
svn path=/trunk/; revision=9039
2004-04-08 20:05:08 +00:00
Gé van Geldorp
41d4ef6885 Export _wcmdln
svn path=/trunk/; revision=9038
2004-04-08 17:53:30 +00:00
Filip Navara
9f3885512a - Don't bugcheck if FDO wasn't attached.
svn path=/trunk/; revision=9036
2004-04-08 16:01:47 +00:00
Filip Navara
ba54c6c892 - Fixed minor bug in VGA driver.
svn path=/trunk/; revision=9033
2004-04-08 15:45:18 +00:00
Filip Navara
57e1e034b8 - Fixed a typo: 0x31 -> 31
svn path=/trunk/; revision=9032
2004-04-08 15:45:17 +00:00
Gé van Geldorp
9358255f84 HwResetHw can be (and sometimes is) NULL
svn path=/trunk/; revision=9030
2004-04-08 15:36:36 +00:00
Thomas Bluemel
7cb3dcec2c some fixes so it can also be compiled as a unicode app
svn path=/trunk/; revision=9028
2004-04-08 12:47:49 +00:00
Thomas Bluemel
b351485907 some fixes that caused crashes
svn path=/trunk/; revision=9027
2004-04-08 12:25:00 +00:00
Filip Navara
f051684bf8 - Add registry entries for SVGA VBE driver.
- Include the driver on the Boot CD.

svn path=/trunk/; revision=9026
2004-04-08 09:44:26 +00:00
Filip Navara
638280971c - Implement brush origin for 4bpp blits.
svn path=/trunk/; revision=9025
2004-04-08 09:44:21 +00:00
Filip Navara
a7270ad893 - Fixed releasing of display ownership.
svn path=/trunk/; revision=9024
2004-04-08 09:43:55 +00:00
Filip Navara
3cb07b0ba8 - Fixed initalization of VIDEO_HW_INITIALIZATION_DATA, because the Video Port driver now checks the values.
svn path=/trunk/; revision=9023
2004-04-08 09:43:35 +00:00
Thomas Bluemel
7aee09070d fixed clipping bug in TransparentBlt(). Thanks to Filip for fixing it
svn path=/trunk/; revision=9022
2004-04-07 22:17:36 +00:00
Martin Fuchs
f53f1a1b98 better looking bookmark icons
svn path=/trunk/; revision=9021
2004-04-07 22:11:24 +00:00
Thomas Bluemel
0e07c33bcc fixed handling left-over pixels in TransparentBlt()
svn path=/trunk/; revision=9020
2004-04-07 22:09:09 +00:00
Gé van Geldorp
bb60332c70 Fix memory leak, thanks to Thomas for spotting this
svn path=/trunk/; revision=9019
2004-04-07 21:12:40 +00:00
Gé van Geldorp
9edefdbda2 - When SendMessageTimeout times out, the CompletionEvent goes out of scope,
so tell the target thread not to signal it
- Replace message queue hardware lock FAST_MUTEX with KMUTEX so it can
  be recursively acquired

svn path=/trunk/; revision=9018
2004-04-07 21:12:08 +00:00
Martin Fuchs
c3cb9779e3 Merge latest Wine commits:
Juan Lang <juan_lang@yahoo.com>
Use symbolic constants for magic numbers in SHGetFolderPathW, avoid
doing MultiByteToWideChar on values that don't need it,

Juan Lang <juan_lang@yahoo.com>
Rename PT_MYCOMP to PT_GUID, and the corresponding union member from mycomp to guid.

Martin Fuchs <martin-fuchs@gmx.net>
Resolve shell shortcuts and process ID lists in ShellExecute() functions.

Juan Lang <juan_lang@yahoo.com>
- comment fixes
- improved error checking and conformance with Windows
- remove some spurious error messages

svn path=/trunk/; revision=9017
2004-04-07 20:41:31 +00:00
Filip Navara
72776b9bcb - Fixed order of bits in a byte for pattern brushes.
svn path=/trunk/; revision=9016
2004-04-07 20:23:38 +00:00
Filip Navara
578af8b934 - Fixed a small and stupid bug. We were incrementing DestBits by sizeof(ULONG) instead of sizeof(BYTE).
svn path=/trunk/; revision=9015
2004-04-07 20:04:22 +00:00
Filip Navara
5a528bd57a - Lock the surface even for GDI blits in IntEngBitBlt, because it mustn't be simulantously accessed.
svn path=/trunk/; revision=9014
2004-04-07 19:57:43 +00:00
Thomas Bluemel
f38bef7c32 better statistics
svn path=/trunk/; revision=9013
2004-04-07 19:25:27 +00:00
Gé van Geldorp
87a878a82e I should test small changes too before committing... Sorry.
svn path=/trunk/; revision=9012
2004-04-07 18:05:16 +00:00
Gé van Geldorp
335631830d - Pass args to MsqSendMessage in correct order
- Implement message sending to HWND_BROADCAST

svn path=/trunk/; revision=9011
2004-04-07 17:52:32 +00:00
Gé van Geldorp
7885bdaef7 Include netapi32.dll and setupapi.dll in default build/setup
svn path=/trunk/; revision=9010
2004-04-07 17:48:15 +00:00
Gé van Geldorp
7a27e9d3bf CVS maintenance
svn path=/trunk/; revision=9009
2004-04-07 17:45:05 +00:00
Gé van Geldorp
d5bc2e4dc7 Change to __stdcall calling convention
svn path=/trunk/; revision=9008
2004-04-07 17:42:05 +00:00
Thomas Bluemel
d8dd152253 little clean-up
svn path=/trunk/; revision=9007
2004-04-07 16:38:27 +00:00
Thomas Bluemel
54dbe4faf6 little clean-up
svn path=/trunk/; revision=9006
2004-04-07 15:37:50 +00:00
Eric Kohl
586548d926 Fixed crashes that were cause by the changes to the service parameter table.
svn path=/trunk/; revision=9005
2004-04-07 15:35:14 +00:00
Eric Kohl
9334666401 Restore modification.
svn path=/trunk/; revision=9004
2004-04-07 15:33:55 +00:00
Thomas Bluemel
879e613c5d patch reverted because ros crashes ntoskrnl
svn path=/trunk/; revision=9003
2004-04-07 15:02:31 +00:00
Thomas Bluemel
6d228618c2 remove obsolete code
svn path=/trunk/; revision=9002
2004-04-07 14:43:08 +00:00
Thomas Bluemel
45a89e2e7c little fix
svn path=/trunk/; revision=9001
2004-04-07 10:20:23 +00:00
Thomas Bluemel
9b45df9243 1. fixed crash in 1bpp blt code that was caused by an uninitialized variable.
2. speed improvements for patterned brushes

svn path=/trunk/; revision=9000
2004-04-07 10:19:34 +00:00
Hartmut Birr
bfde26a3f6 - Rewrote the code which handles processing of irp's and notifications from miniport driver.
- Implemented support for srb extensions (very simple).

svn path=/trunk/; revision=8999
2004-04-07 09:21:01 +00:00
Gé van Geldorp
c44ac169e6 There can never be a parent/child relationship between windows if one of
them is invalid. Fixes bug #217.

svn path=/trunk/; revision=8998
2004-04-07 08:25:40 +00:00
Thomas Bluemel
4783e5bae8 fixed missing dereferences of threads
svn path=/trunk/; revision=8997
2004-04-07 00:58:05 +00:00
KJK::Hyperion
9c7501f3dd - SSPT elements are 8 bit wide on Windows. Made ReactOS binary compatible in this regard, since this affects a public function (KeAddSystemServiceTable)
- use a function pointer for SSDT elements. Function pointers aren't guaranteed to have the same size as data pointers (and we were using ULONG, anyway)
 - SSPT and SSDT types no longer structures to avoid pesky alignment issues
 - genw32k and genntdll fixed accordingly

svn path=/trunk/; revision=8996
2004-04-07 00:14:05 +00:00
Thomas Bluemel
6701beb03a implemented TransparentBlt() on 8bpp surfaces
svn path=/trunk/; revision=8995
2004-04-06 23:05:36 +00:00
Martin Fuchs
6d0d4f988e fix clock visibility flag
svn path=/trunk/; revision=8994
2004-04-06 22:15:25 +00:00
Thomas Bluemel
95057e2cf7 implemented TransparentBlt() on 16bpp and 24bpp surfaces
svn path=/trunk/; revision=8993
2004-04-06 21:53:48 +00:00
Filip Navara
409aaad5d5 - Fixed some dumb bugs in 1bpp code causing memory corruption.
svn path=/trunk/; revision=8992
2004-04-06 21:19:44 +00:00
Steven Edwards
4466dbbf17 Update the readme a bit.
svn path=/trunk/; revision=8991
2004-04-06 21:04:42 +00:00
Gé van Geldorp
5fd4628dec Silence debug messages
svn path=/trunk/; revision=8990
2004-04-06 20:59:40 +00:00
KJK::Hyperion
39b17f5963 A dummy uxtheme doesn't belong to ReactOS - it should be an external project. UxTheme says bye bye and good luck everyone
svn path=/trunk/; revision=8989
2004-04-06 20:03:17 +00:00
Thomas Bluemel
5424a51107 implemented TransparentBlt() on 32bpp surfaces, but there are still some clipping issues
svn path=/trunk/; revision=8988
2004-04-06 17:54:32 +00:00
Gé van Geldorp
1bc88e0f77 Handle regions in SelectObject()
svn path=/trunk/; revision=8987
2004-04-06 07:43:33 +00:00
Thomas Bluemel
5aae8fca39 clip the moving rectangle to the desktop area. This doesn't work because our SelectObject() implementation doesn't handle regions right atm.
svn path=/trunk/; revision=8986
2004-04-05 22:42:11 +00:00
Thomas Bluemel
0a552285f3 draw patterned focus rectangles
svn path=/trunk/; revision=8985
2004-04-05 22:18:35 +00:00
Thomas Bluemel
bea76aded5 use patterned dragging rectangle
svn path=/trunk/; revision=8984
2004-04-05 22:12:53 +00:00
Filip Navara
9c418442a8 - Removed useless code from ImageList_DrawIndirect, because there
are problems with it in combination with the ReactOS code (propably due to
  XLATEOBJs)

svn path=/trunk/; revision=8983
2004-04-05 21:29:28 +00:00
Thomas Bluemel
aa25fb6d2c disable thread-safety, seems to cause some problems atm
svn path=/trunk/; revision=8982
2004-04-05 21:26:30 +00:00
Filip Navara
ba87a9d7a1 - Changed the internal brush object to be (almost) Win32k compatible.
- Changed Pen implementation to use brushes internally.
- Added support for pattern brushes.
- Fixed 8bpp StretchBlt.
- Fixed 4bpp to 4bpp non-SRCCOPY blits.
- Fixed 1bpp to 1bpp non-SRCCOPY blits to work when the destination doesn't
  start at exact byte.
- Reenabled 55AA brush for scrollbar.
- Fixed BITMAPOBJ_GetWidthBits to do WORD alignment and not DWORD.

svn path=/trunk/; revision=8981
2004-04-05 21:26:25 +00:00
Martin Fuchs
beedced608 merge Wine commits
svn path=/trunk/; revision=8980
2004-04-05 21:19:48 +00:00
Thomas Bluemel
bd69e8d121 little cosmetics...
svn path=/trunk/; revision=8979
2004-04-05 21:15:34 +00:00
Thomas Bluemel
0a205b8bd5 made the DCE list thread-safe
svn path=/trunk/; revision=8978
2004-04-05 20:46:15 +00:00
Filip Navara
c89da97139 - Get the WS_EX_STATICEDGE style working.
- Remove a WS_EX_STATICEDGE hack from Explorer.

svn path=/trunk/; revision=8977
2004-04-05 19:54:11 +00:00
Thomas Bluemel
0c33860003 Fixed a crash caused by requesting a large number of extra class space
svn path=/trunk/; revision=8976
2004-04-05 14:42:30 +00:00
Eric Kohl
c78a2cfb83 Implement 'Edit DWORD' dialog.
svn path=/trunk/; revision=8975
2004-04-05 12:00:11 +00:00
Richard Campbell
7838aa4dc8 reverted change
svn path=/trunk/; revision=8974
2004-04-05 09:16:49 +00:00
Martin Fuchs
26a52566a6 fix imagelist loading
svn path=/trunk/; revision=8973
2004-04-04 23:13:11 +00:00
Thomas Bluemel
987fbb6dc1 accidently committed a temporary file, sorry
svn path=/trunk/; revision=8972
2004-04-04 21:55:56 +00:00
Thomas Bluemel
5f472ff726 created stubs for devmgr.dll (based on lots of guesswork, trial&error and the very little resources on the www)
svn path=/trunk/; revision=8971
2004-04-04 21:49:15 +00:00
Martin Fuchs
0fd11b393a add comments
svn path=/trunk/; revision=8970
2004-04-04 21:05:32 +00:00
Martin Fuchs
9289b59c37 store icon information in metadata nodes
svn path=/trunk/; revision=8969
2004-04-04 20:23:51 +00:00
Martin Fuchs
199ffcb9bc icons and tooltips for bookmarks
svn path=/trunk/; revision=8968
2004-04-04 19:12:55 +00:00
Gé van Geldorp
fad7ce3fb4 Hack to translate Ascii chars 128-255 to Unicode too
svn path=/trunk/; revision=8967
2004-04-04 17:59:23 +00:00
Martin Fuchs
b60d102548 display bookmarks in sidebar
svn path=/trunk/; revision=8966
2004-04-04 17:21:27 +00:00
Gé van Geldorp
9af64d9189 Fix scanline increment for 32bpp stretch blts
svn path=/trunk/; revision=8965
2004-04-04 16:40:05 +00:00
Martin Fuchs
776c1e9696 import IE bookmarks and convert into XBEL format bookmark file
svn path=/trunk/; revision=8964
2004-04-04 16:04:34 +00:00
Gé van Geldorp
4eb5cb108b Honour spacing requested by caller
svn path=/trunk/; revision=8963
2004-04-04 15:28:43 +00:00
Richard Campbell
a20876b230 draw the border around the progress bar...code might not be entirely 'correct', can this border be disabled/hidden?
svn path=/trunk/; revision=8962
2004-04-04 06:46:22 +00:00
Thomas Bluemel
81a05c875c some more work on TransparentBlt() (EngTransparentBlt() is still unimplemented)
svn path=/trunk/; revision=8961
2004-04-03 21:25:20 +00:00
Gé van Geldorp
06ed71caec Most regions (> 95% in testing) consist of only 1 rectangle. Add a single
rectangle buffer to ROSRGNDATA to avoid dynamic memory allocation

svn path=/trunk/; revision=8960
2004-04-03 20:36:56 +00:00
Gé van Geldorp
87ea1d498e Use lookaside lists for better performance
svn path=/trunk/; revision=8959
2004-04-03 20:33:39 +00:00
Eric Kohl
5f3ddeb0c9 Silence a debug message.
svn path=/trunk/; revision=8958
2004-04-03 13:45:00 +00:00
Gé van Geldorp
1f56a63145 Handle lpcbData == NULL case.
svn path=/trunk/; revision=8957
2004-04-03 13:12:43 +00:00
Thomas Bluemel
8e52e23724 partially implemented IsHungAppWindow()
svn path=/trunk/; revision=8956
2004-04-02 23:54:26 +00:00
Thomas Bluemel
bb7b8e638e implemented GetWindowModuleFileName()
svn path=/trunk/; revision=8955
2004-04-02 22:16:09 +00:00
Thomas Bluemel
1c5f3e5775 check parameter in GetWindowInfo()
svn path=/trunk/; revision=8954
2004-04-02 21:03:25 +00:00
Thomas Bluemel
6491031cc2 implemented GetWindowInfo()
svn path=/trunk/; revision=8953
2004-04-02 20:51:08 +00:00
Thomas Bluemel
b8560b708d little fix
svn path=/trunk/; revision=8952
2004-04-02 19:14:44 +00:00
Thomas Bluemel
23e366974c properly initialize system menu items
svn path=/trunk/; revision=8951
2004-04-02 19:00:56 +00:00
Hartmut Birr
eec82162fb - Fixed the initializing of the access ranges.
svn path=/trunk/; revision=8950
2004-04-02 15:43:01 +00:00
Gé van Geldorp
b408a6aeb8 Make popup menus topmost windows
svn path=/trunk/; revision=8949
2004-04-01 23:17:28 +00:00
Gé van Geldorp
81361062a2 Fix interaction between topmost and owner/owned windows
svn path=/trunk/; revision=8948
2004-04-01 23:16:21 +00:00
Martin Fuchs
f2bb2f6dcb remove useless if cases
svn path=/trunk/; revision=8947
2004-04-01 20:10:07 +00:00
Gé van Geldorp
fc8f381519 Implement 32bpp -> 32bpp copy with color translation
svn path=/trunk/; revision=8946
2004-04-01 19:31:05 +00:00
Martin Fuchs
cd8132e2d2 Merged Wine commit:
Kevin Koltzau <kevin@plop.org>
	Added support for CSIDL_RESOURCES path.

svn path=/trunk/; revision=8945
2004-04-01 19:14:14 +00:00
Martin Fuchs
59fbb63083 Merged Wine commit:
Do not strip stdcall decoration in spec files.

svn path=/trunk/; revision=8944
2004-04-01 19:13:19 +00:00
James Tabor
d945804c33 Added MediaChangeNoMedia on/off
svn path=/trunk/; revision=8943
2004-04-01 17:29:53 +00:00
James Tabor
2dabdb2ac1 Added MediaChangeCount
svn path=/trunk/; revision=8942
2004-04-01 17:24:47 +00:00
James Tabor
f8e193fbc6 Wrong to remove ExFreePool.
svn path=/trunk/; revision=8941
2004-04-01 15:01:35 +00:00
Eric Kohl
a7456eb968 Fix bugs in RegQueryValueExA() and RegQueryValueExW() that caused crashes or returned bogus
information if the caller wants to retrieve the value data length only.
This fixes some bugs with regedit.

svn path=/trunk/; revision=8940
2004-04-01 13:53:08 +00:00
Thomas Bluemel
a75dfe1a82 fixed DbgPrint line ending
svn path=/trunk/; revision=8939
2004-03-31 21:21:30 +00:00
Thomas Bluemel
96a21f824f fixed NtUserGetAncestor()
svn path=/trunk/; revision=8938
2004-03-31 19:44:34 +00:00
Gé van Geldorp
dfa957c310 IntGetParentObject() does it's own locking, prevent double lock
svn path=/trunk/; revision=8937
2004-03-31 19:20:18 +00:00
Gé van Geldorp
21beea176d Remove window timers when window is destroyed
svn path=/trunk/; revision=8936
2004-03-31 18:37:12 +00:00
Thomas Bluemel
9ea765e409 revert patch due to problems with image lists
svn path=/trunk/; revision=8935
2004-03-31 14:12:04 +00:00
James Tabor
22c413c3b4 Removed ExFreePool and Spell error.
svn path=/trunk/; revision=8934
2004-03-31 05:25:36 +00:00
James Tabor
450a15d61f More Oops!
svn path=/trunk/; revision=8933
2004-03-31 03:39:12 +00:00
James Tabor
1fb32b9534 Added removable mediachange support.
svn path=/trunk/; revision=8932
2004-03-31 03:34:55 +00:00
James Tabor
bc0cf4f9cf Oops!
svn path=/trunk/; revision=8931
2004-03-31 03:34:42 +00:00
James Tabor
3b1c2903f6 Added removable mediachange support.
svn path=/trunk/; revision=8930
2004-03-31 03:33:48 +00:00
Gé van Geldorp
942d7e47a7 Fix IntIsChildWindow for case where parent is a toplevel window
svn path=/trunk/; revision=8929
2004-03-30 22:49:38 +00:00
Gé van Geldorp
a8a999793f Implement TOPMOST windows
svn path=/trunk/; revision=8928
2004-03-30 20:50:16 +00:00
Gé van Geldorp
63c532f15c Disable pool validation since it slows down execution too much
svn path=/trunk/; revision=8927
2004-03-30 09:28:44 +00:00
Gé van Geldorp
3c8dee1caa Allow GDB 6 to backtrace over a syscall
svn path=/trunk/; revision=8926
2004-03-29 22:29:34 +00:00
Thomas Bluemel
bdf6b9b5b7 updated system colors
svn path=/trunk/; revision=8924
2004-03-29 19:50:21 +00:00
Filip Navara
69a9b488f2 - Fixed window-less timers.
svn path=/trunk/; revision=8923
2004-03-29 17:02:22 +00:00
Filip Navara
fdec2f548e - Declare NMTBGETINFOTIP[AW] and TB_MARKBUTTON.
svn path=/trunk/; revision=8922
2004-03-29 16:47:48 +00:00
Gé van Geldorp
1d7a5ffa0b Merge Wine change:
Dmitry Timoshkov <dmitry@codeweavers.com>
- Scrollbar should also react on WM_LBUTTONDBLCLK.

svn path=/trunk/; revision=8921
2004-03-29 12:49:07 +00:00
Filip Navara
d6c2152ba9 - Fixed handling of WM_GETICON message.
- Don't allow destroying icons of foreign processes.

svn path=/trunk/; revision=8917
2004-03-29 06:38:50 +00:00
Filip Navara
a1f1c3b257 - Fixed BitBlts from 4bpp surfaces.
svn path=/trunk/; revision=8916
2004-03-28 23:25:48 +00:00
Filip Navara
acc112d9d4 - Fixed non-SRCCOPY BitBlts to 1bpp surfaces.
svn path=/trunk/; revision=8915
2004-03-28 23:24:57 +00:00
Gé van Geldorp
cdaaa65096 Simple font substitution and matching
svn path=/trunk/; revision=8914
2004-03-28 22:39:59 +00:00
Martin Fuchs
77684eece7 compiler friendly access operator implemantation
svn path=/trunk/; revision=8913
2004-03-28 22:17:49 +00:00
Thomas Bluemel
4309d1082e Partly (not working) implementation of TransparentBlt()
svn path=/trunk/; revision=8912
2004-03-28 21:46:26 +00:00
Martin Fuchs
50c2bd5cc2 avoid GCC complaining about: "ISO C++ says that String XMLStorage::XMLNode::operator[](const char *) const' and String & XMLStorage::XMLNode::operator[](const String &)' are ambiguous even though the worst conversion for the former is better than the worst conversion for the latter
svn path=/trunk/; revision=8911
2004-03-28 21:04:00 +00:00
Filip Navara
741870b134 DbgPrint -> DPRINT
svn path=/trunk/; revision=8910
2004-03-28 20:44:09 +00:00
Martin Fuchs
9447d23bc1 option "display version on desktop background"
svn path=/trunk/; revision=8908
2004-03-28 20:32:23 +00:00
Martin Fuchs
f2d4a56a85 option "display version on desktop background"
svn path=/trunk/; revision=8907
2004-03-28 20:32:21 +00:00
Martin Fuchs
3bf2b751a9 UNICODE optimizations
svn path=/trunk/; revision=8906
2004-03-28 18:10:48 +00:00
Filip Navara
0831947d6c - I accidently ommited two '*' and caused a random crashes when DriverEntry didn't return STATUS_SUCCESS.
svn path=/trunk/; revision=8905
2004-03-28 17:08:55 +00:00
Filip Navara
c05238d39f - Fixed a dumb ExFreePool that I accidently left there.
svn path=/trunk/; revision=8904
2004-03-28 17:01:10 +00:00
Thomas Bluemel
352d841f3b fixed a crash caused by removing a message twice from the queue
svn path=/trunk/; revision=8903
2004-03-28 16:21:58 +00:00
Martin Fuchs
bdaa4495d0 more configuration options:
- show/hide clock
- disable automatic notification icon hiding

svn path=/trunk/; revision=8902
2004-03-28 14:55:18 +00:00
Thomas Bluemel
86d212c244 added basic sas window, some other modifications
svn path=/trunk/; revision=8901
2004-03-28 12:21:41 +00:00
Thomas Bluemel
fa00201ce1 basic implementation of WlxLoggedOutSAS()
svn path=/trunk/; revision=8900
2004-03-28 12:19:07 +00:00
Filip Navara
a24291f78a - Fixed a minor bug in IopLoadServiceModule that caused crashes for disabled drivers.
svn path=/trunk/; revision=8899
2004-03-28 12:03:25 +00:00
Martin Fuchs
bbc679d779 make config option "show-hidden notification icons" persistent
svn path=/trunk/; revision=8898
2004-03-28 12:00:46 +00:00
Filip Navara
6d1dae4a75 - Fixed line endings.
svn path=/trunk/; revision=8897
2004-03-28 09:52:18 +00:00
Filip Navara
c734759964 - Minor cleanup and fixed few memory leaks on driver unload.
svn path=/trunk/; revision=8896
2004-03-28 09:48:13 +00:00
Martin Fuchs
5c7330b4d4 smart XML formating
svn path=/trunk/; revision=8895
2004-03-28 09:34:43 +00:00
Thomas Bluemel
7d9ce02db4 implemented WlxDisplaySASNotice()
svn path=/trunk/; revision=8894
2004-03-27 23:24:51 +00:00
Martin Fuchs
25c77834ce Merge Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	Call IShellExecuteHook interface for ShellExecute() calls with ID
	lists.

svn path=/trunk/; revision=8893
2004-03-27 21:19:27 +00:00
Gé van Geldorp
ac44e25672 Fix LOGFONT conversion in CreateFontIndirectA()
svn path=/trunk/; revision=8892
2004-03-27 21:07:33 +00:00
Filip Navara
014d8e9588 - Rewritten some driver loading functions to get higher control of the driver loading and initialization process (Fixes bug #263).
- Added support for lower level filter drivers.

svn path=/trunk/; revision=8891
2004-03-27 19:41:32 +00:00
Martin Fuchs
bf1b24c1fb - XMLChildrenFilter iterator
- correctly encode special characters while writing XML strings
- MIT license for XmlStorage classes

svn path=/trunk/; revision=8890
2004-03-27 18:08:42 +00:00
Gé van Geldorp
287b32c870 Return empty instead of NULL region for invisible windows
svn path=/trunk/; revision=8889
2004-03-27 15:16:05 +00:00
Martin Fuchs
0fa710246c rollback changes when cancelling notify icon configuration dialog
svn path=/trunk/; revision=8888
2004-03-27 14:02:28 +00:00
Gé van Geldorp
dd3a343e64 Implement scrollbar controls
svn path=/trunk/; revision=8887
2004-03-27 10:46:32 +00:00
Martin Fuchs
0529529902 readll ntdll lib for DbgPrint
svn path=/trunk/; revision=8886
2004-03-27 09:23:05 +00:00
Martin Fuchs
9b62efc1ca Merge of Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	Implementation of IPersistFile::IsDirty().

svn path=/trunk/; revision=8885
2004-03-27 09:16:08 +00:00
Martin Fuchs
796ec35113 Merge of Wine commit:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
	Allow passing NULL to ILFindLastID.

Patch: http://cvs.winehq.org/patch.py?id=11621

svn path=/trunk/; revision=8884
2004-03-27 09:12:05 +00:00
Martin Fuchs
9477018084 merge Wine commit:
Modified files:
	dlls/shell32   : shellole.c shell32_main.h pidl.h pidl.c
	                 folders.c enumidlist.c control.c Makefile.in
Added files:
	dlls/shell32   : cpanelfolder.c cpanel.h

Log message:
	Martin Fuchs <martin-fuchs@gmx.net>
	Implementation of the control panel folder in shell namespace.

Patch: http://cvs.winehq.org/patch.py?id=11721

svn path=/trunk/; revision=8883
2004-03-27 09:08:10 +00:00
Martin Fuchs
63c5fcc117 merge Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	- Fix handling of %2, %3, ... and lower case format characters in
	SHELL_ArgifyW().
	- Move "%I" expansion from ShellExecuteEx() into common function
	SHELL_ArgifyW().
	- Pass buffer length to SHELL_FindExecutable().
	- FIXME comment for len paramater in SHELL_ArgifyW().

	Ge van Geldorp <ge@gse.nl>
	- Add double quotation marks unless we already have them (e.g.: "%1"
	%* for exefile).
	- Remove unnecessary double quotation marks and command line arguments.

Patch: http://cvs.winehq.org/patch.py?id=11706

svn path=/trunk/; revision=8882
2004-03-27 09:07:42 +00:00
Art Yerkes
2673c9cd5e Fixed make bootcd on windows and cross.
svn path=/trunk/; revision=8881
2004-03-27 06:23:37 +00:00
Art Yerkes
fa4663f158 Define TOPDIR to . if not defined (for make bootcd)
svn path=/trunk/; revision=8880
2004-03-27 04:33:15 +00:00
Thomas Bluemel
3868dbd0a0 a few more minor speed-up
svn path=/trunk/; revision=8879
2004-03-27 00:35:02 +00:00
Thomas Bluemel
bf9c49bb8b little speed-up
svn path=/trunk/; revision=8878
2004-03-26 23:48:47 +00:00
Gé van Geldorp
367dea79d9 Add riched32.dll
svn path=/trunk/; revision=8877
2004-03-26 23:13:58 +00:00
Gé van Geldorp
c84ea8d62e libexpat.dll was moved
svn path=/trunk/; revision=8876
2004-03-26 23:01:44 +00:00
Martin Fuchs
b2221ecb04 add original .cvsignore entries
svn path=/trunk/; revision=8875
2004-03-26 21:20:30 +00:00
Martin Fuchs
1589b3aa3a add original .cvsignore entries
svn path=/trunk/; revision=8874
2004-03-25 18:02:56 +00:00
Thomas Bluemel
fcc80b7588 added missing .cvsignore file
svn path=/trunk/; revision=8873
2004-03-25 15:16:42 +00:00
Gé van Geldorp
a4c2f8ebd3 Make sure submenus are marked as popups
svn path=/trunk/; revision=8872
2004-03-25 12:32:13 +00:00
Gé van Geldorp
95d5ae34d2 Don't reserve space for empty menubar
svn path=/trunk/; revision=8871
2004-03-25 11:40:41 +00:00
Eric Kohl
9e558fcc6a - Implement ImpersonateLoggedOnUser().
- Moved some security related functions to better places.

svn path=/trunk/; revision=8870
2004-03-25 11:30:07 +00:00
Gé van Geldorp
8a8167ab4d Set correct colors before calling owner-drawn handler
svn path=/trunk/; revision=8869
2004-03-25 08:51:44 +00:00
Gunnar Dalsnes
9d7050fddd add RtlCreateCriticalSectionSpinCount + fix
svn path=/trunk/; revision=8868
2004-03-24 23:43:52 +00:00
Gunnar Dalsnes
29a9d5c519 add RtlCreateCriticalSectionSpinCount
svn path=/trunk/; revision=8867
2004-03-24 23:42:39 +00:00
Emanuele Aliberti
458909a9c0 Initialize LPC-related fields in ETHREAD.
svn path=/trunk/; revision=8866
2004-03-24 22:00:39 +00:00
Emanuele Aliberti
bcbcab94ad Visible build timestamp.
svn path=/trunk/; revision=8865
2004-03-24 21:46:41 +00:00
Martin Fuchs
f977f1fd59 FIXME -> TRACE
svn path=/trunk/; revision=8864
2004-03-24 20:47:58 +00:00
Filip Navara
1bad49c3be * Always return STATUS_SUCCESS from ScsiPortInitialize if some device was found.
* Minor correction to setting of SrbExtension.
* Changed DPRINT1 to DPRINT on some places.

svn path=/trunk/; revision=8863
2004-03-24 16:21:59 +00:00
Eric Kohl
9915a75ce6 - Set user-specific environment variables.
- Append 'PATH' environment variable if it already exists.

svn path=/trunk/; revision=8862
2004-03-24 16:00:01 +00:00
Martin Fuchs
7bd2a160e6 use libexpat.a
svn path=/trunk/; revision=8861
2004-03-24 10:34:21 +00:00
Martin Fuchs
fdbc91f5b5 integration of expat with ROS build system
svn path=/trunk/; revision=8860
2004-03-24 09:39:37 +00:00
Gé van Geldorp
ac6bc94f0f Fix filling of MENUITEMINFO in InsertMenu()
svn path=/trunk/; revision=8859
2004-03-24 08:56:52 +00:00
Martin Fuchs
ea02300a6a use the new built expat library for explorer
svn path=/trunk/; revision=8858
2004-03-24 00:19:16 +00:00
Royce Mitchell III
9a854f33a4 implement SetPixelV
svn path=/trunk/; revision=8857
2004-03-24 00:13:31 +00:00
Martin Fuchs
7e4896289f checked in expat source code
svn path=/trunk/; revision=8856
2004-03-24 00:05:27 +00:00
Gé van Geldorp
45931d5f5d Prevent deletion of system-owned objects like brushes returned by
GetSysColorBrush()

svn path=/trunk/; revision=8855
2004-03-23 22:50:14 +00:00
Thomas Bluemel
68d825d0da fixed accessing memory that has already been freed
svn path=/trunk/; revision=8854
2004-03-23 22:24:27 +00:00
Thomas Bluemel
39c6756765 Implemented GetWindowRgn() and GetWindowRgnBox()
svn path=/trunk/; revision=8853
2004-03-23 21:47:37 +00:00
Gé van Geldorp
022bd7dd68 Check for valid ClientRect
svn path=/trunk/; revision=8852
2004-03-23 21:30:18 +00:00
Gé van Geldorp
82e886d635 Implement GetObjectA/W() for fonts
svn path=/trunk/; revision=8851
2004-03-23 19:46:50 +00:00
Thomas Bluemel
4a2de9a81c don't use the window region when minimized
svn path=/trunk/; revision=8850
2004-03-23 18:08:07 +00:00
Gé van Geldorp
4e955d6423 Fix incorrect pointer arithmetic in NtGdiPtInRegion()
svn path=/trunk/; revision=8849
2004-03-23 17:07:41 +00:00
Thomas Bluemel
e207cba272 Implemented SetWindowRgn() and added support for window regions
svn path=/trunk/; revision=8848
2004-03-23 16:32:20 +00:00
Eric Kohl
93f83462c0 Changes to make AHA-2940 detect devices:
- Set proper inquiry buffer size.
- Check inquiry buffer for valid LUN.

svn path=/trunk/; revision=8847
2004-03-23 12:30:15 +00:00
Gé van Geldorp
c4e75c424f Implement GetUpdateRect() and harden NtUserGetUpdateRect()
svn path=/trunk/; revision=8846
2004-03-23 11:20:58 +00:00
Gé van Geldorp
75543614da - Implement GetCharWidthA/W()
- Fix memory overwrite in NtGdiGetCharWidth32()
Fixes bug #258

svn path=/trunk/; revision=8845
2004-03-23 07:59:47 +00:00
Gé van Geldorp
c718f507e9 Implement EnumFontFamilies(Ex)A/W() and TranslateCharsetInfo()
svn path=/trunk/; revision=8844
2004-03-23 00:18:54 +00:00
Gé van Geldorp
4aae876500 Silence debug messages
svn path=/trunk/; revision=8843
2004-03-23 00:12:24 +00:00
Martin Fuchs
d26e06ebdf - Merged partial Wine commit:
Mike McCormack <mike@codeweavers.com>
  Update path from relative path on loading.

- moved GetFullPathName() from IShellLink_ConstructFromFile() into IShellLinkA/W_fnSetPath()

svn path=/trunk/; revision=8842
2004-03-22 22:56:04 +00:00
Martin Fuchs
e6bd3bc673 merge Wine commit:
- Mike McCormack <mike@codeweavers.com>
  Unicode-ify the icon cache and SHGetFileInfo.

- fix by M. Fuchs

svn path=/trunk/; revision=8841
2004-03-22 21:40:12 +00:00
Martin Fuchs
d52dd4c5cc implemented UTF-8 conversion
svn path=/trunk/; revision=8840
2004-03-22 20:58:16 +00:00
Royce Mitchell III
c6df043a61 Reformatting plus change to NtGdiGetPixel to handle device DCs in addition to DIB DCs. This fixes bug #264.
svn path=/trunk/; revision=8839
2004-03-22 20:46:33 +00:00
Thomas Bluemel
d8eb783e69 fixed a couple of dead-locks in the region code
svn path=/trunk/; revision=8838
2004-03-22 20:14:29 +00:00
Filip Navara
ccecaee56d - Added allocation of SrbExtension.
- Correctly set ConfigInfo->BusInterruptVector.
- Corrected the INQUIRY request.

svn path=/trunk/; revision=8837
2004-03-22 19:59:31 +00:00
Filip Navara
bcce3e20b1 - Compile the VGA driver using w32api.
svn path=/trunk/; revision=8836
2004-03-22 16:00:38 +00:00
Thomas Bluemel
cebfd88253 fixed wrong rendering of clipped characters
svn path=/trunk/; revision=8835
2004-03-22 14:58:56 +00:00
Filip Navara
a3695d5fcb - Make PCI a boot driver.
svn path=/trunk/; revision=8834
2004-03-22 09:06:16 +00:00
Filip Navara
c4c05052cb - Renamed TaggedQueueing to TaggedQueuing.
svn path=/trunk/; revision=8833
2004-03-22 09:05:19 +00:00
Martin Fuchs
10328e2c9e install expat library
svn path=/trunk/; revision=8832
2004-03-21 23:44:28 +00:00
Martin Fuchs
3b9f0dd221 storage of configuration settings in user specific XML file
svn path=/trunk/; revision=8831
2004-03-21 23:36:24 +00:00
Filip Navara
bb917ce975 - Support for upper level filter drivers.
NOTE: Although the support for lower level filter driver is very similar, it's practically impossible to incorporate it with the current design without avoiding bugs such as #262 or #263. I don't want to extend the current mess beyond it's borders, so I ommited the call for initializing lower level filter drivers. The code needs a major cleanup and simplification on some places to make this support possible while maintaining a reasonable stable system.

svn path=/trunk/; revision=8830
2004-03-21 18:58:53 +00:00
Filip Navara
722728fd5c - A message box with timeout informing about successful installation and restart.
svn path=/trunk/; revision=8829
2004-03-21 14:37:19 +00:00
Filip Navara
c4a7a3aa63 - Fixed language definition and line endings.
svn path=/trunk/; revision=8828
2004-03-21 14:35:19 +00:00
Gé van Geldorp
8f6061137a Fix calling convention of various callback function prototypes
svn path=/trunk/; revision=8827
2004-03-21 12:34:02 +00:00
Gé van Geldorp
d8f0a4b49f Silence debug messages
svn path=/trunk/; revision=8826
2004-03-21 12:31:19 +00:00
Thomas Bluemel
de1f68d590 fixed clipping issue
svn path=/trunk/; revision=8825
2004-03-21 10:18:33 +00:00
Royce Mitchell III
a8f59cffef 1000+% performance increase in 1bpp dib -> 1bpp dib blitting.
svn path=/trunk/; revision=8824
2004-03-21 04:17:33 +00:00
Martin Fuchs
6a7304ac01 configuration dialog for notification icons
svn path=/trunk/; revision=8823
2004-03-21 00:31:14 +00:00
Steven Edwards
a9f6fe5ffb Merge setupapi with Winehq.
This should give us a working InstallHInfSection for loading drivers
if not check the attic for Alex's implementation.

svn path=/trunk/; revision=8822
2004-03-20 21:55:24 +00:00
Steven Edwards
537dc19b03 Merge setupapi with Winehq.
svn path=/trunk/; revision=8821
2004-03-20 21:53:36 +00:00
Steven Edwards
50ec7d086b Merge Winehq commit:
Yoshiro Takeno <taro-x@justsystem.co.jp>
In Windows, the leading byte for multibyte characters are set to upper
byte. If single byte character is used, the upper byte is set to 0.

svn path=/trunk/; revision=8820
2004-03-20 21:21:03 +00:00
Steven Edwards
5a868930ca Fix the rendering of the GPL.
svn path=/trunk/; revision=8819
2004-03-20 18:16:23 +00:00
Steven Edwards
7675725511 Make install works. This closes out bug 221
svn path=/trunk/; revision=8818
2004-03-20 17:41:24 +00:00
Filip Navara
72bf171b1b - Minor correction to IopGetSystemPowerDeviceObject.
svn path=/trunk/; revision=8817
2004-03-20 17:34:25 +00:00
Filip Navara
9d3fa4fe4b - Unlock surface in error case of EngModifySurface.
svn path=/trunk/; revision=8816
2004-03-20 17:33:10 +00:00
Eric Kohl
bea41fd8f8 Run second stage setup at first boot after install.
svn path=/trunk/; revision=8815
2004-03-20 15:59:19 +00:00
Eric Kohl
8b50600e95 Load user profile and create user environment upon user logon.
svn path=/trunk/; revision=8814
2004-03-20 15:58:16 +00:00
Eric Kohl
baaf29305f Fully implement RtlFormatCurrentUserKeyPath().
svn path=/trunk/; revision=8813
2004-03-20 15:56:00 +00:00
Martin Fuchs
0f69a9471a - Copyright notices for 2004
- launch_cpanel() utility function

svn path=/trunk/; revision=8811
2004-03-20 13:49:13 +00:00
Martin Fuchs
9de0deb4cc adjust for windres
svn path=/trunk/; revision=8810
2004-03-20 13:31:09 +00:00
Martin Fuchs
f7b3421484 fix japanese resource script
svn path=/trunk/; revision=8809
2004-03-20 13:25:28 +00:00
Martin Fuchs
18e827f845 context menu for notification area
svn path=/trunk/; revision=8808
2004-03-20 13:13:40 +00:00
Martin Fuchs
f06e49faea auto-hiding of inactive notification icons
svn path=/trunk/; revision=8807
2004-03-20 11:42:22 +00:00
Martin Fuchs
5ac2148058 added notifyhook.dll
svn path=/trunk/; revision=8806
2004-03-20 09:16:17 +00:00
Martin Fuchs
347477b0e9 fix for installation target by James Tabor
svn path=/trunk/; revision=8805
2004-03-20 09:11:13 +00:00
Steven Edwards
05cd23fc5c Add notepad to the list of targets.
svn path=/trunk/; revision=8804
2004-03-20 04:36:16 +00:00
Steven Edwards
ffc7f0a6a8 Enable stub for ImpersonateLoggedOnUser. This gets taskmgr
to load again.

svn path=/trunk/; revision=8803
2004-03-20 04:32:06 +00:00
Gé van Geldorp
77eb2df0b2 Handle invalid Unicode strings for %S format like MS does
svn path=/trunk/; revision=8802
2004-03-19 23:00:35 +00:00
Gé van Geldorp
896376d3c1 Handle characters outside first page
svn path=/trunk/; revision=8801
2004-03-19 22:59:23 +00:00
Gé van Geldorp
c082e0250f Fix link warnings
svn path=/trunk/; revision=8800
2004-03-19 22:58:10 +00:00
David Welch
dd4a862112 - Removed local definition of NtCurrentProcess.
svn path=/trunk/; revision=8799
2004-03-19 21:34:49 +00:00
David Welch
45dbc2f5d1 - Added definitions for NtCurrentProcess and NtCurrentThread.
svn path=/trunk/; revision=8798
2004-03-19 21:33:48 +00:00
Filip Navara
d0dca2b24f - Load the PCI bus driver.
- Move the VGA driver from "Video" to "Video Save" group.

svn path=/trunk/; revision=8797
2004-03-19 21:02:55 +00:00
Filip Navara
d621be6ce6 Merged changes from videoport_pnp_14032004 branch:
- Better support for W2K+ video miniport driver incl. the basic implementation of PnP driver model.
- Return Win32 error codes instead of NT equivalents.
- Fixed a few bugs.

svn path=/trunk/; revision=8796
2004-03-19 20:58:32 +00:00
Filip Navara
91c3d64bf5 - Lower IRQL in error case of IoAllocateDriverObjectExtension.
svn path=/trunk/; revision=8794
2004-03-19 17:37:57 +00:00
Eric Kohl
be092c4712 Clean-up NtQueryInformationToken().
svn path=/trunk/; revision=8792
2004-03-19 12:47:17 +00:00
Eric Kohl
c89688b59d Fix NtOpenThreadToken() and NtSetInformationThread().
svn path=/trunk/; revision=8791
2004-03-19 12:45:07 +00:00
Eric Kohl
d037d068ff Implement CreateEnvironmentBlock() and DestroyEnvironmentBlock().
svn path=/trunk/; revision=8790
2004-03-19 12:40:49 +00:00
Eric Kohl
d3d3ab535d Enable environment inheritance.
svn path=/trunk/; revision=8789
2004-03-19 12:38:07 +00:00
Martin Fuchs
494bb081b9 merge WineHQ commit:
Rein Klazes <rklazes@xs4all.nl>
In SHELL_ExecuteW, if a new current directory is specified, change to
it before calling CreateProcess so that it will find the correct
executable.

Patch: http://cvs.winehq.org/patch.py?id=11578

svn path=/trunk/; revision=8788
2004-03-19 09:18:52 +00:00
Aleksey Bragin
f3eb637ea4 Committing my in-progress work with mmdrv, but it's still incomplete, and it still contains MS-specific things (in comments only!).
svn path=/trunk/; revision=8787
2004-03-19 06:11:28 +00:00
Royce Mitchell III
3398afcf63 simple hack to keep winzip from bugchecking us
svn path=/trunk/; revision=8786
2004-03-18 22:03:40 +00:00
David Welch
5ab4f36e65 - Fixed crash on reboot. Sorry.
svn path=/trunk/; revision=8784
2004-03-18 19:58:35 +00:00
Thomas Bluemel
177645b96c implemented SetFileShortName()
svn path=/trunk/; revision=8783
2004-03-18 18:29:19 +00:00
Royce Mitchell III
27f458a084 fixed several serious bugs in info.c and added a couple undocumented compatibilities based on analysis of ms's version.dll's behavior. Removed 16-bit exe support from info.c b/c it was very wrong in most cases, and MSDN says 16-bit exe isn't supported anyways. This gets winzip further towards working.
svn path=/trunk/; revision=8782
2004-03-18 18:15:28 +00:00
Filip Navara
280a5aa361 - Fixed return status of IoGetDeviceProperty.
svn path=/trunk/; revision=8781
2004-03-18 16:43:56 +00:00
Thomas Bluemel
7cda28d415 1. implemented SetFileValidData()
2. updated FILE_INFORMATION_CLASS

svn path=/trunk/; revision=8780
2004-03-18 16:19:26 +00:00
Martin Fuchs
810644856d first version of Explorer NotifyHook DLL
svn path=/trunk/; revision=8779
2004-03-18 00:28:45 +00:00
Thomas Bluemel
fd4ab47d69 minor speed-improvement
svn path=/trunk/; revision=8778
2004-03-17 20:57:06 +00:00
Filip Navara
ff055ed11b - Fixed few bugs related to SUROBJ initialization.
svn path=/trunk/; revision=8776
2004-03-17 16:05:29 +00:00
Gunnar Dalsnes
31ac5158a6 fix pipe create flags traslation
svn path=/trunk/; revision=8775
2004-03-17 15:00:39 +00:00
Eric Kohl
f396c8299f Simplify LoadUserProfileW() and check for loaded profile.
svn path=/trunk/; revision=8774
2004-03-17 14:46:23 +00:00
Steven Edwards
e816725be5 Moved the WINE notepad.
svn path=/trunk/; revision=8773
2004-03-17 01:28:14 +00:00
Steven Edwards
b17d04d3a2 Moved the WINE notepad to rosapps
svn path=/trunk/; revision=8772
2004-03-17 01:27:00 +00:00
Martin Fuchs
cdfa901068 simplify Shell_NotifyIcon implementation
svn path=/trunk/; revision=8771
2004-03-16 23:18:10 +00:00
Martin Fuchs
820df5cbe5 use alloca() to pass NOTIFYICONDATA structures of any size
svn path=/trunk/; revision=8770
2004-03-16 22:49:29 +00:00
David Welch
3db0cc5595 - Map only the vga frame buffer for the hal to write debug messages
and map it higher up in the kernel address space so more space is available
for the nonpaged and paged pools.

svn path=/trunk/; revision=8769
2004-03-16 22:45:56 +00:00
David Welch
d4bd6869fe - Removed useless define.
svn path=/trunk/; revision=8768
2004-03-16 21:13:15 +00:00
David Welch
9eb9832b02 - Use the miniport services to map the frame buffer.
svn path=/trunk/; revision=8767
2004-03-16 21:11:44 +00:00
David Welch
32a05a4377 - Implemented IOCTL_VIDEO_MAP_VIDEO_MEMORY/IOCTL_VIDEO_UNMAP_VIDEO_MEMORY.
svn path=/trunk/; revision=8766
2004-03-16 21:06:20 +00:00
Eric Kohl
bf87266d08 Flush the new user hive after copying.
svn path=/trunk/; revision=8764
2004-03-16 11:34:51 +00:00
Martin Fuchs
1a75a2261c add _ANONYMOUS_UNION to NOTIFYICONDATA struct
svn path=/trunk/; revision=8763
2004-03-16 10:08:16 +00:00
Martin Fuchs
5c6819aaae replace WINE specifiy system tray implementation by a WIN32 compatible implementation
svn path=/trunk/; revision=8762
2004-03-16 10:07:38 +00:00
Art Yerkes
c20093e554 Arty's summary:
drivers/fs/cdfs/fsctl: Allocate wide chars.  CD title was being truncated
drivers/fs/vfat/fsctl: Tolerate a zero bytes-per-sector
Patches by Herve Poussineau

svn path=/trunk/; revision=8761
2004-03-16 08:30:28 +00:00
Royce Mitchell III
7d726b9519 NtGdiGetPixel cleanup - fixed small bug with rect boundary checking, and cleaned up code to only unlock DC in one place.
svn path=/trunk/; revision=8760
2004-03-16 02:15:06 +00:00
Gé van Geldorp
ba96bd3821 - Add arrows for popup submenus
- Display bitmap menu items

svn path=/trunk/; revision=8759
2004-03-15 23:49:29 +00:00
David Welch
28f9bf0155 - Left whole page allocations on by accident.
svn path=/trunk/; revision=8758
2004-03-15 22:22:53 +00:00
Gé van Geldorp
aea7bd7615 - Handle 1bpp DIBs in NtGdiCreateDIBitmap
- Fix double lock of DC in routines called by NtGdiCreateDIBSection

svn path=/trunk/; revision=8757
2004-03-15 22:06:55 +00:00
Gé van Geldorp
52f0a740aa hSelf member contains the handle, not the pointer
svn path=/trunk/; revision=8756
2004-03-15 22:02:31 +00:00
Gé van Geldorp
ad8fa18342 Silence debug message
svn path=/trunk/; revision=8755
2004-03-15 22:01:17 +00:00
Hartmut Birr
8536591b9d - Reduced the size of the symbol files, as only necessary symbol informations are copied.
svn path=/trunk/; revision=8754
2004-03-15 21:31:45 +00:00
Hartmut Birr
6d7c68c262 - Fixed the loading of symbol files, if the base name contains the extension '.sym'.
svn path=/trunk/; revision=8753
2004-03-15 21:16:45 +00:00
Hartmut Birr
f983216b34 - Removed dirty loading of symbol files from ExpInitializeExecutive.
- Prevented moving of KiSystemStartup into _main, because the memory
  from _main is freed from within KiSystemStartup.

svn path=/trunk/; revision=8752
2004-03-15 21:10:34 +00:00
Martin Fuchs
dcb0a46bfe launch sound control panel applet
svn path=/trunk/; revision=8751
2004-03-15 20:59:06 +00:00
Martin Fuchs
fda8c77b11 implementation of volume control tray icon
svn path=/trunk/; revision=8750
2004-03-15 20:45:41 +00:00
Filip Navara
41562afcd3 - Minor corrections to emulated mouse pointer handling.
svn path=/trunk/; revision=8749
2004-03-15 20:21:51 +00:00
David Welch
60a43e438d - Fix reading past the end of the pool block.
svn path=/trunk/; revision=8747
2004-03-15 19:06:35 +00:00
Hartmut Birr
94683a5682 - Changed ctype.h from mingw to ntoskrnl its own.
svn path=/trunk/; revision=8746
2004-03-15 17:32:47 +00:00
Royce Mitchell III
b57b6bb796 mark GetPixel as @implemented and fix param names
svn path=/trunk/; revision=8744
2004-03-15 04:21:17 +00:00
David Welch
c6476093e1 - Fixed whole page allocations since the handle table code now relies on
allocations being eight byte aligned.

svn path=/trunk/; revision=8743
2004-03-15 00:03:31 +00:00
Gé van Geldorp
639ab68e9a Fix mask for true color images
svn path=/trunk/; revision=8742
2004-03-14 23:04:44 +00:00
Martin Fuchs
296ea7d293 handle large notification strings
svn path=/trunk/; revision=8741
2004-03-14 22:44:08 +00:00
Martin Fuchs
14f61e5720 UNICODE fix for Tooltips
svn path=/trunk/; revision=8739
2004-03-14 22:27:44 +00:00
Martin Fuchs
b95e68a45d handle WM_NOTIFYFORMAT
svn path=/trunk/; revision=8738
2004-03-14 22:20:10 +00:00
Martin Fuchs
c53a01dce1 - separate tooltip area for each notify icon
- handle non-null terminated tooltip strings

svn path=/trunk/; revision=8737
2004-03-14 21:02:55 +00:00
Gé van Geldorp
c88c8baba9 Return a valid (empty) visible region when the window is not visible
svn path=/trunk/; revision=8736
2004-03-14 20:31:55 +00:00
Filip Navara
800b2b0dcf - Set InitData.HwInitDataSize to proper value.
svn path=/trunk/; revision=8733
2004-03-14 19:44:02 +00:00
David Welch
ad8ba55cb3 - Complete the irp even on an error.
svn path=/trunk/; revision=8731
2004-03-14 19:25:34 +00:00
Martin Fuchs
254292d714 resize taskbar buttons on WM_SIZE
svn path=/trunk/; revision=8729
2004-03-14 18:51:35 +00:00
David Welch
38b3d10879 - Map ntstatus values to the win32 error code expected by the display driver.
svn path=/trunk/; revision=8728
2004-03-14 18:36:14 +00:00
David Welch
e52b5b410e - Map return codes from the miniport's device i/o control routine from
win32 error code to ntstatus values.

svn path=/trunk/; revision=8727
2004-03-14 18:35:02 +00:00
David Welch
7c4c3bfb0b - Fixed bug with recalling previous input.
- Switch back to text mode when entering the debugger.

svn path=/trunk/; revision=8726
2004-03-14 18:28:59 +00:00
David Welch
ff4f24bbb6 - Removed setting of STATUS_DATA_OVERRUN in IoStatusBlock.Status when
IoStatusBlock.Information is greater than the output buffer length passed
in by the caller.

svn path=/trunk/; revision=8725
2004-03-14 18:27:08 +00:00
Thomas Bluemel
9789932e02 implemented GetProcessIoCounters()
svn path=/trunk/; revision=8724
2004-03-14 18:16:40 +00:00
Eric Kohl
cc68c2e317 Implement GetUserProfileDirectoryW().
Open user key in LoadUserProfileW() and close it in UnloadUserProfile().

svn path=/trunk/; revision=8723
2004-03-14 18:15:59 +00:00
Eric Kohl
2ce08a79bb Fix some prototypes.
svn path=/trunk/; revision=8722
2004-03-14 18:13:19 +00:00
Thomas Bluemel
e040902fff implemented SetConsoleIcon()
svn path=/trunk/; revision=8721
2004-03-14 17:53:27 +00:00
Filip Navara
b6a8d006e3 - Added PnP enum entry for the VMware video driver.
svn path=/trunk/; revision=8720
2004-03-14 17:47:10 +00:00
Filip Navara
b4e4cd6676 - Don't load PnP drivers if they're disabled.
- Save pointer to PnP tree device node in device object's DeviceObjectExtension.
- Add function IopGetDeviceNode for getting device node from device object pointer.
- Rewritten IoGetDeviceProperty to use values that are in device node instead of sending Irps.

svn path=/trunk/; revision=8718
2004-03-14 17:10:48 +00:00
Filip Navara
c5058d5a3c - Fixed handling of IRP_MN_QUERY_BUS_INFORMATION.
- Add basic handling of IRP_MN_QUERY_CAPABILITIES for getting device specific bus address.

svn path=/trunk/; revision=8717
2004-03-14 17:10:43 +00:00
Gé van Geldorp
c72fe4771e Implement TrackPopupMenu. This fixes bug #131
svn path=/trunk/; revision=8716
2004-03-14 16:39:49 +00:00
Martin Fuchs
e8f56accc6 tool tip texts for notification icons
svn path=/trunk/; revision=8715
2004-03-14 16:39:28 +00:00
Martin Fuchs
b61431ec36 declare NOTIFYICON VERSION 3 constants
svn path=/trunk/; revision=8714
2004-03-14 15:54:27 +00:00
Martin Fuchs
b7c8fed978 declare V5 structure members and constants for notifications icons
svn path=/trunk/; revision=8713
2004-03-14 15:42:04 +00:00
Martin Fuchs
258d7cea79 hide clock from desktop bar if it's configured this way in registry
svn path=/trunk/; revision=8712
2004-03-14 14:44:23 +00:00
Thomas Bluemel
841b0b2958 implemented GetFileSizeEx()
svn path=/trunk/; revision=8711
2004-03-14 13:20:10 +00:00
Thomas Bluemel
2c9bca4a1a implemented SetFilePointerEx() and fixed SetFilePointer() to check if the calculated file position is negative
svn path=/trunk/; revision=8710
2004-03-14 13:11:55 +00:00
Martin Fuchs
3b338cc571 fixed imagelist handle leak
svn path=/trunk/; revision=8709
2004-03-14 12:43:27 +00:00
Thomas Bluemel
42798328cb count all gdi handles and serialize removing gdi handles from the table.
svn path=/trunk/; revision=8708
2004-03-14 12:16:50 +00:00
Martin Fuchs
5ca99eb505 disable context menu for non-file system objects
svn path=/trunk/; revision=8706
2004-03-14 12:06:25 +00:00
Gé van Geldorp
d13e1cf220 Match error tested against to the actual error returned by
NtUserGetWindowLong

svn path=/trunk/; revision=8705
2004-03-14 11:27:33 +00:00
Gé van Geldorp
57b26979cb You can't use NtCurrentTeb() in kernel mode
svn path=/trunk/; revision=8704
2004-03-14 11:25:33 +00:00
Thomas Bluemel
85f9fdf39f implemented GetProcessId()
svn path=/trunk/; revision=8703
2004-03-14 11:11:17 +00:00
Thomas Bluemel
04b43aab9e minor fix
svn path=/trunk/; revision=8702
2004-03-14 10:16:18 +00:00
Filip Navara
b0b55220e6 - Make IoGetDeviceInterfaces more compatible with the native version. Patch by Matthew Brace.
svn path=/trunk/; revision=8701
2004-03-14 09:43:12 +00:00
Thomas Bluemel
89265e0151 Implemented CreateHardLink()
svn path=/trunk/; revision=8700
2004-03-14 09:21:42 +00:00
Gé van Geldorp
8dc9f6bf9c Avoid ReactOS changes getting lost
svn path=/trunk/; revision=8699
2004-03-14 09:17:53 +00:00
Gé van Geldorp
ff837bae4a Explicitly include stddef.h for offsetof, needed for newer GCC versions
svn path=/trunk/; revision=8698
2004-03-14 08:51:16 +00:00
Gé van Geldorp
cd7fbb8e5c Translate pixel value from internal pixel format to RGB. Fixes bug #251.
svn path=/trunk/; revision=8697
2004-03-14 00:11:28 +00:00
Gé van Geldorp
e8cf99cda9 Delay unlinking of windows until after all messages have been sent.
This fixes bug #241.

svn path=/trunk/; revision=8696
2004-03-13 23:12:19 +00:00
Thomas Bluemel
ea0774aba3 RtlGetFullPathName_U() is supposed to check the parameter buf, it could be NULL
svn path=/trunk/; revision=8695
2004-03-13 22:23:14 +00:00
Filip Navara
1bc3d1b4ed - Fixed DPRINT.
svn path=/trunk/; revision=8694
2004-03-13 21:33:16 +00:00
Eric Kohl
3211fcf2d0 Implement LoadUserProfileW() and UnloadUserProfile().
svn path=/trunk/; revision=8693
2004-03-13 20:49:07 +00:00
Martin Fuchs
17d9fc0744 french translation for some start menu entries from Gge
svn path=/trunk/; revision=8691
2004-03-13 20:05:32 +00:00
Jason Filby
8552f80d82 Finish off NtDuplicateToken
svn path=/trunk/; revision=8690
2004-03-13 19:25:47 +00:00
David Welch
988f1d5968 - Checked in MmMapLockedPages patch from Anich Gregor.
svn path=/trunk/; revision=8689
2004-03-13 19:14:16 +00:00
David Welch
35f3e5b524 - Record feature information from cpuid. Not used at the moment.
svn path=/trunk/; revision=8688
2004-03-13 18:30:56 +00:00
David Welch
6cee07a9b2 - Fixed comment.
svn path=/trunk/; revision=8687
2004-03-13 18:28:33 +00:00
David Welch
6849e40ba7 - Added disassembler from gdb.
svn path=/trunk/; revision=8686
2004-03-13 18:26:13 +00:00
David Welch
ff3151887b - Added basic tracing, breakpoints and disassembly to the kernel debugger.
svn path=/trunk/; revision=8685
2004-03-13 18:21:57 +00:00
Hartmut Birr
c417fd21b1 - Split LdrpProcessImportDirectory into LdrpProcessImportDirectory and
LdrpProcessImportDirectoryEntry. Sometimes it is necessary to process
  a single entry from import directory and sometimes it is necessary
  to process all entries with the same name.

svn path=/trunk/; revision=8684
2004-03-13 18:14:04 +00:00
Gé van Geldorp
05825a6aab Mark update regions as global objects, to prevent their destruction when
the creating process exits

svn path=/trunk/; revision=8683
2004-03-13 17:33:53 +00:00
Eric Kohl
544d860114 Fix key name size calculation bugs.
Fill some allocated buffers with zeros.
Minor cleanup.

svn path=/trunk/; revision=8682
2004-03-13 12:14:44 +00:00
Eric Kohl
c9c372e34b Add missing EVENTLOG_SUCCESS.
svn path=/trunk/; revision=8681
2004-03-13 09:38:55 +00:00
Vizzini
35472661aa turn off skip bit to support VMWare FDC
svn path=/trunk/; revision=8680
2004-03-13 07:28:40 +00:00
Vizzini
007814383b fixed two race conditions with motor power-off; now handles disk change detection and no-disk-in-drive correctly
svn path=/trunk/; revision=8679
2004-03-13 07:04:54 +00:00
Vizzini
2207df1ae4 fixed a couple motor start/stop bugs; fixed a seek offset
svn path=/trunk/; revision=8678
2004-03-13 05:06:49 +00:00
David Welch
410da0d376 - Removed some debugging stuff I checked in by accident.
svn path=/trunk/; revision=8676
2004-03-13 00:41:40 +00:00
David Welch
e964a19eb2 - Fixed VPInterruptRoutine definition.
svn path=/trunk/; revision=8675
2004-03-12 23:03:21 +00:00
Gé van Geldorp
94c34aee80 Update status
svn path=/trunk/; revision=8674
2004-03-12 22:08:23 +00:00
Gé van Geldorp
ceabe25983 Sync to Wine-20040309:
Jason Edmeades <us@the-edmeades.demon.co.uk>
- Handle playing of files containing a '+' as part of the filename.
Robert Reif <reif@earthlink.net>
- Cleanup prepare/unprepare header parameter checking.
- Fix midiInGetDevCapsW.
Sean Young <sean@mess.org>
- Check uSize parameter in waveOutUnprepareHeader and
waveOutPrepareHeader.
Christian Costa <titan.costa@wanadoo.fr>
- Fixed waveInGetDevCapsW.

svn path=/trunk/; revision=8672
2004-03-12 21:20:53 +00:00
Martin Fuchs
5ceefba3a3 small 'Explorer' string adjustment for french
svn path=/trunk/; revision=8670
2004-03-12 21:20:02 +00:00
Martin Fuchs
82ed8b47d6 adjust start button to text size
svn path=/trunk/; revision=8668
2004-03-12 21:12:28 +00:00
Martin Fuchs
e40caec333 adjust start button to text size
svn path=/trunk/; revision=8667
2004-03-12 21:12:27 +00:00
Gé van Geldorp
a526783523 Sync to Wine-20040309:
Alexandre Julliard:
- Added version scripts for libwine and libwine_unicode.
Rein Klazes <rklazes@xs4all.nl>
- Fix MultiByteToWideChar and WideCharToMultiByte when called with code
page CP_SYMBOL.
- Remove the symbol font from the code page table, so it is not reported
as a valid/supported/installed code page.
- Remove workarounds for the badly behaved MultiByteToWideChar and co.
in a few places.

svn path=/trunk/; revision=8666
2004-03-12 21:04:04 +00:00
Gé van Geldorp
a990283857 Merge back commit from WineHQ
svn path=/trunk/; revision=8665
2004-03-12 20:30:44 +00:00
Filip Navara
7f1a2fa09f - Fixed declaration of DRIVER_OBJECT and friends.
svn path=/trunk/; revision=8664
2004-03-12 19:40:40 +00:00
Filip Navara
0e8946cb44 - Implemented IoGetDriverObjectExtension and IoAllocateDriverObjectExtension.
- Fixed the parts of IoGetDeviceProperty that were incorrectly sending IRP_MN_QUERY_BUS_INFORMATION.

svn path=/trunk/; revision=8663
2004-03-12 19:40:29 +00:00
Filip Navara
5c45ab6ac0 - Support for IRP_MN_QUERY_BUS_INFORMATION and devices on multiple PCI buses.
svn path=/trunk/; revision=8662
2004-03-12 19:40:05 +00:00
Art Yerkes
7b9bc747c8 Added bit counting and inverting functions to address.
Broke out some functions in info.c -- They still don't work properly but
are improving.
Added setting of netmask in datalink/lan.c from the registry, broke out
registry reading function.

svn path=/trunk/; revision=8661
2004-03-12 04:21:59 +00:00
Vizzini
29d063166b - Added arc path support
- Fixed disk change support
 - Fixed the priority boosts to be saner
 - Fixed some start/stop motor timing bugs
 - Figured out the Real Deal with Model 30 support (I hope...)
 - Cleaned up DMA init a bit
 - Improved return values, freed things on fail, etc
 - General code cleanup

svn path=/trunk/; revision=8660
2004-03-12 03:36:32 +00:00
David Welch
f12f44e036 - Actually I realised it isn't valid to touch the object at all after
decrementing the reference count unless the reference count was one. I
also removed the retention check in ObfReferenceObject since I couldn't
see how this would ever be needed.

svn path=/trunk/; revision=8659
2004-03-12 00:46:35 +00:00
David Welch
c61a3955d5 - Use the return value from calling InterlockedDecrement on the reference
count when checking whether the object should be retained. This fixes
a race whereby one thread decrements the value to one, another thread
come in and decrements the value to zero and starts the delete, the
first thread then comes back, does retention checks and finds the
reference count is now zero and then bugchecks because the object is
already being deleted.

svn path=/trunk/; revision=8658
2004-03-12 00:28:13 +00:00
Vizzini
abc17a4830 Lots of code clean-up; correctly copies files of any size to/from disk;
clean under prefast, lint, verifier, and checked win2k

svn path=/trunk/; revision=8657
2004-03-11 23:12:03 +00:00
David Welch
304ff0ba96 - Return any error code from the miniport device i/o control to the display
driver. Fixes crash when running with ati drivers.

svn path=/trunk/; revision=8656
2004-03-11 23:07:16 +00:00
Gé van Geldorp
162e4ee1f5 Sync to Wine-20040309:
Francois Gouget <fgouget@free.fr>
- Assorted spelling and case fixes.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Add SHMenuIndexFromID and SHCoCreateInstanceAC.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Stub the stopwatch API.
- Implement DoesStringRoundTripW,@371-3,@392.
- Move a couple of string functions into string.c
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Add IntlStrEqWorkerA/W.
- StrCmp tests.
- Implement string functions in comctl32.
- Use CompareString in shlwapi wherever possible instead of ugly
  helpers.
Kevin Koltzau <kevin@plop.org>
- Fix UrlCanonicalize and add regression test.
- Prevent crash with invalid args in a few URL functions.

svn path=/trunk/; revision=8655
2004-03-11 22:30:40 +00:00
Gé van Geldorp
778b9378b6 Sync to Wine-20040309:
Marcelo Duarte <wine-devel@bol.com.br>
- Update of Portuguese resources.

svn path=/trunk/; revision=8654
2004-03-11 22:00:19 +00:00
David Welch
01d3124925 - Made KeBugCheckEx into a call to KeBugCheckExWithTf.
- If file logging is in use then dump the last messages from the ringbuffer
on a bugcheck so the user can see them if the system was in graphics mode
when it crashed.

svn path=/trunk/; revision=8653
2004-03-11 21:50:24 +00:00
Gé van Geldorp
14a834a699 Sync to Wine-20040309:
Mike Hearn <mh@codeweavers.com>
- To reduce debugging noise, make IMalloc32/IMallocSpy implementations
  output to the new olemalloc debug channel.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Alexandre Julliard
- Sync some of the dll registrations with the contents of
  winedefault.reg.

svn path=/trunk/; revision=8652
2004-03-11 21:46:41 +00:00
David Welch
060aa03ca6 - Added KeSaveFloatingPoint and KeRestoreFloatingPointState to the old
ddk so win32k can use them.

svn path=/trunk/; revision=8651
2004-03-11 21:42:01 +00:00
David Welch
2f596c1ce8 - Implemented EngSaveFloatingPointState and EngRestoreFloatingState.
svn path=/trunk/; revision=8650
2004-03-11 21:38:58 +00:00
Gé van Geldorp
0581a7d1a6 Fix DocumentPropertiesW declaration
svn path=/trunk/; revision=8649
2004-03-11 21:16:56 +00:00
Gé van Geldorp
4798e9d2db Sync to Wine-20040309
svn path=/trunk/; revision=8648
2004-03-11 21:15:50 +00:00
Gé van Geldorp
dbdb5a1f76 Sync to Wine-20040309
svn path=/trunk/; revision=8647
2004-03-11 20:08:15 +00:00
Gé van Geldorp
63c72aa8a8 Move declaration of GetLastError() to match PSDK
svn path=/trunk/; revision=8646
2004-03-11 20:05:11 +00:00
Thomas Bluemel
c07e181b14 forgot this one, sorry
svn path=/trunk/; revision=8645
2004-03-11 19:22:21 +00:00
Thomas Bluemel
169c5abd20 simplified calls to MsqPostMessage()
svn path=/trunk/; revision=8644
2004-03-11 16:17:25 +00:00
Thomas Bluemel
1988a7b8ea first attempt to implement SendMessageTimeout()
svn path=/trunk/; revision=8643
2004-03-11 14:47:44 +00:00
Thomas Bluemel
241b66d3bd added buttons to test if a thread is hung
svn path=/trunk/; revision=8642
2004-03-11 14:44:48 +00:00
Gé van Geldorp
7bbe8a0aec New cursor
svn path=/trunk/; revision=8641
2004-03-11 11:34:51 +00:00
Gé van Geldorp
41f97f6862 Create image list for toolbar with same depth as display
svn path=/trunk/; revision=8640
2004-03-11 11:14:52 +00:00
Gé van Geldorp
6477510568 Sync to Wine-20040309:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Implement the drag list control.
- Fix tabs in LBItemFromPt.
- Move string functions to separate file.
- Implement string functions in comctl32.
- Use CompareString in shlwapi wherever possible instead of ugly
  helpers.
- Forward some wrapper functions since we don't care about compatibility
  with Win98 in this case.
- Documentation update.
- Update common control function documentation.
- Don't allocate space for text when nMaxTextRows = 0.
- Support custom check background.
- Reduce number of parameters needed for DrawString function.
- Fix some traces.
- The TBM_GET*HOTLIST functions take imagelist ID in wParam.
- Implement TBM_GETSTRING{A,W}.
- Implement undocumented 0x462 message.
Alexandre Julliard
- Removed a couple of unneeded helper functions.
Maxime BellengT <maxime.bellenge@laposte.net>
- Fix a regression in ImageList_Create when creating a dibsection.
Ulrich Czekalla <ulrich@codeweavers.com>
- Use dibsections for the images.
Dimitrie O. Paun <dpaun@rogers.com>
- LVN_BEGINRDRAG is implemented now. Fix typo.
Aric Stewart <aric@codeweavers.com>
- Implemented LISTVIEW_ApproximateViewRect for LVS_REPORT.
Fabian Cenedese <Cenedese@indel.ch>
- ListView should behave in OWNERDRAW as in FULLROWSELECT. This allows
  to select cells not in the first column in REPORT mode with OWNERDRAW
  style set.
Matt Chapman <matthewc@cse.unsw.edu.au>
- Fix a reentrancy issue in the property sheet implementation by not
  caching a pointer that can change.
- REBAR_Layout should respect the minimum size of bands even when
  RBBS_FIXEDSIZE is not set.
- REBAR_ShowBand needs to force layout of the rebar after a band is
  hidden/unhidden.
Vitaliy Margolen <wine-patch@kievinfo.com>
- Adjust all dimensions to match native.
- Invalidate whole tab area when multi-line.
- In vertical tab placement go from top to bottom.
- Fix annoying visual artifacts.
Huw Davies <huw@codeweavers.com>
- If TBSTYLE_EX_HIDECLIPPEDBUTTONS is set then invalidate the area that
  changes in a resize.
- Don't call SWP unless we're actually adjusting anything.
Christian Costa <titan.costa@wanadoo.fr>
- Accept null module instance, Loadstring can handle it.
Steve Lustbader <slustbader@verizon.net>
- Handle the firstVisible item being NULL in
Mike Hearn <mike@theoretic.com>
- Grow the treeview control expander button by 1px in each direction to
  match the native look.

svn path=/trunk/; revision=8639
2004-03-11 11:13:28 +00:00
Vizzini
8e37499a90 Fixed a length calculation bug introduced with transfer-splitting code
--> big file transfers work now

svn path=/trunk/; revision=8638
2004-03-11 07:01:58 +00:00
Vizzini
8438bc1293 fixed CHS computation bug
svn path=/trunk/; revision=8637
2004-03-11 06:48:22 +00:00
Vizzini
6ef65a3872 - Implement support for split DMA transfers
- Remove assert from CreateClose handler (still doesn't seem to get called
   consistently though)
 - Fixed an off-by-one bug for sector calculation

 --> Medium-sized files transfer to/from disk now

svn path=/trunk/; revision=8636
2004-03-11 06:24:44 +00:00
Andrew Greenwood
d5044130a8 - Updated the version number in README.TXT to 0.2.x (maybe I'm just being pedantic...)
svn path=/trunk/; revision=8635
2004-03-11 02:09:14 +00:00
James Tabor
64c32ff6f4 Turn off debug print out
svn path=/trunk/; revision=8634
2004-03-11 00:05:00 +00:00
Filip Navara
15989c99be - Support for SS_REALSIZEIMAGE and SS_CENTERIMAGE flags for bitmap static controls.
svn path=/trunk/; revision=8633
2004-03-10 23:21:56 +00:00
Filip Navara
cf41719321 - Include eventlog.c in the build.
svn path=/trunk/; revision=8632
2004-03-10 21:56:04 +00:00
Filip Navara
fe0b173e6e - Export the event log functions and LookupAccountSid[AW].
svn path=/trunk/; revision=8631
2004-03-10 21:37:18 +00:00
Aleksey Bragin
2b24e33ce7 LookupAccountSidA and W stubs added (FAR needs them). Hope it is the right place for them.
svn path=/trunk/; revision=8630
2004-03-10 21:34:42 +00:00
Andrew Greenwood
c9c497dc9f - Implemented ChangeMenuA and ChangeMenuW, as implemented in WINE.
svn path=/trunk/; revision=8629
2004-03-10 20:36:19 +00:00
Filip Navara
e080b835d0 - Fixed querying of thread locale.
svn path=/trunk/; revision=8628
2004-03-10 20:26:40 +00:00
Vizzini
ab9a6623a2 Properly set the length of the transfer so FastFat won't assert on us
svn path=/trunk/; revision=8627
2004-03-10 20:17:26 +00:00
Vizzini
1984d3c175 Disabled disk-change notification because it was breaking on Model 30 controllers; read/write is starting to work as a result
svn path=/trunk/; revision=8626
2004-03-10 19:35:04 +00:00
Steven Edwards
c29a4bda2e Add -Wall to the Makefle and fix a few compiler warrnings for
depreceated C++

svn path=/trunk/; revision=8625
2004-03-10 18:57:36 +00:00
Andrew Greenwood
b2a9c5d1de - Boot into GUI again (I'd disabled this as GUI stopped working in my local tree) - sorry about that!
svn path=/trunk/; revision=8624
2004-03-10 17:32:16 +00:00
Casper Hornstrup
fc8e6d987a 2004-03-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/bootsup.c (UpdateFreeLoaderIni): Use existing
	ReactOS entry if available.

svn path=/trunk/; revision=8623
2004-03-10 16:57:36 +00:00
Filip Navara
d72790226a - Fixed the Andrew's NtGdiCreateCompatibleBitmap fix, it was using a wrong Bits array.
svn path=/trunk/; revision=8622
2004-03-10 16:55:03 +00:00
Filip Navara
7f3f39dc20 - Fixed bug in VideoPortSetBusData.
svn path=/trunk/; revision=8621
2004-03-10 16:10:13 +00:00
Andrew Greenwood
a306af21c2 *Major soundcard support update*
ReactOS remains silent for now, but for anyone wishing to further work on the Sound Blaster driver and/or mmdrv.dll, this should help immensely :)

- Imported midimap from WINE
- Imported wavemap from WINE
- Imported msacm from WINE (32-bit only)
- Minor changes to mpu401
- Basic IRP_MJ_WRITE dispatch routine for sndblst.sys (receives buffers, does nothing else.)
- Added various WINE headers to include\wine

svn path=/trunk/; revision=8620
2004-03-10 15:22:45 +00:00
Gé van Geldorp
69208dc611 Tell apps we're NT4 SP6, VB runtime will fail if we report SP0
svn path=/trunk/; revision=8619
2004-03-10 09:14:29 +00:00
Andrew Greenwood
025e88cba9 - Implemented GetDCOrg(), which is officially obsolete, but I've included it for completeness' sake :)
svn path=/trunk/; revision=8618
2004-03-09 23:21:56 +00:00
Casper Hornstrup
e2b29d7f6c 2004-03-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* regtests/Makefile: Make REGTEST_TARGETS depend on *.c.
	* regtests/kmregtests/driver.c: Update call to PerformTests().
	* regtests/kmrtint/kmrtint.c (RegTestMain): Update to match prototype.
	* regtests/kmrtint/kmrtint.def (RegTestMain): Ditto.
	* regtests/kmrtint/kmrtint.edf (RegTestMain): Ditto.
	* regtests/win32base/tests/ws2event.c: New file.
	* regtests/regtests/regtests.c (OUPUT_MODE_DbgPrint,
	OUPUT_MODE_OutputDebugString, OUPUT_MODE_printf): Define.
	(OutputMode): New variable.
	(OutputRoutine): New function.
	(RunTestDriver): Add TestName parameter.
	(main): Parse command line to find output routine and test name.
	* regtests/shared/regtests.c (PerformTest): Use specified output routine
	if specified. Run only specified test if specified.
	(PerformTests): Update call to PerformTest().
	* regtests/shared/regtests.h (TestOutputRoutine): Add prototype.
	(TestDriverMain): Add OutputRoutine and TestName parameter.
	(PerformTests): Ditto.
	* regtests/win32base/Makefile (TARGET_SDKLIBS): Add ws2_32.a.
	* regtests/win32base/driver.c (RegTestMain): Update to match prototype.
	* regtests/win32base/win32base.def (RegTestMain): Ditto.
	* regtests/win32base/win32base.edf (RegTestMain): Ditto.
	* tools/regtests.c (UMSTUB): Update call to PerformTests().

svn path=/trunk/; revision=8617
2004-03-09 22:08:04 +00:00
David Welch
6616abd532 - Forgot this one.
svn path=/trunk/; revision=8616
2004-03-09 22:04:47 +00:00
David Welch
1fbda72a7a - Replaced some common sequences of inline assembly with macros. Avoid
having compiler checks scattered all over the place.
- Added some disabled code to KiDumpTrapFrame that dumps every address
on the stack that could be a return address. This is quite handy for
debugging crashes in modules compiled with fpo.

svn path=/trunk/; revision=8615
2004-03-09 21:49:54 +00:00
David Welch
e04ce16d15 - Fixed check for an out of range index in {Get/Set}{Class/Window}Long
(signed vs. unsigned arithmetic). Fixes crash in 'user32_test win'.

svn path=/trunk/; revision=8614
2004-03-09 21:21:39 +00:00
David Welch
860bde3b68 - Disabled double lock message in NDEBUG builds since it is triggered
whenever there is contention for the same object.

svn path=/trunk/; revision=8613
2004-03-09 20:34:28 +00:00
Filip Navara
9c45d9475e - Uncomment NDEBUG.
svn path=/trunk/; revision=8612
2004-03-09 18:56:32 +00:00
Filip Navara
daae8270b7 - Implemented VideoPortQueryPerformanceCounter and all video port spinlock functions.
- Added more debug info to VideoPortGetAccessRanges.

svn path=/trunk/; revision=8611
2004-03-09 17:28:49 +00:00
Aleksey Bragin
e4ac5bf4f4 Added more (in case we run on PowerPC) processor ids returned by GetSystemInfo(), by Christoph von Wittich.
svn path=/trunk/; revision=8610
2004-03-09 16:35:15 +00:00
Aleksey Bragin
b6ead4d81a Added more processor defines to SYSINFO struct, by Christoph von Wittich.
svn path=/trunk/; revision=8609
2004-03-09 16:33:22 +00:00
Eric Kohl
282e78244f Create a logon token and use it to start the shell process.
svn path=/trunk/; revision=8608
2004-03-09 15:08:12 +00:00
Eric Kohl
e380640f44 LogonUserW(): Fix key name.
svn path=/trunk/; revision=8607
2004-03-09 15:04:28 +00:00
Filip Navara
bea52f9dbe - Minor correction to DMA routines.
svn path=/trunk/; revision=8606
2004-03-09 14:16:39 +00:00
Gé van Geldorp
1bb065b4f4 Correct menu bars for windows not originating at top-left of screen.
This fixes bug #234.

svn path=/trunk/; revision=8605
2004-03-09 14:03:18 +00:00
Gé van Geldorp
97ce8d58b4 Fix SPMajorVersion for Nt4SP5, spotted by Christoph_vW
svn path=/trunk/; revision=8604
2004-03-09 12:59:13 +00:00
Richard Campbell
442842230e noncopyrighted icon FIXED
svn path=/trunk/; revision=8603
2004-03-09 10:59:26 +00:00
Richard Campbell
462be9c136 noncopyrighted icon
svn path=/trunk/; revision=8602
2004-03-09 10:56:16 +00:00
Richard Campbell
847c530813 please don't commit copyrighted microsoft icons to cvs!
svn path=/trunk/; revision=8601
2004-03-09 10:55:44 +00:00
Filip Navara
1a34bfa768 - Added Event Log stubs copied from Wine. It seems it's needed for Visual Basic runtime.
svn path=/trunk/; revision=8600
2004-03-08 21:58:17 +00:00
Filip Navara
dbce1b766d - Do the real memory allocation in context of CSRSS process. Suggested by David Welch.
svn path=/trunk/; revision=8599
2004-03-08 21:45:39 +00:00
Filip Navara
70acaf22e8 - Added service pack numbers to application compatibility settings.
svn path=/trunk/; revision=8598
2004-03-08 21:21:28 +00:00
Filip Navara
03e7c82dd2 - Mask out VIDEO_MEMORY_SPACE_DENSE flag, because it's specific to ALPHA processors. This gets Matrox Mystique driver working.
svn path=/trunk/; revision=8597
2004-03-08 20:54:10 +00:00
David Welch
2b4fa805eb - Hacky implementation of some dma related functions.
svn path=/trunk/; revision=8596
2004-03-08 20:27:33 +00:00
Richard Campbell
5df0488416 one more change.
svn path=/trunk/; revision=8595
2004-03-08 20:19:54 +00:00
Richard Campbell
f350173836 fix corrupted GPL problem
svn path=/trunk/; revision=8594
2004-03-08 20:16:45 +00:00
Steven Edwards
41a3435039 Get MSYS and a few others working again....
svn path=/trunk/; revision=8593
2004-03-08 18:09:05 +00:00
Filip Navara
a8d7de6a74 - Fixed DPRINT.
svn path=/trunk/; revision=8592
2004-03-08 14:31:49 +00:00
Thomas Bluemel
e63f7f9cd0 added basic skeleton for the system control panel
svn path=/trunk/; revision=8591
2004-03-08 14:24:47 +00:00
Filip Navara
06f1206cf2 - Fixed DPRINT.
svn path=/trunk/; revision=8590
2004-03-08 14:22:30 +00:00
Thomas Bluemel
246677c52f little fixes
svn path=/trunk/; revision=8589
2004-03-08 14:20:14 +00:00
Art Yerkes
0c76856d9c More support for IOCTL_TCP_QUERY/SET_INFORMATION_EX
Connected ControlChannel handle type.
Allowed empty EaInfo in create -> ControlChannel.
Added TDI entity for interfaces.
Fixed IPSnmpInfo interface number report.
Fixed returned buffer size report in DispTdiQueryInformationExComplete
Added IPROUTE_ENTRY struct.

What works:
tcpquery lists three entities, two builtin and one IF_ENTITY
tcpquery -i reports 1 interface and 1 address for me (addr=127.0.0.1)

TODO:
Type information for each entity (only two builtin entities are supported now)
Interface info out (IFEntry)
Route info in/out (IPRouteEntry)

svn path=/trunk/; revision=8588
2004-03-08 10:20:18 +00:00
Martin Fuchs
9183e287b1 new bug reports in TODO list
svn path=/trunk/; revision=8587
2004-03-08 09:45:19 +00:00
Eric Kohl
11cc5733d3 Return unique IndexNumber.
Minor cleanup.

svn path=/trunk/; revision=8586
2004-03-08 08:51:26 +00:00
Filip Navara
17ad90f8d0 - Implement RtlGetVersion.
- Rewrite VideoPortGetVersion using RtlGetVersion.
- Added debugging messages to InternalMapMemory.
- Changed VideoPortAllocateBuffer back to PagedPool.

svn path=/trunk/; revision=8585
2004-03-08 08:05:27 +00:00
David Welch
6c8ead7315 - Added a definition for PEVENT.
svn path=/trunk/; revision=8584
2004-03-08 07:41:27 +00:00
David Welch
16473a5114 - Implemented event services.
svn path=/trunk/; revision=8583
2004-03-08 07:04:57 +00:00
James Tabor
8311b47fe4 Finish changes to VideoPortGetVersion
svn path=/trunk/; revision=8582
2004-03-08 04:41:20 +00:00
James Tabor
2f224f7360 Change NonPagedPool for AllocateBuffer and implemented GetVersion for David Welch.
svn path=/trunk/; revision=8581
2004-03-08 04:09:02 +00:00
Andrew Greenwood
0e200b6f99 * Fixed co-ordinate translation for windows that have been moved, adjusting the co-ordinates to take into account the window captions.
NOTE: Menu item tracking is still broken for windows that have been moved. Eg, if you move a window, click on a menu, then move the mouse pointer over another item, the new menu will NOT open unless you click.

svn path=/trunk/; revision=8580
2004-03-07 22:13:51 +00:00
Filip Navara
c0b4d77eb9 - Removed the spinlock I added in my last patch, it's wrong!
svn path=/trunk/; revision=8579
2004-03-07 21:09:08 +00:00
Hartmut Birr
11897d4d87 - Implemented double buffering for a console windows. Currently the second buffer
is a memory bitmap. All screen buffer updates does also write to the bitmap and
  the screen is updated by invalidating the update region. The previous version
  has released the screen buffer lock while scrolling up. It is not possible to
  release the lock while a write to the screen buffer is in progress. If the text
  output routines are faster, we should change the second buffer from a bitmap
  to character array.

svn path=/trunk/; revision=8578
2004-03-07 21:00:11 +00:00
Filip Navara
84269ab2d2 - Fixed MapWindowPoints for NULL window handles.
svn path=/trunk/; revision=8577
2004-03-07 20:38:17 +00:00
Filip Navara
8aad973151 - Changed DbgPrint to DPRINT in DriverEntry.
svn path=/trunk/; revision=8576
2004-03-07 20:33:25 +00:00
Filip Navara
877788b63b - Call create process notify routines from NtCreateProcess.
- Protect PiProcessNotifyRoutine by a spinlock.
- Started PsSetLoadImageNotifyRoutine implementation, it just registers the callback, but doesn't call it.

svn path=/trunk/; revision=8575
2004-03-07 20:31:53 +00:00
Hartmut Birr
fa397a0e33 - Added a disk speed test utility.
svn path=/trunk/; revision=8574
2004-03-07 20:12:13 +00:00
KJK::Hyperion
61ae1aa515 - Added comments to the fiber test, plus minor fixes
- Fixed NT_TIB structure to be compatible with w32api
 - Fixed fiber support in kernel32.dll. Now the correct argument is passed to fiber startup routines

svn path=/trunk/; revision=8573
2004-03-07 20:07:05 +00:00
Hartmut Birr
783cbe0718 - Fixed the handling for ctrl and alt keys.
svn path=/trunk/; revision=8572
2004-03-07 20:03:43 +00:00
Hartmut Birr
ef908e75fd - Initialized the object tag to prevent the tag 0xcccccccc.
svn path=/trunk/; revision=8571
2004-03-07 19:59:37 +00:00
Hartmut Birr
68ddb0bcdd - Pre initialized the resulting transfer length for requests which are split.
svn path=/trunk/; revision=8570
2004-03-07 19:53:08 +00:00
Hartmut Birr
ec2daabaf9 - Changed the dma capability detection code.
- Enabled DMA transfers by default.
- Implemented DMA transfer for atapi devices (CD rom drives).

svn path=/trunk/; revision=8569
2004-03-07 19:48:45 +00:00
Art Yerkes
ce4344ab2c Added waiting on console handles. We use a thread to poll for input
availability.

svn path=/trunk/; revision=8568
2004-03-07 18:06:29 +00:00
Art Yerkes
796f34f5ff David Welch turned me on to the right way to solve the cygwin fork section
map problem.  This fixes map_dup_inherit.

svn path=/trunk/; revision=8567
2004-03-07 17:48:41 +00:00
Filip Navara
39078ad027 - Correct base addresses.
svn path=/trunk/; revision=8566
2004-03-07 14:33:13 +00:00
David Welch
bd277c512b - Added stubs for EngAlphaBlend and EngControlSprites.
svn path=/trunk/; revision=8565
2004-03-07 12:49:27 +00:00
David Welch
27ea3725e5 - .cvsignore update.
svn path=/trunk/; revision=8564
2004-03-07 12:42:10 +00:00
Filip Navara
5c13959830 - Moved the loading of font names from user32.dll to win32k.sys.
- Moved the window metrics values from hivesys.inf to hivedef.inf.
- In case of failure of getting the font values from registry, use default values.
- Removed user32.dll dependency on advapi32.dll.
- Removed the "UGLY HACK" code, because it really isn't true that ReactOS doesn't handle fonts with negative height.

svn path=/trunk/; revision=8563
2004-03-07 11:59:43 +00:00
Filip Navara
fceb231b0e - Fixed RtlFormatCurrentUserKeyPath and it's use.
- Fill correctly all members of the returned device object in IoCreateDevice.
- Don't bug check in loader when export isn't found, only report it and don't load the module.
- If we know a module path while loading, use it for searching for the import modules.
- Modified LdrpBuildModuleBaseName to not strip the extension from file name, because the files 's3legacy.dll' and 's3legacy.sys' are otherwise treated as the same files and wrong module is loaded.

svn path=/trunk/; revision=8562
2004-03-07 11:59:10 +00:00
David Welch
4a88989b85 - Added an implementation of LdrFindImageProcAddress.
svn path=/trunk/; revision=8561
2004-03-07 04:44:41 +00:00
David Welch
75860969fe - Added an implemention of VideoPortGetProcAddress
- ati2mtag calls VideoPortGetAccessRanges with *DeviceId == 0 so treat
that as matching an device id.
- Return STATUS_SUCCESS from VideoPortSetTrappedEmulatorPorts even though
the data is ignored.

svn path=/trunk/; revision=8560
2004-03-07 04:43:55 +00:00
David Welch
ff81e5e1b0 - Use an event rather than a semaphore to wake up the thread that writes
debug output to disk. Avoids bugchecking if the number of debug prints
before the thread wakes up exceeds the semaphore limit.

svn path=/trunk/; revision=8559
2004-03-07 04:38:41 +00:00
KJK::Hyperion
7682e4ce80 Fiber switching code fixed
svn path=/trunk/; revision=8558
2004-03-07 04:00:39 +00:00
KJK::Hyperion
cdf117484b Added fiber test
svn path=/trunk/; revision=8557
2004-03-07 03:48:47 +00:00
KJK::Hyperion
75c1012851 Fiber test application. It's a simulation of the Windows NT scheduling algorithm, complete with priority levels, real-time priorities and starvation prevention. Lacks pre-emption, waiting and boosts
svn path=/trunk/; revision=8556
2004-03-07 03:15:20 +00:00
Hartmut Birr
a30e1be179 - Initialized the win32k timer as SynchronizationTimer.
A notification timer is always signaled after the first hit.
- Possible this does fix more timer related problems.

svn path=/trunk/; revision=8555
2004-03-06 23:09:23 +00:00
David Welch
de9089e707 - Added padding to align VIDEO_PORT_CONFIG_INFO.VdmPhysicalVideoMemoryAddress
and subsequent members the same as visualc.

svn path=/trunk/; revision=8554
2004-03-06 22:27:55 +00:00
David Welch
1f3378866b - Forgot this file.
svn path=/trunk/; revision=8553
2004-03-06 22:26:05 +00:00
David Welch
30aec6e5f7 - Added stubs for some of the new w2k/xp functions.
svn path=/trunk/; revision=8552
2004-03-06 22:25:22 +00:00
David Welch
b041530f2d - Removed some unnecessary DbgPrints from the fatal exception path; ignore
the breakpoint in the tail of KeBugCheckEx/KeBugCheckWithTf if no debugger
is connected.

svn path=/trunk/; revision=8551
2004-03-06 22:24:14 +00:00
David Welch
957b856245 - Added stub implementations of MmAllocatePagesForMdl, MmFreePagesFromMdl
and MmMapLockedPagesSpecifyCache.

svn path=/trunk/; revision=8550
2004-03-06 22:21:20 +00:00
Filip Navara
c3d3178f3e - Corrected processing import directories to handle case when executable imports the same DLL more times.
svn path=/trunk/; revision=8549
2004-03-06 20:32:06 +00:00
James Tabor
fa714393ca Started VideoPortGetAgpServices, Allocate and ReleaseBuffer.
svn path=/trunk/; revision=8548
2004-03-06 08:39:06 +00:00
Filip Navara
f1d20bbf54 2004-03-06 Filip Navara <xnavara@volny.cz>
* drivers/video/videoprt/int10.c (VideoPortInt10):
	Print more debug informations.
	* drivers/video/videoprt/videoprt.c (VideoPortInitialize):
	Prevent conflicts when more miniport drivers are loaded.
	(VideoPortGetDeviceBase, VideoPortMapMemory, InternalMapMemory):
	Change way of reporting error to prevent reporting error when
	the resources were successfully mapped.
	(VideoPortDDCMonitorHelper): Add stub.
	(VidDispatchDeviceControl): Allocate memory from NonPagedPool.
	Add debug messages.
	* drivers/video/videoprt/videoprt.def (VideoPortDDCMonitorHelper):
	Add export.
	* drivers/video/videoprt/videoprt.edf (VideoPortDDCMonitorHelper):
	Ditto.
	* include/ddk/winddi.h (ENG_SYSTEM_ATTRIBUTE): Declare.
	* include/win32k/driver.h (DRIVER_FindMPDriver): Change declaration.
	* subsys/win32k/eng/surface.c (EngModifySurface): Implement.
	* subsys/win32k/misc/driver.c (DRIVER_FindMPDriver):
	Modify to open specific miniport driver depending on parameter.
	* subsys/win32k/objects/dc.c (GetRegistryPath):
	Add parameter to specify display driver number.
	(FindDriverFileNames): Ditto.
	(SetupDevMode): Ditto.
	(IntCreateDC): Correct DPRINT.
	(IntCreatePrimarySurface): Change to try more miniport drivers
	before giving up.
	* subsys/win32k/stubs/stubs.c (HeapVidMemAllocAligned, VidMemFree,
	EngDitherColor, EngQuerySystemAttribute): Add stubs.
	* subsys/win32k/win32k.edf (EngDitherColor, EngQuerySystemAttribute,
	HeapVidMemAllocAligned, VidMemFree, EngModifySurface):
	Add exports.
	* subsys/win32k/win32k.def: Ditto.

svn path=/trunk/; revision=8547
2004-03-06 01:22:04 +00:00
Hartmut Birr
30264d875a - Made it possible to allocate a pageop only if no other pageop for the given address exist.
- Try to pageout a page only if no other access to the page exist.
- Gave a free page only to the next waiting request (in MmReleasePageMemoryConsumer),
  if sufficient free pages are available.

svn path=/trunk/; revision=8546
2004-03-05 11:31:59 +00:00
Hartmut Birr
35cd217de4 - Changed the check for determining if the drawing destination is the screen or not.
- Fixed the order of calls to MouseSafetyOnDrawEnd in some functions.

svn path=/trunk/; revision=8545
2004-03-05 09:02:42 +00:00
Art Yerkes
a57c52276e route add and route delete now work on real windows with our iphlpapi.
svn path=/trunk/; revision=8544
2004-03-05 04:50:01 +00:00
Filip Navara
1f2169eb29 2004-04-04 Filip Navara <xnavara@volny.cz>
* drivers/net/afd/afd/dispatch.c (AfdDispGetName): Implement.
	* drivers/net/afd/include/afd.h (TdiQueryInformation): Declare.
	* drivers/net/tcpip/tcpip/dispatch.c (DispTdiQueryInformation):
	Partially implement for TDI_QUERY_ADDRESS_INFO request.
	* drivers/net/tcpip/transport/tcp/tcp.c (TCPiBuildPacket):
	Don't use variable name NdisBuffer, because it causes conficts.

svn path=/trunk/; revision=8543
2004-03-05 00:48:11 +00:00
Filip Navara
7963bf3535 CVS maintaince
svn path=/trunk/; revision=8542
2004-03-04 23:26:36 +00:00
David Welch
876b2d6ed6 - Make the install depend on the targets to be installed (I don't know
how anyone could service without this).

svn path=/trunk/; revision=8541
2004-03-04 23:14:01 +00:00
David Welch
c77f9d0572 - Fix for crash on gui exit caused by trying to free an uninitialized
variable.

svn path=/trunk/; revision=8540
2004-03-04 23:11:43 +00:00
David Welch
45a3ee5da7 - Reenable the screen after setting the mode.
svn path=/trunk/; revision=8539
2004-03-04 23:01:19 +00:00
Martin Fuchs
72eafe1583 new result buffer length parameter for SHELL_FindExecutable()
svn path=/trunk/; revision=8538
2004-03-04 21:12:11 +00:00
Casper Hornstrup
318a90741d 2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tcpip/i386: New directory.
	* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
	* drivers/net/tcpip/notes.txt: New file.
	* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
	network event.
	(AfdDispEventSelect): Reference event handle.
	* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
	Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
	* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
	EventObject of type PKEVENT.
	* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
	(TARGET_OBJECTS): Add ARCH_OBJECTS.
	* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
	* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
	prototype.
	(TCPv4Checksum): New macro.
	(CorrectChecksum): Rename to IPv4CorrectChecksum.
	(TCPv4CorrectChecksum): New macro.
	* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
	* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
	(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
	* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
	and AckNumber.
	(TCP_SEGMENT): New structure.
	(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
	* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
	for Data on failure.
	* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
	* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
	from ChecksumCompute.
	* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
	operation.
	* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
	PTDI_ADDRESS_IP.
	Initialize ReceivedSegments.
	* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
	(DisplayIPPacket): Call DisplayIPHeader().
	(DisplayTCPHeader): Change format strings.
	* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
	TCPSegmentList): Add.
	(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
	TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
	TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
	function.
	(TCPiBuildPacket): Build segment.
	(TCPStartup): Initialize TCPSegmentList.
	(TCPShutdown): Cleanup TCPSegmentList.

svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
Steven Edwards
0d2b52fb76 Added .cvsignore I forgot about.
svn path=/trunk/; revision=8536
2004-03-04 19:00:44 +00:00
Steven Edwards
5bc9888562 Enable the rest of the stubs needed to get Hello-WinCE working.
No the hello world app still doesnt work. Only the messagebox app works.

svn path=/trunk/; revision=8535
2004-03-04 18:55:44 +00:00
Filip Navara
a2f24f38dc - Cleaned up the Boot Video driver.
- Replaced most of the magic numbers by defines.
- Changed the video mode setting to directly program the VGA registers instead of using Ke386CallBios.
- Properly map the video memory.

svn path=/trunk/; revision=8534
2004-03-04 18:55:09 +00:00
Steven Edwards
5c30d2cc66 Added a stub implementation of commctrl.dll for WinCE support
svn path=/trunk/; revision=8533
2004-03-04 18:54:21 +00:00
Filip Navara
499908b04f - Implemented VideoPortEnableInterrupt and VideoPortDisableInterrupt.
svn path=/trunk/; revision=8532
2004-03-04 18:51:58 +00:00
Filip Navara
eab00ba2a1 - Changed Video Mode setting routines to directly modify VGA registers instead on relying on Int 0x10 services.
- Removed unused code.

svn path=/trunk/; revision=8531
2004-03-04 18:49:58 +00:00
Filip Navara
1849adaa6b CVS maintaince
svn path=/trunk/; revision=8530
2004-03-04 18:45:16 +00:00
Steven Edwards
b6c0920b60 Get a simple WinCE x86 MessageBox program to load.
svn path=/trunk/; revision=8529
2004-03-04 18:24:29 +00:00
Royce Mitchell III
856035ab09 NtGdiPolygon simplification
svn path=/trunk/; revision=8528
2004-03-04 01:50:26 +00:00
Gunnar Dalsnes
cdd8158e28 cleanup
svn path=/trunk/; revision=8527
2004-03-04 01:30:00 +00:00
Gunnar Dalsnes
3c737e0e68 disable apc's for work items
svn path=/trunk/; revision=8526
2004-03-04 01:29:24 +00:00
Filip Navara
07892f4f36 - Don't zero memory allocated by ExAllocatePool.
- Fix font enumeration algorithm to not depend on zeroed memory. (Harmut Birr)

svn path=/trunk/; revision=8525
2004-03-04 00:07:03 +00:00
Steven Edwards
2bb6230071 Created a Edf file.
Commented the rest of the functions out pending my testing
of the WinCE MessageBox app tonight.

svn path=/trunk/; revision=8524
2004-03-03 23:27:27 +00:00
Martin Fuchs
f4ce2a5433 correct jump_to() functions
svn path=/trunk/; revision=8523
2004-03-03 20:33:21 +00:00
Martin Fuchs
30f3bfac23 add opened files to the "recent documents" list
svn path=/trunk/; revision=8522
2004-03-03 20:29:52 +00:00
Martin Fuchs
d39b5e77aa add opened files to the "recent documents" list
svn path=/trunk/; revision=8520
2004-03-03 20:29:51 +00:00
Martin Fuchs
556bf3a4ef new cmdlen parameter for SHELL_FindExecutablebyOperation()
svn path=/trunk/; revision=8519
2004-03-03 20:11:31 +00:00
Martin Fuchs
18f3babce6 merge Wine commit about:
Modified files:
	dlls/shell32   : shlexec.c

Log message:
	Martin Fuchs <martin-fuchs@gmx.net>
	Fix buffer length usage for RegQueryValueW() calls at various places.

Patch: http://cvs.winehq.org/patch.py?id=11331

svn path=/trunk/; revision=8518
2004-03-03 19:26:58 +00:00
Steven Edwards
8a70e9b5a5 Working on Making ReactOS run Windows CE apps........
Dont expect much yet. this is a work in progress.

svn path=/trunk/; revision=8517
2004-03-03 19:11:20 +00:00
Royce Mitchell III
c2923708cd patch by m-t and myself: fixes RoundRect compatibility issue.
svn path=/trunk/; revision=8515
2004-03-03 06:33:58 +00:00
Royce Mitchell III
2a6974f355 patch by m-t: small patch to improve compatibility.
svn path=/trunk/; revision=8514
2004-03-03 04:09:20 +00:00
Steven Edwards
287ae57914 Removed paint and wordpad dummy files
svn path=/trunk/; revision=8513
2004-03-03 03:43:40 +00:00
David Welch
12090241ff - Make dependency files depend on generated headers.
svn path=/trunk/; revision=8512
2004-03-02 22:36:18 +00:00
David Welch
018e7a5fe7 Oops.
svn path=/trunk/; revision=8511
2004-03-02 21:07:35 +00:00
David Welch
3ee20ff277 - Be a bit more specific in the dependencies for the regression tests.
svn path=/trunk/; revision=8510
2004-03-02 20:29:16 +00:00
Filip Navara
7885dac181 netevent.h -> ddk/netevent.h
svn path=/trunk/; revision=8509
2004-03-02 20:06:49 +00:00
Filip Navara
daaf2a72b8 - Build AFD, TCPIP and TDI with w32api headers.
- Removed the old TDI headers from include/net.

svn path=/trunk/; revision=8508
2004-03-02 18:18:15 +00:00
Filip Navara
5eed2db5ae Added import definitions for KefAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
svn path=/trunk/; revision=8507
2004-03-02 17:20:36 +00:00
Filip Navara
7d8bd23d04 assert -> ASSERT
svn path=/trunk/; revision=8506
2004-03-02 17:16:04 +00:00
Filip Navara
71853e115b 2004-03-02 Filip Navara <xnavara@volny.cz>
* include/ddk/scsi.h: Replace ASSERT with assert.
	* include/ddk/video.h: Ditto.
	* include/ddk/winddk.h: Ditto. Remove the lower case assert macro.
	* include/ddk/tdi.h: Correct packing.

svn path=/trunk/; revision=8505
2004-03-02 16:49:22 +00:00
Martin Fuchs
d6e2c152dd merge WineHQ commit
svn path=/trunk/; revision=8504
2004-03-02 10:30:38 +00:00
Martin Fuchs
9cd5e17f9f fix NAMELESSUNION support for struct DECIMAL
svn path=/trunk/; revision=8503
2004-03-02 10:25:59 +00:00
Steven Edwards
636e39eb03 Imported WineCalc by James Briggs.
svn path=/trunk/; revision=8502
2004-03-01 23:27:02 +00:00
Martin Fuchs
43a529f49b - declare IPicture OBJC macros
- enable olepicture.c

svn path=/trunk/; revision=8501
2004-03-01 22:57:20 +00:00
Martin Fuchs
897ccf0b08 resolve SysStringLen FIXME
svn path=/trunk/; revision=8500
2004-03-01 22:45:23 +00:00
Martin Fuchs
7be7923e1a remove superflous dllmain.c file
svn path=/trunk/; revision=8499
2004-03-01 22:41:52 +00:00
Martin Fuchs
93a1911cc6 correct SafeArrayCreateVector[Ex]() parameter types
svn path=/trunk/; revision=8498
2004-03-01 22:12:57 +00:00
Filip Navara
a7c8c741c3 - OpenGL bug fixes and cleanup. Patch by Anich Gregor.
svn path=/trunk/; revision=8497
2004-03-01 19:36:21 +00:00
Filip Navara
279a889834 - Fixed IntGdiExtEscape. Patch by Anich Gregor.
svn path=/trunk/; revision=8496
2004-03-01 19:25:33 +00:00
Vizzini
b5647b11fd First import of in-progress floppy driver replacement. Still needs some
debugging and feature improvements, and the kernel needs a bit of work to
get this driver loading on ReactOS.

svn path=/trunk/; revision=8495
2004-03-01 06:37:26 +00:00
Gunnar Dalsnes
92215102c2 fix root keys sort order
svn path=/trunk/; revision=8494
2004-03-01 01:07:37 +00:00
Gunnar Dalsnes
f4ae5098cc speedup listing items in the treeview
svn path=/trunk/; revision=8493
2004-03-01 00:50:56 +00:00
Hartmut Birr
772d5765b7 - Fixed the returned values for a data underrun.
- Fixed the write count in packet interrupts.

svn path=/trunk/; revision=8492
2004-02-29 22:01:21 +00:00
Filip Navara
7bb59c906f - Fix for race condition that should never happen.
svn path=/trunk/; revision=8491
2004-02-29 17:43:41 +00:00
Martin Fuchs
bc297296d2 fix SafeArrayCreateVectorEx()
svn path=/trunk/; revision=8490
2004-02-29 16:48:02 +00:00
Martin Fuchs
8a5a082170 merge WineHQ commits
svn path=/trunk/; revision=8489
2004-02-29 16:37:23 +00:00
Martin Fuchs
146314a91a fix DECIMAL macros and enable DECIMAL processing functions
svn path=/trunk/; revision=8488
2004-02-29 16:24:54 +00:00
Martin Fuchs
ed3857e1b1 enable SafeArray...() functions
svn path=/trunk/; revision=8487
2004-02-29 15:36:10 +00:00
Martin Fuchs
3834b079e5 remove more FIXMEs
svn path=/trunk/; revision=8486
2004-02-29 15:27:51 +00:00
Martin Fuchs
e6d1d24014 remove LOG output
svn path=/trunk/; revision=8485
2004-02-29 15:06:34 +00:00
Martin Fuchs
f685bba74e enable dispatch.c and varformat.c
svn path=/trunk/; revision=8484
2004-02-29 14:48:12 +00:00
Martin Fuchs
4f35ba6289 declare ITypeInfo_... COBJ macros
svn path=/trunk/; revision=8483
2004-02-29 14:22:52 +00:00
Martin Fuchs
efa31a77fb remove FIXMEs and enable now compiling functions
svn path=/trunk/; revision=8482
2004-02-29 14:19:05 +00:00
Martin Fuchs
bb2bc91e3c declare VARIANT manipulation functions
svn path=/trunk/; revision=8481
2004-02-29 14:16:27 +00:00
Martin Fuchs
6ac5583cf1 - define struct UDATE
- define VTBIT_... constants
- define missing VAR_... constants
- declare functions VarDateFromUdate, VarDateFromUdateEx, VarUdateFromDate

svn path=/trunk/; revision=8480
2004-02-29 14:12:38 +00:00
Martin Fuchs
3b61103945 define DISP_E_DIVBYZERO
svn path=/trunk/; revision=8479
2004-02-29 14:11:02 +00:00
Martin Fuchs
01e0ab2caf * include/oleauto.h (struct NUMPARSE, NUMPRS_...): add declarations for struct NUMPARSE
* include/oleauto.h (VarParseNumFromStr, VarNumFromParseNum): add function declarations

svn path=/trunk/; revision=8478
2004-02-29 13:52:18 +00:00
Martin Fuchs
099d7698c3 remove FIXMEs and re-enable disabled code
svn path=/trunk/; revision=8477
2004-02-29 13:30:08 +00:00
Martin Fuchs
a836674b95 added VARAINT union members llVal and ullVal
svn path=/trunk/; revision=8476
2004-02-29 13:23:45 +00:00
Martin Fuchs
5666895041 move missing oleaut32 declarations from ros-mingw-fixes.h into W32API headers
svn path=/trunk/; revision=8475
2004-02-29 12:53:39 +00:00
Hartmut Birr
b859b0b5db - Started implementation of busmaster dma.
- Splited the interrupt handlers.
- Don't handle 6 byte mode sense requests.

svn path=/trunk/; revision=8474
2004-02-29 12:27:52 +00:00
Hartmut Birr
72986b727d - Rewrote parts of the capability detection code.
svn path=/trunk/; revision=8473
2004-02-29 12:26:09 +00:00
Martin Fuchs
a4a8e435ed remove FIXMEs using corrected W32API headers
svn path=/trunk/; revision=8472
2004-02-29 12:12:18 +00:00
Martin Fuchs
035924f082 declare missing COLOR_... constants
svn path=/trunk/; revision=8471
2004-02-29 12:11:43 +00:00
Martin Fuchs
655457493c remove FIXMEs using corrected W32API headers
svn path=/trunk/; revision=8470
2004-02-29 12:05:33 +00:00
Martin Fuchs
e38d6f00f7 - correct definition of VT_INT_PTR and VT_UINT_PTR
svn path=/trunk/; revision=8469
2004-02-29 12:03:30 +00:00
Martin Fuchs
9adec1e712 - correct parameter type from LPDISPATCH* to LPDISPATCH
- define V_U... macros

svn path=/trunk/; revision=8468
2004-02-29 12:03:23 +00:00
Hartmut Birr
ad9ce1d94e - Protected the callback stack list with a spinlock.
svn path=/trunk/; revision=8467
2004-02-29 11:51:49 +00:00
Filip Navara
e7a65678bd - Fixed GDI handle leak.
svn path=/trunk/; revision=8466
2004-02-29 11:34:42 +00:00
Filip Navara
e5185d34b3 - Removed the incorrect implementations of Device Interface functions.
- Added verified implementation of IoGetDeviceInterfaces written by Matthew Brace and fixed by me.

svn path=/trunk/; revision=8465
2004-02-29 11:34:40 +00:00
Hartmut Birr
9a5bc1ce43 - Don't retry, if the request fails with SRB_STATUS_INVALID_REQUEST.
svn path=/trunk/; revision=8464
2004-02-29 11:21:58 +00:00
Hartmut Birr
fc1748325f - Implemented ScsiPortGetPhysicalAddress for Srb buffers.
svn path=/trunk/; revision=8463
2004-02-29 11:19:21 +00:00
Martin Fuchs
56aef8d72d preparations for SDI code merge
svn path=/trunk/; revision=8462
2004-02-28 23:33:15 +00:00
Filip Navara
504a0756cf - Fixed the definition of IsTextUnicode.
svn path=/trunk/; revision=8460
2004-02-28 22:26:34 +00:00
Thomas Bluemel
f54363658f added ability to cache gdi objects so they don't have to be allocated and deallocated all the time. it is disabled by default but could perhaps speed up the gui a bit.
svn path=/trunk/; revision=8459
2004-02-28 21:16:55 +00:00
Martin Fuchs
d7b74d7460 move '#undef UNTERFACE' behind interface definitions
svn path=/trunk/; revision=8458
2004-02-28 20:14:33 +00:00
Martin Fuchs
6f1017c15b merge WineHQ commits
svn path=/trunk/; revision=8457
2004-02-28 19:16:54 +00:00
Martin Fuchs
f7a2461d14 - "up" button (no functionality yet)
- moved extra functions into new "special" toolbar

svn path=/trunk/; revision=8456
2004-02-28 18:10:03 +00:00
Filip Navara
6332ecc1cd - Fixed the MSVCRT compiling error.
svn path=/trunk/; revision=8453
2004-02-28 16:54:22 +00:00
Martin Fuchs
c3d638c3a8 - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/trunk/; revision=8452
2004-02-28 16:41:55 +00:00
Martin Fuchs
d0cec9c1cd - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/trunk/; revision=8451
2004-02-28 16:41:55 +00:00
Martin Fuchs
6a84f09c2e compatibility fix for "Sleipnir" web browser: minimizing by clicks on taskbar
svn path=/trunk/; revision=8448
2004-02-28 16:05:33 +00:00
Martin Fuchs
a5248aa7bc desktop switching: allow applications to be visible only on one desktop
svn path=/trunk/; revision=8446
2004-02-28 15:14:38 +00:00
Filip Navara
44cb45b570 - Fixed RtlNtStatusToDosErrorNoTeb problems caused by mixing signed and unsigned integers.
svn path=/trunk/; revision=8445
2004-02-28 15:12:49 +00:00
Filip Navara
9b3df405d1 - NtQueryKey should return STATUS_BUFFER_TOO_SMALL and not STATUS_BUFFER_OVERFLOW.
svn path=/trunk/; revision=8444
2004-02-28 15:12:37 +00:00
Filip Navara
d6fd3dcb34 - Add a notice about import library order.
svn path=/trunk/; revision=8443
2004-02-28 15:12:28 +00:00
Martin Fuchs
0f584fd410 new TODO entries
svn path=/trunk/; revision=8442
2004-02-28 14:47:12 +00:00
Martin Fuchs
3d260251a8 Command line option "-install" to replace previously installed shell application
svn path=/trunk/; revision=8441
2004-02-28 14:26:40 +00:00
Martin Fuchs
44f3f0d4a0 remember last foreground window when switching desktops
svn path=/trunk/; revision=8440
2004-02-28 13:49:53 +00:00
Martin Fuchs
fd2602afbb remember last foreground window when switching desktops
svn path=/trunk/; revision=8439
2004-02-28 13:45:33 +00:00
Martin Fuchs
9399bfa9f2 remember last foreground window when switching desktops
svn path=/trunk/; revision=8438
2004-02-28 13:45:33 +00:00
Eric Kohl
bba7724b2d Complete user profile creation.
Add LoadUserProfileW() stub.

svn path=/trunk/; revision=8436
2004-02-28 11:30:59 +00:00
Martin Fuchs
0b2f62bcf5 another foreground window fix for clicks on notification icons
svn path=/trunk/; revision=8434
2004-02-28 10:57:01 +00:00
Martin Fuchs
ae26b09eb5 implemented 'minimize all' feature
svn path=/trunk/; revision=8433
2004-02-28 10:28:09 +00:00
Richard Campbell
44c383eeef temporary workaround for a font issue in win32k...negative font heights aren't handled properly.
svn path=/trunk/; revision=8431
2004-02-28 03:02:08 +00:00
Thomas Bluemel
9ece8f9451 don't hold more than one WM_MOUSEMOVE message at the same time in the message queue
svn path=/trunk/; revision=8430
2004-02-28 00:44:28 +00:00
Gé van Geldorp
82cff84c9a Use *NameLength before overwriting it
svn path=/trunk/; revision=8429
2004-02-27 23:11:32 +00:00
Steven Edwards
9187c6f654 Removed and moved some internal headers for the WINE CxxFrameHandler
Adapted the WINE implemenetation of __UnDName[Ex]
Enabled all of the stubs needed for MFC.

svn path=/trunk/; revision=8428
2004-02-27 22:39:39 +00:00
Thomas Bluemel
b48c6953d0 minor fix to SetParent()
svn path=/trunk/; revision=8427
2004-02-27 22:21:32 +00:00
Hartmut Birr
8219d9801e - Initialize/delete the lock of a console.
- Count the correct number of input events in CsrGetNumberOfConsoleInputEvents.

svn path=/trunk/; revision=8426
2004-02-27 17:35:42 +00:00
Thomas Bluemel
b1acedcbee don't lock the screen dc if it's NULL
svn path=/trunk/; revision=8425
2004-02-27 10:08:21 +00:00
Thomas Bluemel
dc750f77e5 fixed a few gdi leaks
svn path=/trunk/; revision=8424
2004-02-27 10:01:49 +00:00
Filip Navara
a9ecd3580c - Fixed RtlNtStatusToDosErrorNoTeb.
svn path=/trunk/; revision=8423
2004-02-27 05:50:56 +00:00
Thomas Bluemel
f917dbbe8c fixed missing window dereference
svn path=/trunk/; revision=8422
2004-02-27 01:05:45 +00:00
Thomas Bluemel
49d24c174d fixed missing window dereference
svn path=/trunk/; revision=8421
2004-02-27 00:11:58 +00:00
Thomas Bluemel
02708b9017 minor fixes
svn path=/trunk/; revision=8420
2004-02-26 22:52:05 +00:00
Martin Fuchs
326e514891 rebar control for cabinet windows
svn path=/trunk/; revision=8419
2004-02-26 22:45:50 +00:00
Thomas Bluemel
5469cad926 fixed crashes that could be caused by the thread cleanup routine when destroying windows from different threads
svn path=/trunk/; revision=8418
2004-02-26 22:23:55 +00:00
Martin Fuchs
11562074f2 disable start menu entries for non-existing folders
svn path=/trunk/; revision=8416
2004-02-26 21:52:26 +00:00
Martin Fuchs
9bcc74655c include explorer windows in desktop switching
svn path=/trunk/; revision=8413
2004-02-26 21:20:50 +00:00
Martin Fuchs
907d42478e avoid displaying context menu for application button _and_ desktop bar at the same time
svn path=/trunk/; revision=8411
2004-02-26 20:38:32 +00:00
Martin Fuchs
2e8d0a55b2 docu update
svn path=/trunk/; revision=8410
2004-02-26 20:26:11 +00:00
Martin Fuchs
75f575e7dd fix foreground window handling when clicking on notification area icons
svn path=/trunk/; revision=8408
2004-02-26 20:20:44 +00:00
Martin Fuchs
8fe7e083b3 fix foreground window handling when clicking on notification area icons
svn path=/trunk/; revision=8407
2004-02-26 20:20:44 +00:00
Martin Fuchs
15eee1ef26 resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8406
2004-02-26 19:47:39 +00:00
Martin Fuchs
fbd78a5a3a resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8405
2004-02-26 19:47:39 +00:00
Martin Fuchs
c22f36b23a resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8404
2004-02-26 19:47:39 +00:00
Hartmut Birr
d96346dede - Marked a cache segment as page out in progress to prevent from
recursive calls to MmPageOutPhysicalAddress.
- This fixes bug #220.

svn path=/trunk/; revision=8403
2004-02-26 19:29:55 +00:00
Filip Navara
8098620a78 - Corrected EiAllocatePool prototype.
- Corrected debug message in MmIsUsablePage.

svn path=/trunk/; revision=8402
2004-02-26 18:54:52 +00:00
Filip Navara
86275a897f - Modified import library order to link to snprintf from MSVCRT and not NTDLL. The one in NTDLL doesn't support '%f' parsing and so it caused the "%f KB" texts in Explorer instead of real file size.
svn path=/trunk/; revision=8401
2004-02-26 16:19:17 +00:00
Filip Navara
803e8a4b0f - Removed IsTextUnicode stub and replaced it with forwarding to NTDLL.RtlIsTextUnicode.
svn path=/trunk/; revision=8400
2004-02-26 16:16:18 +00:00
Filip Navara
30830340a8 - Support for RBBS_HIDETITLE style.
svn path=/trunk/; revision=8399
2004-02-26 13:45:44 +00:00
Eric Kohl
3c84f18b66 Remove obsolete files.
svn path=/trunk/; revision=8397
2004-02-26 12:29:15 +00:00
Eric Kohl
b35af5f50f Removed all forwarded exports to MSVCRT because a process must not load MSVCRT and CRTDLL at the same time.
svn path=/trunk/; revision=8396
2004-02-26 12:23:29 +00:00
Steven Edwards
cf035ffc03 Imported Olepro32 from WINE CVS-20040225.......
...I really want to get MFC working.

svn path=/trunk/; revision=8395
2004-02-26 02:01:13 +00:00
Steven Edwards
d36d4e1f21 Updated for Winmm changes.
svn path=/trunk/; revision=8394
2004-02-26 01:42:21 +00:00
Steven Edwards
8e76a54705 Added stub of IsTextUnicode to get notepad working again......
.....The next time someone submits copyrighted code and it makes it in to CVS
the contributor and the person that committed it are going to get a visit from me.

svn path=/trunk/; revision=8393
2004-02-26 00:33:09 +00:00
Steven Edwards
23cc7e88c1 Added stubs for GetFileSecurityA, SetFileSecurityA and
GetUserName based on Winehq sources to get Dependancy
Walker working again.

svn path=/trunk/; revision=8392
2004-02-25 23:54:13 +00:00
Steven Edwards
6645e904c7 Added Winehq2ros.patch for winmm
svn path=/trunk/; revision=8391
2004-02-25 23:50:28 +00:00
Hartmut Birr
8a3a4af533 - Initialize/delete the lock of a screen buffer.
svn path=/trunk/; revision=8390
2004-02-25 23:33:42 +00:00
Steven Edwards
22d250a711 Forgot to commit this.
svn path=/trunk/; revision=8389
2004-02-25 23:13:37 +00:00
Steven Edwards
2ef4c4f1ad Fixed error introduced by removing the stubs.
Created new file hwprofiles.c for GetCurrentHwProfileA

svn path=/trunk/; revision=8388
2004-02-25 23:12:39 +00:00
Martin Fuchs
427c8aeb8f rebar control for desktop bar
svn path=/trunk/; revision=8387
2004-02-25 22:56:49 +00:00
Steven Edwards
1816da4b7a Fix building Lsass
svn path=/trunk/; revision=8386
2004-02-25 22:36:53 +00:00
Steven Edwards
4f12cc2e75 Removed Makefile.ros as it is autogenerated.
svn path=/trunk/; revision=8385
2004-02-25 22:34:57 +00:00
Art Yerkes
6811934f2a For now, I changed the _WIN32_WINNT level in iphlpapi_private.h. This will
probably need to be changed.

svn path=/trunk/; revision=8384
2004-02-25 21:41:31 +00:00
Art Yerkes
4903d69f54 Added iphlpapi_private, which used to be ipprivate. Renamed to better go with
wine scheme.

svn path=/trunk/; revision=8383
2004-02-25 20:35:31 +00:00
Art Yerkes
3fa6583180 No more ick tabs.
svn path=/trunk/; revision=8382
2004-02-25 20:29:15 +00:00
Casper Hornstrup
47306399fd 2004-02-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/datalink/loopback.c: Reformat.
	* drivers/net/tcpip/network/neighbor.c: Ditto.
	* drivers/net/tcpip/tcpip/info.c: Ditto.
	* drivers/net/tcpip/transport/datagram/datagram.c: Cleanup.
	If there is an out-of-resources situation, don't transmit the
	datagram out of order.

svn path=/trunk/; revision=8381
2004-02-25 20:27:56 +00:00
Martin Fuchs
de2e13a185 fix taksbar icons after closing previous applications
svn path=/trunk/; revision=8379
2004-02-25 20:21:29 +00:00
Steven Edwards
07405fb464 Added a stub odbc32.dll as MFC depends on it.
svn path=/trunk/; revision=8378
2004-02-25 20:09:39 +00:00
Art Yerkes
5eea69af20 Removed stubs in icmp, iphlpv6. These are documented as being linked from
iphlpapi.lib, but I made the incorrect assumption that this meant that
they came from iphlpapi.dll

svn path=/trunk/; revision=8377
2004-02-25 20:06:40 +00:00
Steven Edwards
99866ef3a0 Sync Winmm with Wine-20040215 and silence some non-error messages.
svn path=/trunk/; revision=8376
2004-02-25 20:00:42 +00:00
Eric Kohl
9744443ac8 Remove ALL stubs which might be of questionable origin.
svn path=/trunk/; revision=8375
2004-02-25 19:34:33 +00:00
Martin Fuchs
8932a19cd6 set background brush for the short moment of displaying the background color while moving foreground windows
svn path=/trunk/; revision=8373
2004-02-25 19:29:12 +00:00
Martin Fuchs
fcf0872f58 fixed bug #224
svn path=/trunk/; revision=8371
2004-02-25 18:58:26 +00:00
Hartmut Birr
2d27f8a140 - Made again usable the cursor and F1-12 keys.
svn path=/trunk/; revision=8370
2004-02-25 18:12:52 +00:00
Eric Kohl
8b99b4ec5e Remove ALL stubs which might be of questionable origin.
svn path=/trunk/; revision=8369
2004-02-25 14:25:11 +00:00
Gé van Geldorp
5ed2e7cef1 Silence debug messages
svn path=/trunk/; revision=8368
2004-02-25 09:55:30 +00:00
Art Yerkes
5c85402724 Iphlpapi is now fully merged. Further changes should be synced with wine.
svn path=/trunk/; revision=8367
2004-02-25 07:41:50 +00:00
James Tabor
5e2693380d Partial implementation of VideoPortGetVgaStatus, needs testing
svn path=/trunk/; revision=8366
2004-02-25 05:38:33 +00:00
James Tabor
11f62ff83b Started implementation of VideoPortGetVgaStatus
svn path=/trunk/; revision=8365
2004-02-25 03:05:27 +00:00
James Tabor
f687066559 Started implementation of VideoPortGetVgaStatus
svn path=/trunk/; revision=8364
2004-02-25 02:59:55 +00:00
Steven Edwards
2b83ae3b64 Change a UNIMPLEMENTED to a DPRINT so we dont hang
After doing Help -> About -> About OS in Explorer.

svn path=/trunk/; revision=8363
2004-02-25 01:25:51 +00:00
David Welch
5fd0390001 - Make the install target depend on the files to be installed.
svn path=/trunk/; revision=8362
2004-02-24 23:51:38 +00:00
David Welch
7eeed46004 - Avoid a crashing when trying to process an exception early in the boot process.
svn path=/trunk/; revision=8361
2004-02-24 23:51:04 +00:00
David Welch
446f263ed3 - Try to avoid crashing when dumping out a corrupted stack.
svn path=/trunk/; revision=8360
2004-02-24 23:50:26 +00:00
Steven Edwards
f8a6374074 Get most of PICE to build again.
svn path=/trunk/; revision=8359
2004-02-24 23:30:20 +00:00
Martin Fuchs
e105a06719 docu update
svn path=/trunk/; revision=8358
2004-02-24 22:20:18 +00:00
Martin Fuchs
4438a2a27c fixed more GDI handle leaks
svn path=/trunk/; revision=8357
2004-02-24 22:15:43 +00:00
Thomas Bluemel
7db5e43a17 added /KDNOECHO parameter to disable serial echo by default in kdgb
svn path=/trunk/; revision=8355
2004-02-24 21:25:41 +00:00
Martin Fuchs
f276f1c016 - launch task manager
- set foregroundwindow when opening start menu (CTRL-ESC shortcut)

svn path=/trunk/; revision=8354
2004-02-24 20:00:16 +00:00
Thomas Bluemel
aec334c343 fixed WindowFromPoint() to send WM_NCHITTEST messages to windows that belong to the current process.
svn path=/trunk/; revision=8352
2004-02-24 15:56:53 +00:00
Vizzini
e7282af976 patch by Michael Fritscher to get Mspaint closer to working
svn path=/trunk/; revision=8351
2004-02-24 15:42:06 +00:00
Thomas Bluemel
5299e2afd5 cleanup
svn path=/trunk/; revision=8350
2004-02-24 13:27:03 +00:00
Gé van Geldorp
e3ead6ead5 Add more icon images
svn path=/trunk/; revision=8349
2004-02-24 09:16:32 +00:00
Aleksey Bragin
3613632618 InstallHinfSection has had a good progress at last - now it supports (at least _should_ - I didn't have time to test it thoroughly) file operations via file queues. There maybe a mess with paths, and I'm committing this now to have this code lying in CVS rather than on my HDD, since it isn't fully finished yet. But it's really close to the final stage.
svn path=/trunk/; revision=8348
2004-02-24 08:17:37 +00:00
Aleksey Bragin
dcbe451792 I modified this StretchBlt sample to provide non-uniform scaling of image, plus two ways to scale it - via stretchblt() and via stretchdibits() -- to test both functions in ReactOS.
If anyone is strictly against me modifiying this sample from the book -- tell me, and I will create stretchblt2 then. But I think this is unncessary.

svn path=/trunk/; revision=8347
2004-02-24 08:05:13 +00:00
Thomas Bluemel
b13d239f87 1. get rid of winlock.c
2. changed the Parent and Object field of the WINDOW_OBJECT structure to HANDLE for easier maintainance and serialize any access to them

svn path=/trunk/; revision=8346
2004-02-24 01:30:58 +00:00
Gé van Geldorp
d8b7c0ee97 Fix mono -> color bitblts
svn path=/trunk/; revision=8345
2004-02-23 22:44:52 +00:00
Martin Fuchs
60f5689a70 keyboard navigation in start menu using first character of display names
svn path=/trunk/; revision=8344
2004-02-23 22:17:01 +00:00
Filip Navara
47d8d8ba89 - As CURSORICON_FindBestIcon now takes color *bits* count and not color count, fixed the color calculation in LookupIconIdFromDirectoryEx.
svn path=/trunk/; revision=8342
2004-02-23 22:04:38 +00:00
Casper Hornstrup
46d0e1a57c 2004-02-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/regtests.c (KMSTUB): Correct device name.

svn path=/trunk/; revision=8341
2004-02-23 21:46:54 +00:00
Gé van Geldorp
1092faa446 Recursively search sub menus when a command id is specified
svn path=/trunk/; revision=8340
2004-02-23 21:18:45 +00:00
Filip Navara
b320e099ed - Compilation fixes.
svn path=/trunk/; revision=8339
2004-02-23 20:56:50 +00:00
Martin Fuchs
8c1f187f6e fixed icon handle leak in notification area
svn path=/trunk/; revision=8337
2004-02-23 20:36:21 +00:00
Gé van Geldorp
717ccf2aa4 Fix key left at begin and key right at end of menu
svn path=/trunk/; revision=8336
2004-02-23 20:10:01 +00:00
Gé van Geldorp
405c0e0d5a Fix race condition
svn path=/trunk/; revision=8335
2004-02-23 20:08:35 +00:00
Filip Navara
7a4c78bd4d - Fixed icon lookup so that in high color video modes colorfull icons are used.
svn path=/trunk/; revision=8334
2004-02-23 18:16:37 +00:00
Gé van Geldorp
f493ab9cc7 Release the correct lock
svn path=/trunk/; revision=8333
2004-02-23 12:39:37 +00:00
Eric Kohl
95033dafab Update to new fmifs types.
Implement partition format progress bar.

svn path=/trunk/; revision=8332
2004-02-23 11:58:27 +00:00
Eric Kohl
951f5f360f Update to new fmifs types.
svn path=/trunk/; revision=8331
2004-02-23 11:57:00 +00:00
Eric Kohl
574b42db31 * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native
  Add PROGRESS and DONE callbacks.

svn path=/trunk/; revision=8330
2004-02-23 11:56:10 +00:00
Eric Kohl
2b197a92e6 * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native
  InitializeFmIfs() is the DLL entry point

svn path=/trunk/; revision=8329
2004-02-23 11:55:12 +00:00
Eric Kohl
2beb8b39ac * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native

svn path=/trunk/; revision=8328
2004-02-23 11:53:00 +00:00
Jason Filby
8265b68f51 Add Everaldo to credits
svn path=/trunk/; revision=8326
2004-02-23 04:29:39 +00:00
Gé van Geldorp
0970df8771 Implement system menus
svn path=/trunk/; revision=8325
2004-02-22 23:40:58 +00:00
Filip Navara
50103fff09 - Added missing members of GDIINFO structure.
svn path=/trunk/; revision=8324
2004-02-22 22:19:49 +00:00
Filip Navara
576e14972b - Advancing pointer inside loop makes more sense than checking the same structure ModeCount times.
svn path=/trunk/; revision=8323
2004-02-22 22:19:48 +00:00
Filip Navara
cc1c862dae - Added more debugging messages for video port driver Int 10 services.
svn path=/trunk/; revision=8322
2004-02-22 22:19:42 +00:00
Filip Navara
63aeee7369 Corrected packing!
svn path=/trunk/; revision=8321
2004-02-22 20:21:05 +00:00
David Welch
77c1718844 - Make the targets for regression test files the files themselves to avoid
unnecessary recompilation.

svn path=/trunk/; revision=8319
2004-02-22 18:53:39 +00:00
David Welch
0679c1f91e - Inherit any PREFIX setting for cross-compilation from the environment.
svn path=/trunk/; revision=8318
2004-02-22 18:46:45 +00:00
Gé van Geldorp
dc9250b384 Implement keyboard navigation for menus
svn path=/trunk/; revision=8317
2004-02-22 18:04:52 +00:00
Casper Hornstrup
af770309fc 2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile (all): Put REGTESTS dependency earlier in the list.
	* lib/kernel32/makefile: Support regression tests.
	* lib/kernel32/misc/dllmain.c: Prepare regression tests.
	* regtests/win32base/driver.c: (DummyThreadMain,
	RunPrivateTests): Add.
	(RegTestMain): Run private module regression tests.
	* tools/helper.mk: Add rtshared.a to MK_LIBS if building
	user-mode regression tests.
	* tools/regtests.c (UMSTUB): Add.
	(main): Output user-mode stub.
	* lib/kernel32/tests: New directory.
	* lib/kernel32/tests/.cvsignore: New file.
	* lib/kernel32/tests/Makefile: New file.
	* lib/kernel32/tests/tests: New directory.
	* lib/kernel32/tests/tests/.cvsignore: New file.
	* regtests/win32base/tests/file-1.c: move...
	* lib/kernel32/tests/tests/file-1.c: ...here.

svn path=/trunk/; revision=8316
2004-02-22 17:30:33 +00:00
Filip Navara
e8cc37fcec - Added some strange behaviour to VIS_ComputeVisibleRegion.
- Draw windows from foreground to background in IntFindWindowToRepaint, because it causes problems otherwise.

svn path=/trunk/; revision=8315
2004-02-22 16:56:14 +00:00
Filip Navara
b716aa0265 - Prevent double unlinking of window.
svn path=/trunk/; revision=8313
2004-02-22 15:14:27 +00:00
Filip Navara
1dc0c10491 - Fixed couple of mutex locking issues.
- Removed IntInitDesktopWindow function, because it's no longer used.

svn path=/trunk/; revision=8312
2004-02-22 14:26:35 +00:00
Eric Kohl
a1eebee733 Minor cleanup.
Implement RegRestoreKeyW().

svn path=/trunk/; revision=8311
2004-02-22 14:26:07 +00:00
Thomas Bluemel
2d6b7b1255 minor fix
svn path=/trunk/; revision=8310
2004-02-22 14:09:51 +00:00
Martin Fuchs
765c5f4797 display 'not yet implemented' messages for printers, network and RAS; disable address&command bar
svn path=/trunk/; revision=8306
2004-02-22 12:26:06 +00:00
Filip Navara
9dacfa1b68 - Modifed DceUpdateVisRgn to correctly handle situations when DceGetVisRgn returns NULL.
- Fixed the alternative version of VIS_ComputeVisibleRegion and made it the one and only, because it's smaller and faster than the original one.

svn path=/trunk/; revision=8305
2004-02-22 12:25:35 +00:00
Filip Navara
936dffea06 - Don't call IntSendMessage in MsqTranslateMouseMessage with uninitialized variable as window handle.
svn path=/trunk/; revision=8304
2004-02-22 12:25:02 +00:00
Martin Fuchs
2ae57f1248 disable stubs for SHFindFiles() and SHFindComputer()
svn path=/trunk/; revision=8303
2004-02-22 12:18:58 +00:00
Thomas Bluemel
80c553b4b5 minor cleanup
svn path=/trunk/; revision=8301
2004-02-22 12:06:43 +00:00
Martin Fuchs
b45d1b24ec - handle case, when having problems to open image file
- disable FAT-button since it's not yet ready

svn path=/trunk/; revision=8299
2004-02-22 10:20:30 +00:00
Casper Hornstrup
cc3221be2c 2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
* config (REGRESSIONTESTS): Add.
	* rules.mak (REGTESTS_PATH_INC): Add.
	* drivers/net/tcpip/makefile: Support regression tests.
	* drivers/net/tcpip/tcpip/main.c: Prepare regression tests.
	* hal/halx86/Makefile: Rename TARGET_LIBPATH to TARGET_IMPLIBPATH.
	* regtests/kmregtests/driver.c (KMRegTestsRegister): Add.
	(KMRegTestsRun): Move call to InitializeTests() and RegisterTests() to
	DriverEntry().
	(KMRegTestsDispatch): Support IOCTL_KMREGTESTS_REGISTER.
	* regtests/kmregtests/kmregtests.h (IOCTL_KMREGTESTS_REGISTER): Define.
	* tools/config.mk: Define REGTESTS if REGRESSIONTESTS = 1.
	* tools/helper.mk: Support module private regression tests.
	(TARGET_LIBPATH): Rename to TARGET_IMPLIBPATH.
	(TARGET_LIBPATH, TARGET_REGTESTS): Add.
	* tools/mkconfig.c: Support REGTESTS.
	* tools/regtests.c (umstubfile, kmstubfile): Add.
	(is_file_changed, write_file_if_changed): Add.
	(KMSTUB): Add.
	(HELP): Mention -u and -k switches.
	(main): Parse -u and -k switches.
	* drivers/net/tcpip/tests: New directory.
	* drivers/net/tcpip/tests/.cvsignore: New file.
	* drivers/net/tcpip/tests/Makefile: Makefile.
	* drivers/net/tcpip/tests/tests: New directory.
	* drivers/net/tcpip/tests/tests/.cvsignore: New file.

svn path=/trunk/; revision=8298
2004-02-22 09:59:17 +00:00
Filip Navara
a7b989769f - Unified indenting style in NtGdiExtTextOut and implemented support for right and centered text alignment.
- Don't render glyphs in TextIntGetTextExtentPoint.

svn path=/trunk/; revision=8297
2004-02-22 08:35:21 +00:00
Filip Navara
e6ad1bc2c0 - Fixed deadlock in IntFindWindowToRepaint.
svn path=/trunk/; revision=8296
2004-02-21 23:30:18 +00:00
Filip Navara
f38fdd47c3 - Fixed releasing of window object in IntValidateParent and NtUserRedrawWindow. Spotted by Thomas Weidenmuller.
- Fixed potencial deadlock in IntPaintWindows. Spotted by Thomas Weidenmuller.

svn path=/trunk/; revision=8295
2004-02-21 22:22:26 +00:00
Filip Navara
d83db81881 - Minor correction of NtGdiExtTextOut.
svn path=/trunk/; revision=8294
2004-02-21 21:15:22 +00:00
Filip Navara
232ffaff28 - Moved code from NtGdiTextOut to NtGdiExtTextOut and added basic support for ETO_OPAQUE flag.
svn path=/trunk/; revision=8293
2004-02-21 20:26:54 +00:00
Jason Filby
63eaa13a61 Null terminator fixes
svn path=/trunk/; revision=8292
2004-02-21 16:36:02 +00:00
Emanuele Aliberti
3cb945ba08 KERNEL_VERSION_BUILD_RC added in buildno.h.
svn path=/trunk/; revision=8291
2004-02-21 15:34:51 +00:00
Filip Navara
5aaaf34334 - Fixed my use of IntIsWindowVisible, it takes HWND as parameter and not PWINDOW_OBJECT.
svn path=/trunk/; revision=8290
2004-02-21 14:00:30 +00:00
Filip Navara
445eb5362d - Minor correction (again)
svn path=/trunk/; revision=8289
2004-02-21 13:57:31 +00:00
Filip Navara
c2458a1a4c CVS maintenance
svn path=/trunk/; revision=8288
2004-02-21 13:56:36 +00:00
Filip Navara
391292e419 - Minor correction
svn path=/trunk/; revision=8287
2004-02-21 13:51:13 +00:00
Gé van Geldorp
717c7d0333 Fix double release of fast mutex
svn path=/trunk/; revision=8286
2004-02-21 13:37:26 +00:00
Filip Navara
409eab1805 - Fixed some nonsense code in NtGdiGetDCEx.
- Fixed few race conditions in painting code.
- Removed function IntGetNCUpdateRegion and inlined it's code into IntInvalidateWindows.
- Removed function IsHidden and replaced it's usage by IntIsWindowVisible.

svn path=/trunk/; revision=8285
2004-02-21 13:13:27 +00:00
Hartmut Birr
5b5028fcb9 - Fixed a wrong index, which resulted in writing over the end of an allocated buffer.
svn path=/trunk/; revision=8284
2004-02-21 12:58:49 +00:00
Gé van Geldorp
1f1b824d08 Import w32api version 2.5 include files
svn path=/trunk/; revision=8283
2004-02-21 09:20:39 +00:00
Filip Navara
30e8e2d0b0 - Minor correction to NtConnectPort to avoid freeing NULL pointer. Based on patch by Waldo Alvarez Ca�izares.
svn path=/trunk/; revision=8282
2004-02-21 09:06:27 +00:00
Filip Navara
6659cc3181 - Fix by Waldo Alvarez Ca�izares for 8 <-> 8 bpp and 32 <-> 32 bpp StretchBlt
svn path=/trunk/; revision=8281
2004-02-21 09:06:25 +00:00
Mike Nordell
b3e3acc784 Fix environment variable handling. The (optional) envp argument to main() shall not contain strings of the form "=C:=C:\directory\".
svn path=/trunk/; revision=8280
2004-02-21 08:02:49 +00:00
Gé van Geldorp
184c8d2fba Bump version number on HEAD
svn path=/trunk/; revision=8279
2004-02-20 23:24:30 +00:00
Filip Navara
fd26a9a27b - Fixed line endings
svn path=/trunk/; revision=8278
2004-02-20 15:05:36 +00:00
Gé van Geldorp
4009a9e979 Kill another --include-dir
svn path=/trunk/; revision=8277
2004-02-20 08:33:37 +00:00
Royce Mitchell III
a7e30599ea If nWidth or nHeight is zero, CreateBitmap returns the handle to a 1- by 1-pixel, monochrome bitmap.
svn path=/trunk/; revision=8276
2004-02-20 07:45:58 +00:00
Gé van Geldorp
1355d672b4 Move --include-dir from helper.mk to rules.mak
svn path=/trunk/; revision=8275
2004-02-19 22:24:59 +00:00
Gé van Geldorp
59e447fc8f Also zero out first sector of root dir when formatting FAT12 and FAT16
volumes

svn path=/trunk/; revision=8274
2004-02-19 21:24:54 +00:00
Gé van Geldorp
6bd07e5854 Sync to Wine-20040213
* Jon Griffiths <jon_p_griffiths@yahoo.com>
  Add some missing prototypes, fix AssocIsDangerous.
  Implement StrRetToBSTR, delay-import oleaut32.
* Alexandre Julliard
  Only link against libdxguid where necessary.
* Juan Lang <juan_lang@yahoo.com>
  Stub for MLIsMLHInstance.
* Francois Gouget <fgouget@free.fr>
  Add missing '\n's to debug traces.

svn path=/trunk/; revision=8272
2004-02-19 21:19:27 +00:00
Thomas Bluemel
90fb2c7def added pool tags for better debugging
svn path=/trunk/; revision=8271
2004-02-19 21:12:11 +00:00
Martin Fuchs
8c80ebb0d1 remove duplicate windres include directory to get notepad build
svn path=/trunk/; revision=8269
2004-02-19 20:24:22 +00:00
Gé van Geldorp
c0b75c3e30 samlib is needed for 2nd stage setup
svn path=/trunk/; revision=8268
2004-02-19 19:45:52 +00:00
Thomas Bluemel
4e2ccf1842 added pool tags for better debugging
svn path=/trunk/; revision=8266
2004-02-19 19:44:39 +00:00
Filip Navara
e4340278d7 - Fixed line endings
- Updated regsvr32 to latest version by ShadowFlare.

svn path=/trunk/; revision=8265
2004-02-19 19:26:52 +00:00
Filip Navara
bb25722258 - Revert the last change, because it really doesn't help.
- Don't detect mouse on COM2 by default.

svn path=/trunk/; revision=8264
2004-02-19 17:54:05 +00:00
Gé van Geldorp
ecfd9db944 Patch by H�seyin Uslu <20194562@mail.baskent.edu.tr>
Check color passed on command line, make sure foreground and background
are not the same.

svn path=/trunk/; revision=8263
2004-02-19 17:04:11 +00:00
Thomas Bluemel
3ea2262879 fixed WinPosWindowFromPoint(), now it should work properly.
svn path=/trunk/; revision=8262
2004-02-19 15:27:55 +00:00
Aleksey Bragin
98efb8ab35 Fix by Waldo Alvarez Cacizares, fixes 16<->16 bpp stretchblitting (AbiWord splashscreen will look good)
svn path=/trunk/; revision=8260
2004-02-19 09:31:30 +00:00
Art Yerkes
82bad008ac Commits for bug 193, merged from release branch.
svn path=/trunk/; revision=8259
2004-02-19 06:59:50 +00:00
Art Yerkes
a884236737 Added VK_DECIMAL in numberpad chars.
svn path=/trunk/; revision=8257
2004-02-19 03:51:29 +00:00
Art Yerkes
aa83ce6cde Fixed bug 167.
svn path=/trunk/; revision=8254
2004-02-19 03:45:44 +00:00
Art Yerkes
839f724098 Import from the release branch.
svn path=/trunk/; revision=8252
2004-02-19 03:33:33 +00:00
Gé van Geldorp
e5d1ab1c06 CVS maintenance
svn path=/trunk/; revision=8250
2004-02-18 23:29:12 +00:00
Gé van Geldorp
0e77dd5903 Patch by Mark Tempel and Ge van Geldorp
Check RtlAllocateHeap() return value for 8-byte alignment.

svn path=/trunk/; revision=8249
2004-02-18 23:20:14 +00:00
Casper Hornstrup
0a2bff78f8 2004-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apistatus.lst: Correct path of videoprt.dll.

svn path=/trunk/; revision=8248
2004-02-18 21:29:20 +00:00
Filip Navara
d3753b2d2f - Attempt to avoid interaction with kernel debugging over serial port.
svn path=/trunk/; revision=8246
2004-02-18 16:00:56 +00:00
Thomas Bluemel
d0a5ab9948 Patch by Sylvain Petreolle:
'No newline at EOF' warning fix.

svn path=/trunk/; revision=8245
2004-02-18 13:46:15 +00:00
Richard Campbell
9cff9f7701 roll back thomas's change, apparently it IS causing the problems, my build system is just being stupid.
svn path=/trunk/; revision=8244
2004-02-18 12:21:57 +00:00
Royce Mitchell III
14f2cc4e3b fix bug in NtGdiExtEscape - not checking for NULL == DriverFunctions.Escape.
also added buffer copying.

svn path=/trunk/; revision=8243
2004-02-18 02:37:18 +00:00
Martin Fuchs
d406d24f29 correct comments
svn path=/trunk/; revision=8242
2004-02-18 00:01:59 +00:00
Mike Nordell
faf755d78e Remove not needed specific-compiler compile-time warning.
svn path=/trunk/; revision=8239
2004-02-17 23:58:54 +00:00
Gé van Geldorp
b7ee835601 Sync with Wine-20040213
svn path=/trunk/; revision=8238
2004-02-17 23:09:05 +00:00
Gé van Geldorp
503a4764b1 Sync with Wine-20040213:
Troy Rollo <wine@troy.rollo.name>
Added documentation for DocFiles, based on the CorVu implementation of
DocFiles.

svn path=/trunk/; revision=8237
2004-02-17 23:01:19 +00:00
Gé van Geldorp
9b03fed40e Sync with Wine-20040213:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- CoSetState info should be thread local.
- SetErrorInfo should allocate an apartment when no apartment present.
Alexandre Julliard
Moved a few remaining 16-bit definitions out of the standard headers.

svn path=/trunk/; revision=8236
2004-02-17 23:00:01 +00:00
Gé van Geldorp
a8d545f53b Sync with Wine-20040213:
Huw Davies <huw@codeweavers.com>
Fix a TRACE.

svn path=/trunk/; revision=8235
2004-02-17 22:40:47 +00:00
Gé van Geldorp
f3b3a68770 Sync with Wine-20040213:
Huw Davies <huw@codeweavers.com>
Only redraw button in PressButton and Indeterminate if its state has
changed.
Huw Davies <huw@codeweavers.com>
Honour TB_SETMAXTEXTROWS.
Ulrich Czekalla <ulrich@codeweavers.com>
Add support for BTNS_WHOLEDROPDOWN.
Populate button rect when sending TBN_DROPDOWN.
Dmitry Timoshkov <dmitry@codeweavers.com>
Add partial support for some undocumented toolbar messages.
Huw Davies <huw@codeweavers.com>
TB_ADDBUTTONS can pass a string ptr instead of an index.
TB_GETBUTTONINFO only returns a string if it's not in the internal
string list.
Huw Davies <huw@codeweavers.com>
Use the BTNS_* toolbar button style defines rather than the outdated
TBSTYLE_*.
Huw Davies <huw@codeweavers.com>
Add a missing return.
Jon Griffiths <jon_p_griffiths@yahoo.com>
Draw disabled toolbar buttons correctly.

svn path=/trunk/; revision=8234
2004-02-17 22:39:49 +00:00
Gé van Geldorp
df3569b50b Sync with Wine-20040213:
Vitaliy Margolen <wine-patch@kievinfo.com>
- Fix handling of TCS_RAGGEDRIGHT style.
- Clip UpDown control only if it is present.
- Add ToDos.

svn path=/trunk/; revision=8233
2004-02-17 22:38:03 +00:00
Gé van Geldorp
d8aa2b9e91 Sync with Wine-20040213:
Francois Gouget <fgouget@free.fr>
Assorted spelling and case fixes.
Alexandre Julliard:
Moved a few remaining 16-bit definitions out of the standard headers.

svn path=/trunk/; revision=8232
2004-02-17 22:35:27 +00:00
Gé van Geldorp
fe941591fe Sync with Wine-20040213:
Aric Stewart <aric@codeweavers.com>
Work toward properly updating the SelectionMark when the selected
state changed inside a listbox.

svn path=/trunk/; revision=8231
2004-02-17 22:33:55 +00:00
Gé van Geldorp
1a0c848456 Sync with Wine-20040213:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
Fix nGrow initialization in DPA_CreateEx.

svn path=/trunk/; revision=8230
2004-02-17 22:32:53 +00:00
Martin Fuchs
6cecd7c5a3 inserted _NO_MDI questions
svn path=/trunk/; revision=8229
2004-02-17 21:50:44 +00:00
Martin Fuchs
0d03cadfe1 corrected comment
svn path=/trunk/; revision=8228
2004-02-17 21:50:07 +00:00
Gé van Geldorp
d842500eb1 Always return 8-byte aligned blocks
svn path=/trunk/; revision=8226
2004-02-17 21:11:17 +00:00
Martin Fuchs
a57cc3b82a disable autostart if the SHIFT key is pressed
svn path=/trunk/; revision=8223
2004-02-17 20:20:01 +00:00
Filip Navara
7595e479e5 - Work on serial mouse detection to fix bug #198.
svn path=/trunk/; revision=8221
2004-02-17 18:01:59 +00:00
Thomas Bluemel
f3a0075137 fixed WindowFromPoint() to search backwards
svn path=/trunk/; revision=8220
2004-02-17 17:43:09 +00:00
Thomas Bluemel
d3a4b4244c Added test app for AlphaBlend()
svn path=/trunk/; revision=8219
2004-02-17 14:55:59 +00:00
Mike Nordell
b84451d1c3 Changed timeout from 2000 to 2001 ms, to be able to find it easier in kmode.
svn path=/trunk/; revision=8218
2004-02-17 10:52:03 +00:00
Martin Fuchs
ec74cd68bc cleanup in project file
svn path=/trunk/; revision=8215
2004-02-16 22:54:53 +00:00
Martin Fuchs
3b0926761a added .cvsignore
svn path=/trunk/; revision=8212
2004-02-16 22:01:02 +00:00
Martin Fuchs
596a4b878e merged Wine commits to shell32
svn path=/trunk/; revision=8211
2004-02-16 21:46:12 +00:00
Richard Campbell
583ae62ff8 NtUserSystemParametersInfo:
- removed a case statement, it is now handled in USER32

svn path=/trunk/; revision=8210
2004-02-16 11:16:06 +00:00
Richard Campbell
2af64c0186 NtUserSystemParametersInfo:
- Removed static font variables.

svn path=/trunk/; revision=8207
2004-02-16 07:26:25 +00:00
Richard Campbell
fcb45adac8 SystemParametersInfo:
- SPI_GETNONCLIENTMETRICS and SPI_GETICONTITLELOGFONT
   now load their settings from the registry.
 - SPI_SET* aren't yet implemented, because i'd like to test my
   implementation before i commit them.

svn path=/trunk/; revision=8206
2004-02-16 07:25:01 +00:00
Richard Campbell
02f6c6d6ee advapi dependency.
svn path=/trunk/; revision=8204
2004-02-16 01:30:38 +00:00
Gé van Geldorp
e410002732 Don't build kernel32 test because of build failure
svn path=/trunk/; revision=8203
2004-02-15 21:57:34 +00:00
Gé van Geldorp
fec177ccee Rollback hinter enabling since font output looks worse with the auto
hinter enabled

svn path=/trunk/; revision=8202
2004-02-15 21:45:37 +00:00
Gé van Geldorp
a9f2364436 Top level windows have menus, child windows have IDs
svn path=/trunk/; revision=8201
2004-02-15 20:50:56 +00:00
Hartmut Birr
f273240d3f - Used a different buffer to get the mode informations.
svn path=/trunk/; revision=8200
2004-02-15 19:27:36 +00:00
Hartmut Birr
48632d6399 - Locked the pages in MmCommitPagedPoolAddress, if it is necessary.
svn path=/trunk/; revision=8199
2004-02-15 19:03:29 +00:00
Royce Mitchell III
f12e3bf622 removed unnecessary explicit define of _M_IX86
svn path=/trunk/; revision=8198
2004-02-15 18:37:35 +00:00
Hartmut Birr
d3e729a8c7 - Canceled my last changes.
svn path=/trunk/; revision=8197
2004-02-15 17:04:52 +00:00
Art Yerkes
353cf5eb06 Added registry functions header.
svn path=/trunk/; revision=8196
2004-02-15 07:52:18 +00:00
Gé van Geldorp
6fc29ccca7 Implement menu handling
svn path=/trunk/; revision=8195
2004-02-15 07:39:12 +00:00
Art Yerkes
a3ac53db3d Big merge in wine code. This merged version is far more complete than
the previous one.   See notes and comments by me and the original author
of iphlpapi_main.c, Juan Lang.

svn path=/trunk/; revision=8194
2004-02-15 07:17:00 +00:00
Art Yerkes
d3a56d75eb Removed dbgprints.
svn path=/trunk/; revision=8192
2004-02-15 07:07:11 +00:00
Art Yerkes
757ff359b5 Fixed a bug in AppendUnicodeStringToString which could cause a null to
be placed one position after the end of a completely full string.

svn path=/trunk/; revision=8191
2004-02-15 07:04:45 +00:00
Art Yerkes
b900afead3 GetComputerName(Ex)?[AW] implemented. These are needed for the wine
iphlpapi_main.

svn path=/trunk/; revision=8190
2004-02-15 07:03:56 +00:00
Art Yerkes
89d845f338 Some unstub which should allow programs that use getprotobyname to work.
This eventually needs to tie in properly to the layered service stuff.

svn path=/trunk/; revision=8189
2004-02-15 07:03:02 +00:00
Art Yerkes
eee30419e8 Added makefile with unix eols.
svn path=/trunk/; revision=8188
2004-02-15 06:21:16 +00:00
Art Yerkes
9959de026c One more try with unix eols.
svn path=/trunk/; revision=8187
2004-02-15 06:20:54 +00:00
Art Yerkes
b972d29c37 Added with dos eols.
svn path=/trunk/; revision=8186
2004-02-15 06:05:05 +00:00
Art Yerkes
a1bb46750c Removed makefile temporarily.
svn path=/trunk/; revision=8185
2004-02-15 06:04:35 +00:00
Art Yerkes
e592ecdfeb Added new regsvr32 app.
svn path=/trunk/; revision=8184
2004-02-15 05:52:47 +00:00
Art Yerkes
b1fc9ebb02 Author: ShadowFlare
Arty's note:
Added ShadowFlare's regsvr32.  The one in rosapps doesn't seem to build,
so I think it should be eventually removed.
I'm putting this one here instead of rosapps because it goes with some
of the other apps in this directory (like rundll32)

svn path=/trunk/; revision=8183
2004-02-15 05:51:20 +00:00
Art Yerkes
904bf32b2a Author: ShadowFlare
I(ShadowFlare) improved command line parsing (completely rewrote it), made
some changes for the ansi version, and added some comments into the code
(there was very few previously).

svn path=/trunk/; revision=8182
2004-02-15 05:33:19 +00:00
Art Yerkes
7e4b6ff68a Added file. Contains common serviceinfo structs.
svn path=/trunk/; revision=8181
2004-02-15 02:40:25 +00:00
Art Yerkes
d194919316 Added definition.
svn path=/trunk/; revision=8180
2004-02-15 01:08:54 +00:00
Art Yerkes
2124442b3d Added new files for common functions.
svn path=/trunk/; revision=8179
2004-02-15 00:04:08 +00:00
Steven Edwards
3bf9107ff9 Added Makefile
svn path=/trunk/; revision=8178
2004-02-14 23:22:29 +00:00
Steven Edwards
b829420396 Add some debugging.
svn path=/trunk/; revision=8177
2004-02-14 23:21:44 +00:00
Steven Edwards
459d72e610 Implemented LsaFreeMemory and
changed a few stubs to match WINE so Msys will load.

svn path=/trunk/; revision=8176
2004-02-14 23:13:58 +00:00
Filip Navara
a3f6dab278 - Don't allocate 0 bytes in EngCreateBitmap. Patch by Waldo Alvarez Ca�izares.
- Fix distortion by StretchBlt. Patch based on investigations by Waldo Alvarez Ca�izares.

svn path=/trunk/; revision=8175
2004-02-14 22:24:54 +00:00
Art Yerkes
74974a631d Mistaken offset for dest.
svn path=/trunk/; revision=8174
2004-02-14 21:38:40 +00:00
Art Yerkes
8c9fd64030 Edited includes for new tcp ioctl needed by iphlpapi.
tcpioctl.h: new
I resolved a conflict between iptypes, structs and nspapi regarding some
core structures.
afd.h: removed definitions needed by both user land and kernel land.
tdiinfo.h: added needed definitions.

svn path=/trunk/; revision=8173
2004-02-14 21:27:35 +00:00
Steven Edwards
6817aa33e1 Added User32 and Kernel32 tests to the makefile
svn path=/trunk/; revision=8172
2004-02-14 20:16:24 +00:00
Steven Edwards
d93b2368db Sync WINE user32 Regression tests.
svn path=/trunk/; revision=8171
2004-02-14 20:13:04 +00:00
Steven Edwards
eef7a39689 Added WINE kernel32 regression tests.
svn path=/trunk/; revision=8170
2004-02-14 20:11:42 +00:00
Vizzini
b54b1d664d updated defs for floppy support
svn path=/trunk/; revision=8169
2004-02-14 20:11:12 +00:00
Hartmut Birr
1c4efc692a - Lock the pages always in MmProbeAndLockPages.
svn path=/trunk/; revision=8168
2004-02-14 19:48:07 +00:00
Filip Navara
f2bfe59541 sizeof(SENSE_BUFFER_SIZE) -> SENSE_BUFFER_SIZE
svn path=/trunk/; revision=8166
2004-02-14 12:29:33 +00:00
Richard Campbell
a6e68c5913 Part I of my font patch.
svn path=/trunk/; revision=8165
2004-02-14 02:41:53 +00:00
Steven Edwards
fbd7136c2e Adapted GdiTransparentBlt by Kevin Koltzau
From WINE Friday the 13th 2004

svn path=/trunk/; revision=8164
2004-02-14 00:31:39 +00:00
Filip Navara
9a8ead9623 - Eliminate function pointer typecasts in csqtest
- Move the csq.h header to the right place
- Added .cvsignore files

svn path=/trunk/; revision=8163
2004-02-13 09:37:11 +00:00
Royce Mitchell III
b68208f089 patch by blight:
Simple GL programs should work if you have hardware-accelerated video drivers installed, still some bugs left and things to implement; Have already played a model-flight simulator with it.

svn path=/trunk/; revision=8162
2004-02-12 23:56:15 +00:00
Filip Navara
ca9c59183f - Fixed clipping code in NtGdiGetPixel. Patch by James Pritchard.
svn path=/trunk/; revision=8161
2004-02-12 21:50:19 +00:00
Filip Navara
6c33cfe3ac - Locale values are specified in hexadecimal numbers.
svn path=/trunk/; revision=8160
2004-02-12 15:55:57 +00:00
Thomas Bluemel
3c3e6a4430 added EngGetCurrentProcessId() and EngGetCurrentThreadId()
svn path=/trunk/; revision=8158
2004-02-11 22:36:40 +00:00
Steven Edwards
ba374c4128 Make a few stubs return something to get Dependancy Walker loading.
svn path=/trunk/; revision=8157
2004-02-11 21:52:28 +00:00
Hartmut Birr
f90d73ad9d - Adding my pesum tool which does set the attribute IMAGE_SCN_MEM_NOT_PAGED
to sections with the name '.text', '.data', '.bss' and '.idata'.
- Some time ago I've wrote this tool because ld wasn't able to set the pe checksum to images.

svn path=/trunk/; revision=8156
2004-02-11 21:04:18 +00:00
Thomas Bluemel
e83ebbae2d added EngGetCurrentProcessId() and EngGetCurrentThreadId()
svn path=/trunk/; revision=8155
2004-02-11 19:26:51 +00:00
Martin Fuchs
3c0afd1a21 minor corrections by M.Taguchi
svn path=/trunk/; revision=8154
2004-02-11 18:11:21 +00:00
Filip Navara
ca73abde9a - Return more correct error codes from NtUserRegisterClassExWOW.
- Delete atom in NtUserUnregisterClass.
- Corrected DC locking in NtGdiSetDIBColorTable.
- Check region handles in NtGdiPaintRgn.

svn path=/trunk/; revision=8153
2004-02-11 17:56:29 +00:00
Vizzini
d54eeab6a3 Patch from Gregor Anich:
NeHe Lesson 3 works (crashes at close); Lesson 8 does not work - fixed
some bugs in wgl.c and disable asm proxy functions for the moment because
they crash

svn path=/trunk/; revision=8152
2004-02-11 17:39:24 +00:00
Aleksey Bragin
6deb9707f4 Add setupapi_main.c into makefile
svn path=/trunk/; revision=8151
2004-02-11 12:44:27 +00:00
Aleksey Bragin
3d647705b7 Temp fix, because setupapi takes a wrong guess (RtlIsTextUnicode) whether the text is unicode and doesn't work. For now it's assumed all .inf-files are not-unicode.
svn path=/trunk/; revision=8150
2004-02-11 12:40:01 +00:00
Aleksey Bragin
1765aab70d Remove InstallHinfSection from stubs
svn path=/trunk/; revision=8149
2004-02-11 12:38:30 +00:00
Aleksey Bragin
b97de22cf5 Initial implementation of InstallHinfSection, it even works in small test inf-files for adding/removing/changing registry entries. Not tested further.
svn path=/trunk/; revision=8148
2004-02-11 12:38:12 +00:00
Martin Fuchs
cec35a5347 fix context menu support
svn path=/trunk/; revision=8147
2004-02-11 08:35:10 +00:00
Martin Fuchs
27aa9a168f fix and enable japanese resources for windres
svn path=/trunk/; revision=8146
2004-02-11 08:34:28 +00:00
Steven Edwards
979c2579ad Remove old file locking test.
svn path=/trunk/; revision=8145
2004-02-11 00:05:40 +00:00
Steven Edwards
2da07c972c Wine regression tests already check for File Locking APIs
svn path=/trunk/; revision=8144
2004-02-11 00:05:08 +00:00
Gé van Geldorp
3f66c6c806 Fix compilation of setupapi by copying setupapi.h from Wine. The w32api
version contains an incorrect declaration for (at least) SetupGetLineTextA/W

svn path=/trunk/; revision=8143
2004-02-10 23:46:24 +00:00
Gé van Geldorp
8143621407 Don't copy from/to outside the visible screen region
svn path=/trunk/; revision=8142
2004-02-10 23:40:55 +00:00
Gé van Geldorp
76414f84fd Although drivers should accept NULL masks and colors for cursors, at least
two don't and crash. So let's not pass NULL.

svn path=/trunk/; revision=8141
2004-02-10 23:40:01 +00:00
Martin Fuchs
5ef2c3bbef context menu support for winefile
svn path=/trunk/; revision=8140
2004-02-10 23:10:43 +00:00
Martin Fuchs
f0dea6d3a0 store statustexts in MDI children
svn path=/trunk/; revision=8139
2004-02-10 22:15:20 +00:00
Martin Fuchs
9f5e152d22 eliminated nasty warning message
svn path=/trunk/; revision=8138
2004-02-10 21:22:55 +00:00
Martin Fuchs
30462af124 remove DWebBrowserEvents event handler
svn path=/trunk/; revision=8137
2004-02-10 21:01:41 +00:00
Martin Fuchs
29d76f2c5b added japanese resources now in ShiftJIS encoding
(however also not yet compatible to windres)

svn path=/trunk/; revision=8136
2004-02-10 20:31:37 +00:00
Martin Fuchs
9d2aeff0b9 remove UTF16 file with japanese resources
svn path=/trunk/; revision=8135
2004-02-10 20:30:42 +00:00
Casper Hornstrup
bf7fc36abb 2004-02-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* bootdata/packages/reactos.dff: Add oleaut32.dll.

svn path=/trunk/; revision=8134
2004-02-10 20:22:34 +00:00
Filip Navara
b00626d582 - STDCALL/STDCALL_FUNC usage fixes
svn path=/trunk/; revision=8133
2004-02-10 18:11:12 +00:00
Filip Navara
8ccf098ee6 reactos/drivers/net/afd/afd/afd.c (AfdDispatch): Correctly set
Irp->IoStatus.Information.
(AfdUnload): Make it STDCALL.
(DriverEntry): Don't cast function pointers.
reactos/drivers/net/afd/afd/dispatch.c (AfdDispGetName): New function, still
incomplete.
reactos/drivers/net/afd/include/afd.h (AfdDispGetName): Declare.
reactos/drivers/net/tcpip/tcpip/main.c (TiDispatchOpenClose):
Use STDCALL instead of STDCALL_FUNC.
(TiUnload): Make it STDCALL.
(DriverEntry): Don't cast function pointers.
reactos/drivers/net/tcpip/transport/tcp/tcp.c (TCPConnect):
Don't free the NDIS buffer, it's already done on another place and return
STATUS_PENDING to avoid completing the Irp two times.
reactos/lib/msafd/misc/stubs.c (WSPGetSockName, WSPGetPeerName):
Moved to ...
reactos/lib/msafd/misc/dllmain.c (WSPGetSockName, WSPGetPeerName):
... here, direct the calls to afd.sys.

svn path=/trunk/; revision=8132
2004-02-10 17:12:42 +00:00
Steven Edwards
f80022635e Port of netapi32 from WINE
svn path=/trunk/; revision=8131
2004-02-10 16:57:59 +00:00
Filip Navara
aebff275f5 - Eliminate function pointer typecasts
svn path=/trunk/; revision=8130
2004-02-10 16:22:57 +00:00
Gé van Geldorp
7ee686f0e0 Spinlock can also be acquired using KeAcquireSpinLockRaiseToSynch(),
take this into account when checking the IRQL on release

svn path=/trunk/; revision=8129
2004-02-10 15:16:12 +00:00
Gé van Geldorp
fe2c30c13d Hardcode build number consistent with major/minor version (NVidia driver
depends on it).

svn path=/trunk/; revision=8128
2004-02-10 15:13:35 +00:00
Thomas Bluemel
98531c0d4d fixed behaviour of sizing grip (2)
svn path=/trunk/; revision=8127
2004-02-10 10:17:30 +00:00
Thomas Bluemel
db915d211a fixed behaviour of sizing grip
svn path=/trunk/; revision=8126
2004-02-10 08:11:56 +00:00
Vizzini
28c16df7d2 Added an unload handler for easier testing
svn path=/trunk/; revision=8125
2004-02-10 02:54:14 +00:00
Steven Edwards
02b8eb1430 Eric Pouech -
Winelib host process support and Code cleanup.

Steven Edwards -
Change About box to reflect LGPL license change.

svn path=/trunk/; revision=8124
2004-02-10 00:36:46 +00:00
Martin Fuchs
e760b79c60 display status texts
svn path=/trunk/; revision=8123
2004-02-09 23:21:20 +00:00
Martin Fuchs
435db13da9 new TODO entries
svn path=/trunk/; revision=8122
2004-02-09 22:39:05 +00:00
Martin Fuchs
9c5264c5eb re-show all hidden windows at explorer termination
svn path=/trunk/; revision=8121
2004-02-09 22:37:52 +00:00
Martin Fuchs
418a293612 define __WINDRES__ to disable UTF16 resource script
svn path=/trunk/; revision=8120
2004-02-09 22:36:13 +00:00
Martin Fuchs
04866685b1 fixed bounds checking in SHELL_GetPathFromIDListA/W()
svn path=/trunk/; revision=8119
2004-02-09 22:33:05 +00:00
Martin Fuchs
a505cc660f merged WineHQ commits
svn path=/trunk/; revision=8118
2004-02-09 22:24:35 +00:00
Thomas Bluemel
46849d1bdd basic implementation of filling gradient triangles in GradientFill()
svn path=/trunk/; revision=8117
2004-02-09 22:16:50 +00:00
Thomas Bluemel
8fe4a9e38d use GradientFill() for gradient captions
svn path=/trunk/; revision=8116
2004-02-09 16:37:59 +00:00
Thomas Bluemel
8336410c76 implemented horizontal and vertical gradients in GradientFill()
svn path=/trunk/; revision=8114
2004-02-09 15:33:30 +00:00
Gé van Geldorp
5a908e7efe Re-introduce define for MIM_MENUDATA, shell32 depends on it
svn path=/trunk/; revision=8112
2004-02-09 10:21:01 +00:00
Martin Fuchs
099b88ed6f use web child window instead of ShellExecute()
svn path=/trunk/; revision=8111
2004-02-09 09:20:26 +00:00
Vizzini
5398f1df0d Program from Skywing:
PipeSpy can be used to snoop traffic on a named pipe.  It is intended
to be used to help understand the remote kernel debugging protocol
uesd by the windows kd.

svn path=/trunk/; revision=8110
2004-02-09 08:07:58 +00:00
Vizzini
66f9b32741 Patch by Anich Gregor:
fast proxy functions fixed, loads in win2k and succeeds creating the context
but then crashes. ExtEscape call fixed and simple version of
wglGetPixelFormat implemented.

svn path=/trunk/; revision=8109
2004-02-09 08:00:15 +00:00
Vizzini
8eb11ab73e - Added kmlibrary target type
- Added description of MK_ variables
 - Re-arranged library order to include TARGET_DDKLIBS before standard DDK
   import libs on GCC command line (fixes linking problem with static libs)

svn path=/trunk/; revision=8108
2004-02-09 07:03:16 +00:00
Vizzini
f9d689b644 - Updated CSQ library to use new kmlibrary target type
- Updated includes in csq.c
 - Added IPv6 ethertype in lan.h
 - Fixed a typo in ip.c
 - Added csqtest driver for testing cancel-safe queues

svn path=/trunk/; revision=8107
2004-02-09 06:59:01 +00:00
Martin Fuchs
9a53ebcb92 better foreground window handling (VCL applications had problems with the old one)
svn path=/trunk/; revision=8106
2004-02-08 22:47:25 +00:00
Martin Fuchs
a320c0cca9 better window sizing
svn path=/trunk/; revision=8105
2004-02-08 22:30:14 +00:00
Thomas Bluemel
2141be1489 removed a re-defiition
svn path=/trunk/; revision=8104
2004-02-08 22:24:07 +00:00
Gé van Geldorp
d8e8ec2a96 Work on thread-awareness in gdbstub
svn path=/trunk/; revision=8103
2004-02-08 22:12:53 +00:00
Gé van Geldorp
30ada1654d Prevent some debug messages from appearing
svn path=/trunk/; revision=8102
2004-02-08 22:02:40 +00:00
Thomas Bluemel
feb6118e10 1. added test app for GradientFill()
2. removed obsolete cliarea test app

svn path=/trunk/; revision=8101
2004-02-08 21:57:36 +00:00
Gé van Geldorp
2966583cc6 - Fix race condition resulting in WM_xBUTTONUP sometimes being
delivered befor WM_xBUTTONDOWN
- Fix double click

svn path=/trunk/; revision=8100
2004-02-08 21:47:10 +00:00
Thomas Bluemel
dfd90b8ad1 add sekelton for the GradientFill() implementation.
svn path=/trunk/; revision=8099
2004-02-08 21:37:53 +00:00
Martin Fuchs
d9ae46ef9d text -> bin
svn path=/trunk/; revision=8098
2004-02-08 21:31:14 +00:00
Martin Fuchs
4f9a01cc0b text -> bin
svn path=/trunk/; revision=8097
2004-02-08 21:30:57 +00:00
Martin Fuchs
8f1114e759 Japanese resource by Masahiro Taguchi (not supported by windres)
svn path=/trunk/; revision=8096
2004-02-08 21:27:31 +00:00
Martin Fuchs
59cd294e28 desktop switching
svn path=/trunk/; revision=8095
2004-02-08 18:58:45 +00:00
Art Yerkes
0dc86c7a3e Added tcpioctl.h which is used by iphlpapi.
svn path=/trunk/; revision=8094
2004-02-08 18:48:08 +00:00
Vizzini
72d09d2bb0 ReactOS implementation of cancel-safe queue library
svn path=/trunk/; revision=8093
2004-02-08 17:51:32 +00:00
Filip Navara
671f7f1315 - Very basic implementation of ExtEscape
svn path=/trunk/; revision=8092
2004-02-08 16:16:24 +00:00
Filip Navara
a99ec32abd - Minor correction to hit testing algorithm
svn path=/trunk/; revision=8091
2004-02-08 15:13:22 +00:00
Filip Navara
50b64b7cd1 - Language constants needed for OLEAUT32
svn path=/trunk/; revision=8090
2004-02-08 10:56:15 +00:00
Filip Navara
af3e717b32 - Reclaculate window client size in NtUserSetMenu even if the window isn't visible
- Properly move child windows in NtUserSetWindowPos.

svn path=/trunk/; revision=8089
2004-02-08 10:53:17 +00:00
Jason Filby
7715328fc5 CreateFileMappingA/CreateFileMappingW: a NULL size argument for this function should result in the filesize being used. Patch by Gero Kuehn (gero.kuehn@gkware.com).
svn path=/trunk/; revision=8088
2004-02-08 10:42:15 +00:00
Filip Navara
2535445a70 - Fixed algorithm for 4BPP bitblts with ROP != SRCCOPY
- Minor coordinate correction for software mouse pointer emulation

svn path=/trunk/; revision=8087
2004-02-08 09:27:39 +00:00
Gé van Geldorp
2a78934eed Wait a little between retries. Fixes bug #106.
svn path=/trunk/; revision=8086
2004-02-07 21:36:56 +00:00
Martin Fuchs
97ea59d7c9 toolbars to control web browser
svn path=/trunk/; revision=8085
2004-02-07 21:17:27 +00:00
Martin Fuchs
77d84e17ca display nice error message
svn path=/trunk/; revision=8084
2004-02-07 19:51:53 +00:00
Martin Fuchs
73b7358882 corrected error handling if no web control could be found
svn path=/trunk/; revision=8083
2004-02-07 19:04:03 +00:00
Martin Fuchs
36f96a21b7 imported WINE oleaut32.dll and inserted numerous FIXMEs to be able to compile it with MinGW headers" Makefile lib\oleaut32
-> Now can explorer be used again.

svn path=/trunk/; revision=8082
2004-02-07 18:53:59 +00:00
Hartmut Birr
885ca2f7f3 - Free or recycle the remaining path string after a call to ObFindObject.
svn path=/trunk/; revision=8081
2004-02-07 17:30:14 +00:00
Hartmut Birr
f6f4ac5f7b - Set the previous pointer from the next block,
if some blocks was merged (in add_to_free_list).

svn path=/trunk/; revision=8080
2004-02-07 16:37:23 +00:00
Filip Navara
094ace70db - Corrected timeouts to really wait one millisecond.
svn path=/trunk/; revision=8079
2004-02-07 15:44:13 +00:00
Filip Navara
46df458f5f - Do not call initialization of both Mouse callback and classical Mouse driver interface. Because the latter is initialized in separate thread and accesses the same global variables as the callback detection, it causes unexpected effects. This should solve the mouse detection problem as seen on WineConf.
svn path=/trunk/; revision=8078
2004-02-07 15:39:14 +00:00
Gé van Geldorp
8962ef5080 Add TEMP and TMP environment variables. Fixes bug #180.
svn path=/trunk/; revision=8077
2004-02-07 15:33:20 +00:00
Martin Fuchs
f83b41a218 fixed some wrong library names for keyboard drivers
svn path=/trunk/; revision=8076
2004-02-07 15:03:37 +00:00
Martin Fuchs
c414fe7978 first version of web control embedding:
Explorer tries to instantiate an IE web control, if that failes it tries
again using the CLASS-ID of Mozilla's Active-X web control.

svn path=/trunk/; revision=8075
2004-02-07 15:00:28 +00:00
Filip Navara
6c639db134 - Fixed some address calculations
svn path=/trunk/; revision=8074
2004-02-07 12:03:11 +00:00
Gé van Geldorp
826d5e693a Add bootcd target
svn path=/trunk/; revision=8073
2004-02-07 08:37:57 +00:00
Art Yerkes
24fecbb518 Added afd/tdiconn.c with corrections by filip navara
afd/dispatch.c fixed ptr arith + bug fix by filip
afd/tdi.c removed functions dealing with TDI_CONNECTION_INFORMATION (tdiconn)
tcpip fixes by filip

svn path=/trunk/; revision=8072
2004-02-07 04:50:44 +00:00
Filip Navara
03aba39688 - Minor correction to FILE_FULL_EA_INFORMATION prototype
svn path=/trunk/; revision=8071
2004-02-07 03:56:18 +00:00
Filip Navara
8a0ee5fc06 - Properly include FreeType header
svn path=/trunk/; revision=8070
2004-02-07 00:24:46 +00:00
Filip Navara
5b1a3e7233 - Get rid of some compilation warnings
svn path=/trunk/; revision=8069
2004-02-07 00:21:45 +00:00
Filip Navara
88b0aebe1a - Fixed compilation of the updated freetype
svn path=/trunk/; revision=8068
2004-02-07 00:11:02 +00:00
Martin Fuchs
650d796921 small dialog size corrections
svn path=/trunk/; revision=8067
2004-02-06 22:45:49 +00:00
Martin Fuchs
42355ae5c6 use better looking bitmaps
svn path=/trunk/; revision=8066
2004-02-06 22:44:35 +00:00
Richard Campbell
2bc8028175 forgot a file.
svn path=/trunk/; revision=8065
2004-02-06 22:18:56 +00:00
Richard Campbell
5c75940f98 Updated freetype to Freetype 2.1.8-CVS-20040206 in an attempt to fix some of the autohinting issues present in our version, does it help?
svn path=/trunk/; revision=8064
2004-02-06 21:53:11 +00:00
Martin Fuchs
4ed1751218 portugal translation by Paulo Silva
svn path=/trunk/; revision=8063
2004-02-06 21:35:34 +00:00
Martin Fuchs
b6c9a9d585 minimize all button
svn path=/trunk/; revision=8062
2004-02-06 21:34:47 +00:00
Filip Navara
48219202b5 - Fixed software mouse pointer handling to work correctly with MouseSafety* routines
svn path=/trunk/; revision=8061
2004-02-06 21:12:55 +00:00
Gé van Geldorp
5ec14bf2bf Clip region to be bitblt'ed against the valid source region. Fixes bug #152
svn path=/trunk/; revision=8060
2004-02-06 20:36:31 +00:00
Royce Mitchell III
ac2782d72e patch by blight:
rosglChoosePixelFormat implementation and small bugfixes to rosglCreateLayerContext

svn path=/trunk/; revision=8059
2004-02-06 20:31:15 +00:00
Royce Mitchell III
110e28efaa commented out unused variables/code
svn path=/trunk/; revision=8058
2004-02-06 20:25:33 +00:00
Art Yerkes
022e7cfde7 Fixed case of zero DNS servers specified in the registry.
svn path=/trunk/; revision=8056
2004-02-06 20:21:58 +00:00
Royce Mitchell III
b58dac7496 slow functions implemented in nasm now, too
svn path=/trunk/; revision=8055
2004-02-06 19:18:39 +00:00
Royce Mitchell III
b1893869b3 fixed offset to glDispatch table to match current TEB
svn path=/trunk/; revision=8054
2004-02-06 18:57:41 +00:00
Royce Mitchell III
27440e7327 fast proxy functions now exported by nasm code. opengl32 builds and links with both mingw and vc6.
svn path=/trunk/; revision=8053
2004-02-06 18:17:18 +00:00
Royce Mitchell III
796b118754 patch by blight:
more WGL stuff implemented, bugfixes and finally found out how to get the driver name from/for a HDC

svn path=/trunk/; revision=8052
2004-02-06 17:22:55 +00:00
Eric Kohl
008cec6fdf Display REG_FULL_RESOURCE_DESCRIPTOR and REG_RESOURCE_REQUIREMENTS_LIST resource types.
Fix display of unknown resource types.

svn path=/trunk/; revision=8051
2004-02-06 15:26:41 +00:00
Royce Mitchell III
e2dba7ab82 patch by blight:
The C implementation of the gl functions is done. Thanks to Royce who has figured out more ICD internals (how function pointers are passed) the ICD loading code is getting more complete.

svn path=/trunk/; revision=8050
2004-02-06 13:59:13 +00:00
The ReactOS Team
d4a3555442 This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=8047
2004-02-06 08:21:52 +00:00
Aleksey Bragin
b1adc9e47f Initial revision
svn path=/trunk/; revision=8046
2004-02-06 08:21:52 +00:00
Gé van Geldorp
a4b76f805d When using the parent clip region, translate it to child coordinates.
Fixes bug #83.

svn path=/trunk/; revision=8045
2004-02-05 23:16:37 +00:00
Gé van Geldorp
363a9ebe63 Correct bufsize calculation in MessageBoxTimeoutIndirectW. Fixes bug #35.
svn path=/trunk/; revision=8044
2004-02-05 22:09:15 +00:00
Martin Fuchs
994297a05a fixed small bug, which shows up only under NT4
svn path=/trunk/; revision=8043
2004-02-05 21:38:48 +00:00
Gé van Geldorp
55d09ef598 Don't callback from kernel to usermode if the thread is exiting
svn path=/trunk/; revision=8042
2004-02-05 20:09:10 +00:00
Martin Fuchs
a7be90ed0b try to be compatible to NT 4.0 without Active Desktop
svn path=/trunk/; revision=8041
2004-02-05 19:54:51 +00:00
Thomas Bluemel
3bf7edc849 added control panel template
svn path=/trunk/; revision=8040
2004-02-05 19:17:11 +00:00
Thomas Bluemel
1b0cdbf59c added missing definitions
svn path=/trunk/; revision=8039
2004-02-05 19:14:32 +00:00
Art Yerkes
2fa692ee50 Small fixes for cross compilation.
svn path=/trunk/; revision=8038
2004-02-05 16:26:39 +00:00
Royce Mitchell III
5e2e1b620b TEB and ICD table offsets and ICD table structure
svn path=/trunk/; revision=8037
2004-02-05 16:11:19 +00:00
Martin Fuchs
702870db9d don't count on NULL termination of returned strings
svn path=/trunk/; revision=8036
2004-02-05 08:23:50 +00:00
Royce Mitchell III
49f02ee444 patch by blight with help from Royce3 for ICD behavioral research:
Changed GLFUNCS_MACRO to support C implementation of functions,
added MSVC asm version of gl functions, links now, driver and
GLRC lists protected by mutexes, added some breakpoints,
and fixed 1 or 2 Drv prototypes.

svn path=/trunk/; revision=8035
2004-02-05 04:28:11 +00:00
Emanuele Aliberti
270099086f Win32 GUI subsystem.
svn path=/trunk/; revision=8034
2004-02-04 23:12:54 +00:00
Gé van Geldorp
8fdb9cdcc1 Fix race condition when one thread changes the update region of a window
and another thread retrieves a paint message for that window.

svn path=/trunk/; revision=8033
2004-02-04 23:01:07 +00:00
Gé van Geldorp
969bf0b926 Second attempt at bug #5: reset active DCEs when window positions change
svn path=/trunk/; revision=8032
2004-02-04 22:59:04 +00:00
Gé van Geldorp
40bc1b6611 Use window thread instead of current thread to obtain desktop
svn path=/trunk/; revision=8031
2004-02-04 22:55:21 +00:00
Filip Navara
f599776b65 - Rewritten NtGdiEllipse with improved and optimized algorithm. Now it works also for non-circles, but unfortuently it still looks a bit choppy.
svn path=/trunk/; revision=8030
2004-02-04 22:10:00 +00:00
Aleksey Bragin
75a008acf6 cat for ReactOS made by Tappak (Semyon Novikov)
svn path=/trunk/; revision=8029
2004-02-04 20:02:57 +00:00
Aleksey Bragin
1c8751a080 missing .cvsignore
svn path=/trunk/; revision=8028
2004-02-04 20:01:22 +00:00
Eric Kohl
2dae92de89 Add debug message logging (disabled by default).
Store user account data in Account\Users.

svn path=/trunk/; revision=8027
2004-02-04 17:57:56 +00:00
Gé van Geldorp
4986ea13b8 Adjust NtUserChildWindowFromPointEx declaration to match definition
svn path=/trunk/; revision=8026
2004-02-04 10:23:05 +00:00
Martin Fuchs
c7278edf80 get background color out of the bitmap
svn path=/trunk/; revision=8025
2004-02-04 09:43:51 +00:00
Martin Fuchs
d49e09da20 added 4bpp logo bmp
svn path=/trunk/; revision=8024
2004-02-04 09:31:27 +00:00
Martin Fuchs
6505062b5a added special logo bitmap for 4 bpp color resolution
svn path=/trunk/; revision=8023
2004-02-04 09:29:53 +00:00
Richard Campbell
9896efb9e2 increased icon spacing, my computer and other icon titles aren't clipped anymore...
svn path=/trunk/; revision=8022
2004-02-04 01:26:34 +00:00
Richard Campbell
5922c20a8d implemented ChildWindowFromPoint(Ex)
svn path=/trunk/; revision=8021
2004-02-04 01:10:25 +00:00
Richard Campbell
7e4dffe404 changed 'Create New Task' to 'Run'
svn path=/trunk/; revision=8020
2004-02-04 00:53:45 +00:00
Gé van Geldorp
bec973c423 Move call to PrivateCsrssManualGuiCheck to before the creation of
window classes

svn path=/trunk/; revision=8019
2004-02-04 00:05:46 +00:00
Richard Campbell
8c6973cde5 stubbed out dsound, dinput, and ddraw, some apps get a little farther before crashing now (FCEU).
svn path=/trunk/; revision=8018
2004-02-03 23:09:48 +00:00
Martin Fuchs
57a8fb919e integrated new startmenu side bar logo (posted by Paulo Correasilva)
svn path=/trunk/; revision=8017
2004-02-03 21:34:59 +00:00
Filip Navara
2b54029e8b - Fix NtUserScroll[WindowEx/DC]
- Minor correction in NtUserBeginPaint
- Added check for NULL handle in IntPaintWindows

svn path=/trunk/; revision=8016
2004-02-03 17:53:55 +00:00
Filip Navara
44f54f5ec0 - Use ScrollWindowEx for scrolling text in console
svn path=/trunk/; revision=8015
2004-02-03 17:53:54 +00:00
Thomas Bluemel
8dfbb5f8ab added *.d files
svn path=/trunk/; revision=8014
2004-02-03 15:52:33 +00:00
Eric Kohl
3c199a3cb1 Move RtlGUIDFromString() and RtlInt64ToUnicodeString() stubs.
Removed fpu emulator entry points.

svn path=/trunk/; revision=8013
2004-02-03 14:38:23 +00:00
Filip Navara
ef6d18b7ad - Fix a NULL termination.
svn path=/trunk/; revision=8012
2004-02-03 14:25:38 +00:00
Eric Kohl
cd98a247e4 Add byte swap functions.
svn path=/trunk/; revision=8011
2004-02-03 14:24:02 +00:00
Royce Mitchell III
ffa90a12e2 patch by blight:
I have not changed the function loading code to use the TEB's glDispatch
table, but the calling code should be kinda ok already (the x86 version)
For the C version of the forwarding code we need another agument for the X
macro i think. At the moment it is function name ("glVertex3f"), return type
("void") and args ("GLfloat x, GLfloat y, GLfloat z") - we'd need one with
"x, y, z" for that case that we can pass on the arguments with C.

The WGL code also doesn't use the TEB yet, it still uses TLS.

svn path=/trunk/; revision=8010
2004-02-03 14:23:42 +00:00
Gé van Geldorp
6531ed6cf1 Deactivate last change since it can cause a FastMutex to be recursively
acquired

svn path=/trunk/; revision=8009
2004-02-03 09:44:35 +00:00
Emanuele Aliberti
11c1fc3591 PORT_MESSAGE and PORT_MAX_MESSAGE are already defined off include/ntos. I remove them for now.
svn path=/trunk/; revision=8008
2004-02-03 00:05:57 +00:00
Emanuele Aliberti
3356caccb3 LPC: initial work on NT/ROS compatibility.
svn path=/trunk/; revision=8007
2004-02-02 23:48:42 +00:00
Gé van Geldorp
70a9c9cdf0 Handle NULL window as special case when computing visible region for GetDC.
Fixes bug #59

svn path=/trunk/; revision=8006
2004-02-02 23:28:17 +00:00
Martin Fuchs
51612d040b reading of FAT image files (work in progress)
svn path=/trunk/; revision=8005
2004-02-02 23:18:07 +00:00
Eric Kohl
2f3d748c1d Implement RtlAccessAllowedAceEx() and RtlAccessDeniedAceEx().
Use ACL constants and fix ACL-revision checks.

svn path=/trunk/; revision=8004
2004-02-02 22:38:43 +00:00
Gé van Geldorp
7b7b608822 Update DC when moving a window. Fixes bug #5. Based on a patch by
Filip Navara.

svn path=/trunk/; revision=8003
2004-02-02 22:09:05 +00:00
Filip Navara
994fed8844 - Remove AddrFileEntry from CONNECTION_ENDPOINT. It's no longer needed.
- Fixed acquiring a spin lock in FileCloseConnection.

svn path=/trunk/; revision=8002
2004-02-02 21:02:48 +00:00
Eric Kohl
8a81d07bde Fix stupid cut&paste bug.
svn path=/trunk/; revision=8001
2004-02-02 20:59:46 +00:00
Filip Navara
c1f516ab97 Add registry entries for IShellLink[AW] interfaces.
svn path=/trunk/; revision=8000
2004-02-02 20:25:28 +00:00
Hartmut Birr
7ab30519b8 - Fixed the return value in RtlStringFromGUID.
svn path=/trunk/; revision=7999
2004-02-02 19:04:11 +00:00
Royce Mitchell III
fb4488df01 warning fix ( casting issue )
svn path=/trunk/; revision=7998
2004-02-02 18:21:32 +00:00
Filip Navara
9caad5c470 Compilation fixes.
svn path=/trunk/; revision=7997
2004-02-02 17:59:23 +00:00
Filip Navara
7e215a0498 Import of OpenGL Utility library.
svn path=/trunk/; revision=7996
2004-02-02 16:39:16 +00:00
Gé van Geldorp
a474343fb9 Change workaround for bug in Nullsoft installer.
svn path=/trunk/; revision=7995
2004-02-02 15:51:29 +00:00
Gé van Geldorp
08b2e62907 lstrcpyn is documented to always return a NUL terminated string
svn path=/trunk/; revision=7994
2004-02-02 15:50:16 +00:00
Gé van Geldorp
90fd161f1e Don't increment loop variable inside the loop too. Spotted by Mark IJbema.
svn path=/trunk/; revision=7993
2004-02-02 15:16:53 +00:00
Thomas Bluemel
a21e7f7e43 fixed compiling problems
svn path=/trunk/; revision=7992
2004-02-02 15:10:00 +00:00
Eric Kohl
e61405acd5 Implement RtlFindLeastSignificantBit() and RtlFindMostSignificantBit().
svn path=/trunk/; revision=7991
2004-02-02 13:34:01 +00:00
Eric Kohl
fb0bca238a Use ACL constants and fix ACL-revision checks.
svn path=/trunk/; revision=7990
2004-02-02 12:05:41 +00:00
Eric Kohl
aa7104ce33 Add missing ACL-related constants.
svn path=/trunk/; revision=7989
2004-02-02 12:03:43 +00:00
Emanuele Aliberti
6004fa9998 Type casting for compiling USER32. What did break it?
svn path=/trunk/; revision=7988
2004-02-02 11:46:41 +00:00
Royce Mitchell III
1dd7917966 initial implementation of OPENGL32_LoadDrivers(), call it on PROCESS_ATTACH. Removed trailing W from functions where unnecessary.
svn path=/trunk/; revision=7987
2004-02-02 06:01:35 +00:00
Royce Mitchell III
e0cc57149b bunch more groundwork for ICD support - patch by blight
svn path=/trunk/; revision=7986
2004-02-02 05:36:37 +00:00
Eric Kohl
5a34c87b8b Implement RtlFindLeastSignificantBit(), RtlFindMostSignificantBit() and _itow().
svn path=/trunk/; revision=7985
2004-02-02 00:36:36 +00:00
Richard Campbell
18ff29b0fa unstubbed childwindowfrompoint(ex). This function is implemented in my local source tree, will commit as soon as i do some testing to make sure things work as planned.
svn path=/trunk/; revision=7984
2004-02-02 00:18:58 +00:00
Gé van Geldorp
03726a14c8 Changes for richedit
svn path=/trunk/; revision=7983
2004-02-01 21:55:45 +00:00
Gé van Geldorp
d196e4b798 Add mpr and wininet to default build/install
svn path=/trunk/; revision=7982
2004-02-01 21:41:00 +00:00
Gé van Geldorp
de26fb22b7 Stub out just enough of wininet.dll to make the AbiWord installer happy
svn path=/trunk/; revision=7981
2004-02-01 21:33:56 +00:00
Gé van Geldorp
3651baea0a Workaround for bug in Nullsoft installer. This closes ReactOS bug #194.
svn path=/trunk/; revision=7980
2004-02-01 21:27:44 +00:00
Gé van Geldorp
09fd2196ac CVS maintenance
svn path=/trunk/; revision=7979
2004-02-01 21:26:06 +00:00
Gé van Geldorp
9a55977414 Sync richedit with WineHQ
svn path=/trunk/; revision=7978
2004-02-01 21:20:05 +00:00
Thomas Bluemel
5db4db7d8f little bugfix
svn path=/trunk/; revision=7977
2004-02-01 20:50:10 +00:00
Eric Kohl
0d5dbba99c - Move rangelist stubs.
- Move sscanf() stub.
- Implement _bsearch(), _lfind(), _ui64toa() and _ui64tow().
- Export iswdigit(), iswlower(), iswxdigit() and _vsnwsprintf().
- Replace Win32 types by corresponding native types.

svn path=/trunk/; revision=7976
2004-02-01 20:48:06 +00:00
Thomas Bluemel
af5a3793e1 added support for right-aligned menus
svn path=/trunk/; revision=7975
2004-02-01 20:45:02 +00:00
Gé van Geldorp
dc7e97f014 Update status
svn path=/trunk/; revision=7974
2004-02-01 20:11:00 +00:00
Gé van Geldorp
30fec5037f Add mpr.dll
svn path=/trunk/; revision=7973
2004-02-01 20:08:08 +00:00
Gé van Geldorp
4c1d8f1a02 CVS maintenance
svn path=/trunk/; revision=7971
2004-02-01 19:58:55 +00:00
Gé van Geldorp
098630e3d6 Import mpr from Wine
svn path=/trunk/; revision=7970
2004-02-01 19:48:44 +00:00
Martin Fuchs
4d326b81dc implemented context menu for file child windows
svn path=/trunk/; revision=7969
2004-02-01 19:17:31 +00:00
Filip Navara
c9e333fafc Latest version of serial mouse driver with fixes by Logan_V8_TT.
svn path=/trunk/; revision=7968
2004-02-01 18:28:38 +00:00
Emanuele Aliberti
8443a77631 Use macros for LPC message limits in current LPC implementation.
svn path=/trunk/; revision=7967
2004-02-01 18:19:28 +00:00
Royce Mitchell III
04aba507f3 function list macro
svn path=/trunk/; revision=7966
2004-02-01 17:18:48 +00:00
Royce Mitchell III
809430ad58 more work on openg32
svn path=/trunk/; revision=7965
2004-02-01 17:07:16 +00:00
Eric Kohl
927fc7ad03 Fix buggy expansion (signed/unsigned) of InitiatorBusID.
svn path=/trunk/; revision=7964
2004-02-01 16:02:35 +00:00
Eric Kohl
ed7963440d Changed base address of samlib.dll.
svn path=/trunk/; revision=7963
2004-02-01 15:56:37 +00:00
Gé van Geldorp
f28940b24f Fix wrong GetBitmapDimensionEx() usage
svn path=/trunk/; revision=7962
2004-02-01 15:52:02 +00:00
Gé van Geldorp
32532d4019 Silence debug messages
svn path=/trunk/; revision=7961
2004-02-01 15:46:53 +00:00
Gé van Geldorp
e1d6ad5272 Rename BITMAPOBJ "size" member to "dimension" to make clear it's to be
used for Get/SetBitmapDimensionEx only. Fix current wrong usage.

svn path=/trunk/; revision=7960
2004-02-01 15:45:41 +00:00
Gé van Geldorp
2cb71414cb Testing shows that MS-Win does allow a thread to leave a critical section
entered by another thread.

svn path=/trunk/; revision=7959
2004-02-01 14:05:30 +00:00
Filip Navara
cac89868b0 Test for bugs that prevent Mozilla from working.
svn path=/trunk/; revision=7958
2004-02-01 12:30:36 +00:00
Martin Fuchs
394bc9f628 display pseudo-file attributes "link" and "executable"
svn path=/trunk/; revision=7957
2004-02-01 11:53:11 +00:00
Martin Fuchs
257d7fb7f0 update TODO list
svn path=/trunk/; revision=7956
2004-02-01 11:22:24 +00:00
Martin Fuchs
26e89bbfbc display registry value contents
svn path=/trunk/; revision=7955
2004-02-01 11:19:28 +00:00
Martin Fuchs
b88d580163 new 'content' column to display symbolic link targets
svn path=/trunk/; revision=7954
2004-02-01 10:52:24 +00:00
Martin Fuchs
3e745d2acd Patch by Filip Navara <xnavara@volny.cz>:
Can someone please commit this patch? I can't wait for the root's lock
and this patch fixes one dumb problem/crash I introduced...

svn path=/trunk/; revision=7953
2004-02-01 09:58:30 +00:00
Filip Navara
981a893bbd - Resolve two GDI handle leaks
- Faster GDI handle allocation strategy

svn path=/trunk/; revision=7952
2004-02-01 08:07:07 +00:00
Filip Navara
a4b82ffa87 Fixed .cvsignore.
svn path=/trunk/; revision=7951
2004-02-01 08:03:43 +00:00
Royce Mitchell III
cb603fa318 beginnings of ros's opengl32 - by blight and Royce3
svn path=/trunk/; revision=7950
2004-02-01 07:11:06 +00:00
Gé van Geldorp
003adb9a68 Silence debug messages
svn path=/trunk/; revision=7949
2004-01-31 23:53:45 +00:00
Gé van Geldorp
649ad5c8c0 Implemented Write(Private)ProfileStringA/W
svn path=/trunk/; revision=7948
2004-01-31 23:52:42 +00:00
Martin Fuchs
4e8837594f mount drives in NT object namespace
svn path=/trunk/; revision=7947
2004-01-31 23:43:28 +00:00
Martin Fuchs
18feaceddc display types of files, NT objects and registry key/entries
svn path=/trunk/; revision=7946
2004-01-31 23:02:21 +00:00
Martin Fuchs
df1d5b7032 - don't sort registry hives
- fix for memory corruption problem

svn path=/trunk/; revision=7945
2004-01-31 21:01:53 +00:00
Thomas Bluemel
77721fee4b fixed missing release of window objects
svn path=/trunk/; revision=7944
2004-01-31 19:56:14 +00:00
Martin Fuchs
8506980996 included Registry as virtual file system
svn path=/trunk/; revision=7943
2004-01-31 19:31:51 +00:00
Martin Fuchs
b2f6c15aa4 empty REGISTRY directory
svn path=/trunk/; revision=7942
2004-01-31 17:26:38 +00:00
Martin Fuchs
973445eeff re-activate already open shell/ntobj child windows instead of opening new windows
svn path=/trunk/; revision=7941
2004-01-31 17:09:19 +00:00
Eric Kohl
288705874e Start parsing at the root object when an object path needs to be reparsed.
Patch by Art Yerkes.

svn path=/trunk/; revision=7940
2004-01-31 16:52:47 +00:00
Martin Fuchs
cb2752aa76 included NT Object namespace as virtual file system
svn path=/trunk/; revision=7939
2004-01-31 16:25:23 +00:00
Emanuele Aliberti
f4625da5df Define macros for LPC limits:
PORT_MAX_DATA_LENGTH    0x104
PORT_MAX_MESSAGE_LENGTH 0x148

svn path=/trunk/; revision=7938
2004-01-31 15:27:54 +00:00
Richard Campbell
70ced9fd3b Seperated the Caption font and the icon title font. Note that this code will soon be rendered obsolete by code that loads metrics fonts from the registry.
svn path=/trunk/; revision=7937
2004-01-31 14:57:58 +00:00
Eric Kohl
c88b53bb8e Fixed querying and enumerating the subkeys of HKEY_LOCAL_MACHINE.
This fixes bug #78.

svn path=/trunk/; revision=7936
2004-01-31 14:33:01 +00:00
Filip Navara
faa1a76919 Call initialization of the msvcrt parts ported from Wine.
svn path=/trunk/; revision=7935
2004-01-31 13:29:19 +00:00
Robert Kopferl
dbd10a8033 neu
svn path=/trunk/; revision=7934
2004-01-31 01:29:11 +00:00
Hartmut Birr
9ac2b2c62c - Do only lock a new page on exit from AccessFaultSectionView.
svn path=/trunk/; revision=7933
2004-01-31 00:16:55 +00:00
Hartmut Birr
dab0a77461 - Check for a privat page and change only the page protection
for such a page in MmAccessFaultSectionView.

svn path=/trunk/; revision=7932
2004-01-30 23:57:58 +00:00
Gé van Geldorp
5dee2e6519 Silence debug messages
svn path=/trunk/; revision=7931
2004-01-30 22:29:39 +00:00
Gé van Geldorp
d14d65ec2a Silence debug messages
svn path=/trunk/; revision=7930
2004-01-30 22:12:47 +00:00
Gé van Geldorp
c0e2ebf80c Implement some profile (.ini file) functions
svn path=/trunk/; revision=7929
2004-01-30 21:48:09 +00:00
Martin Fuchs
8a89b6750f fixed relocation problem to re-activate new error messages
svn path=/trunk/; revision=7928
2004-01-30 20:31:35 +00:00
Andrew Greenwood
26584f6d6a Preliminary implementation of mmdrv.dll. This is fixed to using MidiOut0 (provided by the mpu401 driver) and is *very* basic. It's only possible to open the MIDI device and play a note, with this.
Eventually, a list of devices will need to be obtained from the registry.

svn path=/trunk/; revision=7927
2004-01-30 18:32:58 +00:00
Richard Campbell
0b9faf4625 reverted martin's patch as it causes ROS to no longer boot correctly into GUI mode, patch by filip navara.
svn path=/trunk/; revision=7926
2004-01-30 17:53:07 +00:00
Andrew Greenwood
47fe4c6cf3 MIDI / MPU401 output test application.
This just opens the first MIDI device, which at present should be the one provided by mpu401.sys (via mmdrv.dll), and plays a note.

svn path=/trunk/; revision=7925
2004-01-30 17:38:08 +00:00
Filip Navara
549c9ff77e Minor correction to RtlDeleteCriticalSection.
svn path=/trunk/; revision=7924
2004-01-30 17:32:17 +00:00
Andrew Greenwood
d00716c055 Temporarily named the device "MidiOut0" so mmdrv.dll (when committed!) will use it.
This driver can currently play some short MIDI messages when combined with my mmdrv.dll and miditest.exe programs (which I intend to commit eventually, once they're integrated into the ReactOS tree.)

svn path=/trunk/; revision=7923
2004-01-30 17:10:23 +00:00
Andrew Greenwood
392b65e4a7 Fixed a few minor problems so the driver compiles with the current ROS headers etc.
It still doesn't really do much apart from play a buffer of silence when loaded, but maybe someone can help me with this :)

svn path=/trunk/; revision=7922
2004-01-30 17:08:13 +00:00
Filip Navara
4b2257966c stubs/stubs.c (EngGetLastError, EngSetLastError): Moved to ...
eng/error.c: ... here
stubs/stubs.c (BRUSHOBJ_ulGetBrushColor): Moved to ...
eng/brush.c: ... here and implemented.
objects/semaphor.c: Moved to ...
eng/semaphor.c: ... here

svn path=/trunk/; revision=7921
2004-01-30 16:36:16 +00:00
Richard Campbell
81984d5d5e More font fixes.
svn path=/trunk/; revision=7920
2004-01-30 15:53:36 +00:00
Richard Campbell
9eb201eea9 Switcharoo with some fonts, this fixes some of the font issues introduced by my font loading patch.
svn path=/trunk/; revision=7919
2004-01-30 13:11:52 +00:00
Richard Campbell
acb0c0998c Enabled the bytecode interpreter with the unpatented hinting system, ftoption.h warns that this doesn't work as advertise, if anyone has any problems, disable it. This improves the quality of some of the fonts dramatically.
svn path=/trunk/; revision=7918
2004-01-30 13:10:42 +00:00
Gé van Geldorp
b61bc104f2 Patch by Michael Fritscher
Change error message displayed when trying to 'cd' to non-existent dir

svn path=/trunk/; revision=7917
2004-01-30 12:34:02 +00:00
Gé van Geldorp
5c0e9ff60d Patch by Michael Fritscher
Implement /W option

svn path=/trunk/; revision=7916
2004-01-30 12:27:41 +00:00
Gé van Geldorp
b9e10092bd Patch by Michael Fritscher
Implement /P and /Y options

svn path=/trunk/; revision=7915
2004-01-30 12:24:41 +00:00
Filip Navara
de69dfa6c7 Implementation of InitializeCriticalSectionAndSpinCount and RtlInitializeCriticalSectionAndSpinCount.
svn path=/trunk/; revision=7914
2004-01-29 23:41:36 +00:00
Martin Fuchs
7ecc5dcb3f imported error message texts from MSDN
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__1000-1299_.asp)

svn path=/trunk/; revision=7913
2004-01-29 22:26:20 +00:00
Richard Campbell
2950445444 I swear! last commit! (forgot to ZwClose)
svn path=/trunk/; revision=7912
2004-01-29 22:24:51 +00:00
Richard Campbell
0d2c4c19fd Fixed a small bug in my code and removed DbgPrint.
svn path=/trunk/; revision=7911
2004-01-29 22:23:27 +00:00
Richard Campbell
8904505d1f Dynamically load fonts on startup. Code probably isn't perfect, but it works. This code exposes another small 'bug'. System font appears to be dependent on the loading order of the fonts.
svn path=/trunk/; revision=7910
2004-01-29 22:17:54 +00:00
Aleksey Bragin
6bfe38b04b man implementation in ReactOS by Semyon Novikov (tappak).
It works in current ROS implementation according to his words

svn path=/trunk/; revision=7909
2004-01-29 20:28:56 +00:00
Martin Fuchs
33084f82f3 use strcmpiW() instead of _wcsicmp() for Wine-compatibility
svn path=/trunk/; revision=7908
2004-01-29 20:09:20 +00:00
Gunnar Dalsnes
dae39308ff GetLocaleInfoA impl. (copied from wine)
svn path=/trunk/; revision=7907
2004-01-28 23:03:59 +00:00
Gé van Geldorp
b6b9cc70d8 Merge back commits from WineHQ
svn path=/trunk/; revision=7906
2004-01-28 21:57:41 +00:00
Filip Navara
eb51ca8257 Added missing .cvsignore files.
svn path=/trunk/; revision=7905
2004-01-28 21:56:36 +00:00
Gé van Geldorp
f336758ba4 Merge back commits from WineHQ
svn path=/trunk/; revision=7904
2004-01-28 21:40:09 +00:00
Gé van Geldorp
c5eedd47f6 Merge back commits from WineHQ
svn path=/trunk/; revision=7903
2004-01-28 21:27:51 +00:00
Filip Navara
9d72a8b12b Minor change to allow linking setupapi.dll.
svn path=/trunk/; revision=7902
2004-01-28 21:02:07 +00:00
Gé van Geldorp
bccf34a7a1 Determine number of accelerator table entries in resource from size of
the resource

svn path=/trunk/; revision=7901
2004-01-28 21:00:23 +00:00
Eric Kohl
cdcb7ec378 Remove ntos.h and roskrnl.h from kernel-mode code.
svn path=/trunk/; revision=7900
2004-01-28 20:55:50 +00:00
Gé van Geldorp
eb980ec861 Inform kernel whether Unicode or Ansi window proc is preferred
svn path=/trunk/; revision=7899
2004-01-28 20:54:30 +00:00
Gé van Geldorp
3d25387466 Don't wait for GUI processes to finish
svn path=/trunk/; revision=7898
2004-01-28 20:52:57 +00:00
Martin Fuchs
b4446c11bb merged back commited WINE patches: \n for TRACE messages
svn path=/trunk/; revision=7897
2004-01-28 20:10:59 +00:00
Martin Fuchs
d276fcc1d3 merged back commited WINE patches
svn path=/trunk/; revision=7896
2004-01-28 20:10:01 +00:00
Filip Navara
f6966e84c8 Fixed base addresses and exports.
svn path=/trunk/; revision=7895
2004-01-28 19:34:45 +00:00
Gé van Geldorp
a3c1e6c8c7 Patch by Michael Fritscher
Fix /p when screen buffer is larger than output window

svn path=/trunk/; revision=7894
2004-01-28 17:47:27 +00:00
Gé van Geldorp
88c6922a90 strncpy does add NUL bytes to fill dest buffer completely,
however lstrcpyn does not.

svn path=/trunk/; revision=7893
2004-01-28 08:51:09 +00:00
Gé van Geldorp
18a0b41cb6 Don't depend on wine user32 internals
svn path=/trunk/; revision=7892
2004-01-27 21:54:03 +00:00
Gé van Geldorp
c778f1be56 Don't write more nul bytes than necessary
svn path=/trunk/; revision=7891
2004-01-27 21:43:47 +00:00
Hartmut Birr
01723ab7ca - Fixed some problems which occurs if a read only segment is
changed to write and back to read only and if such a segment
  (or a page from such a segment) is paged out and reloaded again.

svn path=/trunk/; revision=7890
2004-01-27 20:13:08 +00:00
Gé van Geldorp
72a5d17432 Fix cross-thread WM_SETTEXT messages
svn path=/trunk/; revision=7889
2004-01-27 13:21:35 +00:00
Thomas Bluemel
8c589debf7 activate modal dialog when clicking on a disabled window
svn path=/trunk/; revision=7888
2004-01-27 11:52:37 +00:00
Thomas Bluemel
55a09e1914 release window object when destroying window children and skip only children that have a different parent window (instead of owner window because controls do not have a window owner)
svn path=/trunk/; revision=7887
2004-01-27 09:36:14 +00:00
Thomas Bluemel
420710cf61 don't activate disabled windows
svn path=/trunk/; revision=7886
2004-01-27 08:49:58 +00:00
Thomas Bluemel
71270ddbba GetAncestor() doesn't set a last-error if the handle passed is the desktop window, it just returns NULL
svn path=/trunk/; revision=7885
2004-01-27 08:29:28 +00:00
Gé van Geldorp
f1253083e4 Release mutex on error exit
svn path=/trunk/; revision=7884
2004-01-26 23:29:23 +00:00
Thomas Bluemel
53623ae9dc implemented multiline menu bars
svn path=/trunk/; revision=7883
2004-01-26 23:22:48 +00:00
Filip Navara
83adec498a Readd some resource, because they're actually used!
svn path=/trunk/; revision=7882
2004-01-26 20:36:41 +00:00
Thomas Bluemel
48cc68f016 1. implemented MenuItemFromPoint()
2. fixed hittest-code so it returns HTMENU properly

svn path=/trunk/; revision=7881
2004-01-26 12:46:16 +00:00
Thomas Bluemel
e6249843b8 set menuitem rects after measuring the size
svn path=/trunk/; revision=7880
2004-01-26 10:09:04 +00:00
Thomas Bluemel
9d9f3772f6 fixed close button
svn path=/trunk/; revision=7879
2004-01-26 09:32:17 +00:00
Thomas Bluemel
a5ea007a53 gave NtUserCall*Param decent names
svn path=/trunk/; revision=7878
2004-01-26 08:44:51 +00:00
Gé van Geldorp
49c7a9ae93 Add __REACTOS__ define
svn path=/trunk/; revision=7877
2004-01-25 18:42:49 +00:00
Filip Navara
6e361ec59f More work on software mouse pointer implementation.
svn path=/trunk/; revision=7876
2004-01-25 16:47:10 +00:00
Richard Campbell
4fc67741b8 more housekeeping
svn path=/trunk/; revision=7875
2004-01-25 13:09:34 +00:00
Richard Campbell
5792580e59 housekeeping
svn path=/trunk/; revision=7874
2004-01-25 13:06:55 +00:00
Martin Fuchs
ffce6d13d0 fixed Doxygen Generation
svn path=/trunk/; revision=7873
2004-01-25 11:55:59 +00:00
Jason Filby
bf5b782c83 *** empty log message ***
svn path=/trunk/; revision=7872
2004-01-25 09:57:15 +00:00
Filip Navara
872e4089f0 Minor fix.
svn path=/trunk/; revision=7871
2004-01-25 08:32:51 +00:00
Filip Navara
09fa2c188b Fixed binary search algroithm in LdrGetExportByOrdinal - numbers can reach negative values.
svn path=/trunk/; revision=7870
2004-01-25 08:32:49 +00:00
Filip Navara
5f474aea89 Work on ioctlsocket and WSAIoctl.
svn path=/trunk/; revision=7869
2004-01-25 08:32:44 +00:00
Filip Navara
3360515771 Actually the last entry in export table is NumberOfNames - 1 and not NumberOfNames.
svn path=/trunk/; revision=7868
2004-01-24 23:44:26 +00:00
Martin Fuchs
8fb6b0e581 resolve some FIXMEs by translating new text strings; provided by Paulo [<correasilva@tugamail.com>]
svn path=/trunk/; revision=7867
2004-01-24 23:00:51 +00:00
Filip Navara
e25e386086 Moved the generic mouse pointer implementation to win32k (not complete yet).
svn path=/trunk/; revision=7865
2004-01-24 19:47:05 +00:00
Filip Navara
db0f9b9ba4 Work on mouse pointer implementation.
svn path=/trunk/; revision=7864
2004-01-24 17:42:56 +00:00
Steven Edwards
ed4bb6a2cd Started porting Setupapi.dll from WINE to ReactOS.
svn path=/trunk/; revision=7863
2004-01-24 15:39:47 +00:00
Martin Fuchs
7fd96c83a7 dde_connect(): set error code ERROR_DDE_FAIL when encountering DDE connection problems
svn path=/trunk/; revision=7862
2004-01-24 12:20:17 +00:00
Martin Fuchs
de5a724bca - basic registration of .url and .scf file types
- fix for .txt file type (REG_EXPAND_SZ)

svn path=/trunk/; revision=7861
2004-01-24 12:08:08 +00:00
Filip Navara
52963a354f Fix RtlStringFromGUID.
svn path=/trunk/; revision=7860
2004-01-24 11:59:04 +00:00
Filip Navara
85ac449051 Fix debug message.
svn path=/trunk/; revision=7859
2004-01-24 11:59:00 +00:00
Martin Fuchs
1d58bfad3b - use PostMessage(WM_SYSCOMMAND) instead of ShowWindowAsync(SW_MINIMIZE) to minimize application windows when clicking on the taskbar
-> for example mIRC needs this to "minimize to the tray"
- fix determination of the last foreground window

svn path=/trunk/; revision=7858
2004-01-24 10:12:40 +00:00
Eric Kohl
19f91f8fd9 Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7857
2004-01-24 08:41:03 +00:00
Eric Kohl
495a53c036 Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7856
2004-01-24 08:27:40 +00:00
Eric Kohl
f0a9cdbf44 Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7855
2004-01-23 23:38:26 +00:00
Eric Kohl
ac2bc52c3f Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7854
2004-01-23 23:30:23 +00:00
Martin Fuchs
138cbd27ed merged back commited WINE patches
svn path=/trunk/; revision=7853
2004-01-23 21:44:15 +00:00
Eric Kohl
049035cfea Move kernel32-internal declarations from global include directory to local one.
svn path=/trunk/; revision=7852
2004-01-23 21:18:27 +00:00
Eric Kohl
901a00bd04 Move kernekl32-internal declarations from global include directory to local one.
svn path=/trunk/; revision=7851
2004-01-23 21:16:04 +00:00
Martin Fuchs
afcb6d4fb1 bugfix to correctly display notification icons of some applications
svn path=/trunk/; revision=7850
2004-01-23 20:52:18 +00:00
Eric Kohl
ceb721e557 Add missing header.
svn path=/trunk/; revision=7849
2004-01-23 20:11:24 +00:00
Eric Kohl
7f921b5820 Get rid of useless prototypes.
svn path=/trunk/; revision=7848
2004-01-23 20:02:09 +00:00
Eric Kohl
a27a41929d Ntdll implements the user heaps. Don't try to handle this yourself.
svn path=/trunk/; revision=7847
2004-01-23 19:59:15 +00:00
Filip Navara
c6651faa5f Forgot to commit this file last time.
svn path=/trunk/; revision=7846
2004-01-23 19:49:07 +00:00
Filip Navara
444c59cb3f Patch by Matthew Brace <ismarc@austin.rr.com>
- Implementation of RtlStringFromGUID, IoOpenDeviceInterfaceRegistryKey and IoGetDeviceInterfaceAlias.

svn path=/trunk/; revision=7845
2004-01-23 18:00:53 +00:00
Eric Kohl
9f83325730 Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7844
2004-01-23 17:18:16 +00:00
Filip Navara
914db3cd4a Remove the empty strings to get the compilation working again with newer windres versions.
svn path=/trunk/; revision=7843
2004-01-23 16:56:44 +00:00
Filip Navara
2c02c69455 Fixed compiling (Buffer -> buffer).
svn path=/trunk/; revision=7842
2004-01-23 16:51:41 +00:00
Eric Kohl
6482583e26 Cleanup: Replace WINBOOL by BOOL
svn path=/trunk/; revision=7841
2004-01-23 16:37:11 +00:00
Gé van Geldorp
ada72d1210 Sync to Wine-20040121-plus-LARGE_INTEGER-patch
svn path=/trunk/; revision=7839
2004-01-23 14:31:36 +00:00
Eric Kohl
d1915fcb59 Implement basic administrator account creation and logon.
This is neither safe nor NT-compatible.

svn path=/trunk/; revision=7838
2004-01-23 10:47:22 +00:00
Eric Kohl
ffad6ce8ff Create the user-specific registry hive.
svn path=/trunk/; revision=7837
2004-01-23 10:39:22 +00:00
Eric Kohl
d1f3d3bb40 NtOpenKey() should return a better status value if the desired key does not exist.
svn path=/trunk/; revision=7836
2004-01-23 10:37:17 +00:00
Eric Kohl
8f96df5995 Implement basic administrator account creation and logon.
This is neither safe nor NT-compatible.

svn path=/trunk/; revision=7835
2004-01-23 10:35:52 +00:00
Eric Kohl
e5fc3cf116 Implement basic administrator account creation and logon.
This is either safe nor NT-compatible.

svn path=/trunk/; revision=7834
2004-01-23 10:33:21 +00:00
Richard Campbell
2e39d5d2d6 Added stubbed mpr.dll in an attempt to get mirc 6.12 to load.
svn path=/trunk/; revision=7833
2004-01-23 01:40:28 +00:00
Gé van Geldorp
ec55b104f6 w32api declares some shlwapi.h functions as documented in MSDN,
unfortunately the actual declaration in the PSDK is different. Since the
PSDK is our gold standard adjust our declarations to those in the PSDK.

svn path=/trunk/; revision=7832
2004-01-22 23:52:53 +00:00
Emanuele Aliberti
aeccf4ff73 Do not make NtSecureConnectPort fail: for now direct the call to NtConnectPort.
svn path=/trunk/; revision=7831
2004-01-22 21:56:48 +00:00
Filip Navara
3763ee7ad1 - Use English resources when no default locale is specified (Temporary fix).
- Added registry entry for the per user local setting.

svn path=/trunk/; revision=7830
2004-01-22 20:47:08 +00:00
Gé van Geldorp
029c2688e6 Sync with Wine-20040121
svn path=/trunk/; revision=7828
2004-01-22 20:35:25 +00:00
Gé van Geldorp
8625e94a7a Sync with Wine-20040121
svn path=/trunk/; revision=7827
2004-01-22 20:12:04 +00:00
Gé van Geldorp
6e5c492813 Sync with Wine-20040121
svn path=/trunk/; revision=7826
2004-01-22 18:52:01 +00:00
Gé van Geldorp
3b897823aa Sync with Wine-20040121
svn path=/trunk/; revision=7825
2004-01-22 18:45:19 +00:00
Gé van Geldorp
bcf21623ed Better fix for DPA heap problem
svn path=/trunk/; revision=7824
2004-01-22 16:02:56 +00:00
Eric Kohl
d55c5fe5b8 Check returned status codes.
svn path=/trunk/; revision=7823
2004-01-22 13:18:10 +00:00
Gunnar Dalsnes
9f32fb18b9 fix stupid bug
svn path=/trunk/; revision=7822
2004-01-22 12:39:01 +00:00
Martin Fuchs
d808a08b91 merged in commited shell32 WINE patch
svn path=/trunk/; revision=7821
2004-01-22 09:20:41 +00:00
Richard Campbell
a7f8f318e3 ifndef _ROS_
svn path=/trunk/; revision=7820
2004-01-22 01:38:43 +00:00
Eric Kohl
f4bafd97b4 Silenced a debug message.
svn path=/trunk/; revision=7819
2004-01-21 23:20:46 +00:00
Martin Fuchs
7bd7074cb3 merged back commit shell32 WINE patches
svn path=/trunk/; revision=7818
2004-01-21 23:01:35 +00:00
Martin Fuchs
0f8bd6db55 return 'My Compuer' PIDL for Desktop->ParseDisplayName()
svn path=/trunk/; revision=7817
2004-01-21 20:49:13 +00:00
Filip Navara
50cf00fdae Implemented GetUserDefaultLangID and GetUserDefaultLCID.Fixes bug #108.
svn path=/trunk/; revision=7816
2004-01-21 20:37:00 +00:00
Gé van Geldorp
467d22e64f Re-add Doxyfile which was deleted by mistake
svn path=/trunk/; revision=7815
2004-01-21 19:32:38 +00:00
Gé van Geldorp
561fa3d093 Update to FreeType 2.1.5
svn path=/trunk/; revision=7814
2004-01-21 19:23:49 +00:00
Casper Hornstrup
e47bd48591 2004-01-21 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apistatus.lst: Rename tdi.dll to tdi.sys.

svn path=/trunk/; revision=7813
2004-01-21 19:08:51 +00:00
Filip Navara
f6e5603bdb Minor fix in GlobalMemoryStatus to get some applications happy.
svn path=/trunk/; revision=7812
2004-01-21 18:57:21 +00:00
Filip Navara
f25f3c010a Fix bug #129. Unfortunetly this causes another bug to appear (that is not caused by this patch hopefully).
svn path=/trunk/; revision=7811
2004-01-21 18:39:24 +00:00
Filip Navara
e182b38c78 ndis.dll -> ndis.sys (fix bug #160)
svn path=/trunk/; revision=7810
2004-01-21 18:38:54 +00:00
Filip Navara
74722e09f0 Fix bug #166 ('FileDialog returns empty string or error in run from the start menu').
svn path=/trunk/; revision=7809
2004-01-21 18:38:53 +00:00
Filip Navara
593f004966 - Don't mix device and logical coordinates in NtUserBeginPaint.
- Use BF_FLAT style for DrawEdge when drawing WS_EX_STATICEDGE border.

svn path=/trunk/; revision=7807
2004-01-21 17:23:55 +00:00
Filip Navara
cad98f04c0 Another rewrite of the mouse detection code by Logan_V8_TT with minor changes by me to get it really working with my mouse. This version should solve the problem where the mouse wasn't moving and also the conflicts with serial port debugging.
svn path=/trunk/; revision=7806
2004-01-21 15:25:01 +00:00
Eric Kohl
5844d90709 Change location of videoprt.sys.
svn path=/trunk/; revision=7805
2004-01-21 12:19:47 +00:00
Gé van Geldorp
c651c68c2f Add taskmgr to distributed apps
svn path=/trunk/; revision=7804
2004-01-21 08:05:06 +00:00
Martin Fuchs
fd55bd2119 use #ifdef _ROS_ for latest drawing workaround
svn path=/trunk/; revision=7803
2004-01-21 08:02:51 +00:00
Gé van Geldorp
12996778d4 Reboot instead of shutdown at the end of 2nd stage setup.
svn path=/trunk/; revision=7800
2004-01-20 23:40:19 +00:00
Gé van Geldorp
8cd9e295fc Show warning screen at the end of setup, telling the user to wait until
the disk has been flushed. Fixes bug #110.

svn path=/trunk/; revision=7798
2004-01-20 23:39:06 +00:00
Gé van Geldorp
b95a905321 Correctly move hardware messages between private queues. Fixes bugs
#156 and #162.

svn path=/trunk/; revision=7796
2004-01-20 23:35:59 +00:00
Richard Campbell
aa31a3cd3a small workaround to get the edge around the systray to display properly.
svn path=/trunk/; revision=7795
2004-01-20 23:34:05 +00:00
Eric Kohl
efb3dc1194 Implement CreateProcessAsUser[A/W] and LogonUserW with a fake token.
svn path=/trunk/; revision=7793
2004-01-20 23:16:42 +00:00
Filip Navara
930507af17 Attempt to fix the display corruption problems when using bootvid.sys on certain HW.
svn path=/trunk/; revision=7792
2004-01-20 21:08:40 +00:00
Emanuele Aliberti
ed59770cae Ignore map file.
svn path=/trunk/; revision=7791
2004-01-20 20:44:30 +00:00
Thomas Bluemel
859e0dceee restored the blue.sys driver
svn path=/trunk/; revision=7790
2004-01-20 20:00:45 +00:00
Andrew Greenwood
9e88919457 2nd time lucky - MPU401 driver. Sorry about the previous breakage of blue :(
svn path=/trunk/; revision=7789
2004-01-20 19:58:48 +00:00
Andrew Greenwood
5c32f0ba7f This is a very basic implementation of a Sound Blaster driver for ReactOS. At present, it's capable of playing a buffer of silence when opened, but that's about all.
The MPU401 driver would normally be part of SNDBLST, but I decided to keep them separate, for now at least anyway. IIRC, this should play a MIDI note on startup.

Both drivers need a lot of work, but I'm committing what I've done so far, so other people can work on them as well as me :)

svn path=/trunk/; revision=7788
2004-01-20 19:35:59 +00:00
Martin Fuchs
90db7f8c36 even more funny icon arrangements
svn path=/trunk/; revision=7787
2004-01-20 19:07:28 +00:00
Filip Navara
0d1556f869 Changes based on the patch by Logan_V8_TT.
- Formating changes (TABs/spaces)
- Don't set 'Output Line 2' bit while power-uping the mouse during initalization.
- Restore 'Line Control' register at the end of mouse detection.
- Wait only 150000 millisecons (instead of 500000) for mouse power down.
- Enable detection of mouse on COM2 by default.

svn path=/trunk/; revision=7786
2004-01-20 15:18:27 +00:00
Eric Kohl
526b9ea0bc Moved logon-related functions to a separate file.
Replaced WINBOOL by BOOL.

svn path=/trunk/; revision=7785
2004-01-20 01:40:19 +00:00
Steven Edwards
cc650c435b Get the sound driver compiling again......
No it still doesnt work.

svn path=/trunk/; revision=7783
2004-01-20 00:29:48 +00:00
Martin Fuchs
1d8c431643 icon alignment algorithms
svn path=/trunk/; revision=7782
2004-01-20 00:17:24 +00:00
Gé van Geldorp
f14c8d5e08 Don't display extension for shortcuts in shell views
svn path=/trunk/; revision=7778
2004-01-19 20:56:26 +00:00
Gé van Geldorp
77600961c2 Small icon handle should be NULL if unavailable
svn path=/trunk/; revision=7776
2004-01-19 20:19:50 +00:00
Gé van Geldorp
ac9931e8b5 Icon for console windows
svn path=/trunk/; revision=7774
2004-01-19 20:14:28 +00:00
Gé van Geldorp
2a9ae29ea6 Fix title and description in "Start"/"Run" dialog (Bug #164)
svn path=/trunk/; revision=7772
2004-01-19 20:03:36 +00:00
Eric Kohl
c671ada626 Do not disconnect a hive root key from its parent key. The object manager will do this when the root key object gets closed.
svn path=/trunk/; revision=7769
2004-01-19 16:18:33 +00:00
Filip Navara
6e45aaa48b Moved videoprt driver to a new location and implemented few functions.
svn path=/trunk/; revision=7768
2004-01-19 15:56:53 +00:00
Martin Fuchs
ebbc9105dd merged back Wine commits
svn path=/trunk/; revision=7767
2004-01-19 06:56:55 +00:00
Gunnar Dalsnes
848b80b405 KiAcquire/ReleaseSpinLock adaption
svn path=/trunk/; revision=7766
2004-01-19 00:44:37 +00:00
Gé van Geldorp
1d53ea429e Show icons for shortcuts in shell views
svn path=/trunk/; revision=7765
2004-01-18 23:00:16 +00:00
Gé van Geldorp
917d9dbf90 ICO_ExtractIconsW should process icons in large/small pairs
svn path=/trunk/; revision=7763
2004-01-18 22:58:19 +00:00
Gunnar Dalsnes
d69891bf93 KiAcquire/ReleaseSpinLock adaption
svn path=/trunk/; revision=7762
2004-01-18 22:58:10 +00:00
Gunnar Dalsnes
d6b70d802e KiAcquire/ReleaseSpinLock adaption
svn path=/trunk/; revision=7760
2004-01-18 22:42:50 +00:00
Gunnar Dalsnes
f3c9b196a6 added KiAcquire/ReleaseSpinLock
svn path=/trunk/; revision=7759
2004-01-18 22:41:53 +00:00
Hartmut Birr
68ac8c2fb9 - Remove '\.\' sequences from destination file name in CabinetExtractFile.
svn path=/trunk/; revision=7758
2004-01-18 22:37:53 +00:00
Gunnar Dalsnes
11a4e44d62 KiAcquire/ReleaseSpinLock adaption
svn path=/trunk/; revision=7757
2004-01-18 22:35:26 +00:00
Hartmut Birr
703eb5e8c9 - Remove trailing '\' and '\.' sequences from directory names in CreateDirectory.
svn path=/trunk/; revision=7756
2004-01-18 22:34:40 +00:00
Gunnar Dalsnes
6c37271fd5 InsertAscendingList adaption
KiAcquire/ReleaseSpinLock adaption

svn path=/trunk/; revision=7755
2004-01-18 22:32:47 +00:00
Hartmut Birr
01b8638f08 - Check for illegal dot sequences in file and path names.
svn path=/trunk/; revision=7754
2004-01-18 22:31:23 +00:00
Gunnar Dalsnes
e7ec8c60bf InsertAscendingList adaption
svn path=/trunk/; revision=7753
2004-01-18 22:30:39 +00:00
Gunnar Dalsnes
28618ae6f8 added InsertAscending/DecendingListFIFO
simplified InsertAscending/DescendingList

svn path=/trunk/; revision=7752
2004-01-18 22:28:48 +00:00
Emanuele Aliberti
bec36ebaf9 Little changes to make PSX server compile again.
svn path=/trunk/; revision=7751
2004-01-18 21:27:32 +00:00
Emanuele Aliberti
35a330ecbd More credits in the RC file for pedump and shutdown.
svn path=/trunk/; revision=7750
2004-01-18 20:32:08 +00:00
Emanuele Aliberti
3768865685 Missing CVS ignore file.
svn path=/trunk/; revision=7749
2004-01-18 20:22:42 +00:00
Filip Navara
aab2f9e966 Removed prototype for nonexisting function.
svn path=/trunk/; revision=7747
2004-01-18 19:19:45 +00:00
Gé van Geldorp
8676b1e8f7 Make ILGetSize a STDCALL function
svn path=/trunk/; revision=7746
2004-01-18 19:09:15 +00:00
Martin Fuchs
eee4144825 moved setings dialogs in separate file
svn path=/trunk/; revision=7743
2004-01-18 18:45:26 +00:00
Martin Fuchs
5ac9d99859 fix for Bug #159
svn path=/trunk/; revision=7742
2004-01-18 18:44:31 +00:00
Martin Fuchs
2a335ec879 draw button control with original border; focus handling in property sheet
svn path=/trunk/; revision=7741
2004-01-18 16:23:55 +00:00
Martin Fuchs
83fb0172c0 removed test bitamp statics
svn path=/trunk/; revision=7740
2004-01-18 14:58:54 +00:00
Martin Fuchs
c78c696293 desktop settings dialog sheet (for now only too look at it - no real functionality)
svn path=/trunk/; revision=7739
2004-01-18 13:59:43 +00:00
Casper Hornstrup
5a57e066ec 2004-01-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/winebuild/spec32.c (BuildDef32File): Don't support private flag
	when cross-compiling.

svn path=/trunk/; revision=7737
2004-01-18 13:42:57 +00:00
Filip Navara
bffadccb2c - Bug fixes.
- NtUserDestroyWindow should destroy owned popup windows (Fixes some problems with Explorer menus).
- Changed WinPosSetWindowPos to take coordinates relative to parent, because it is used as such everywhere.

svn path=/trunk/; revision=7734
2004-01-18 08:29:31 +00:00
Richard Campbell
faaee8fe61 temp fix for windres compatibility issues.
svn path=/trunk/; revision=7732
2004-01-18 04:45:59 +00:00
Steven Edwards
a504f4dba3 Make Help->About call ShellAbout
svn path=/trunk/; revision=7731
2004-01-18 03:28:08 +00:00
Martin Fuchs
83ea26e456 property sheet dialogs
svn path=/trunk/; revision=7730
2004-01-18 00:33:53 +00:00
Gé van Geldorp
71a41b519c Leave room for terminating nul byte, fixes bug #148
svn path=/trunk/; revision=7729
2004-01-17 23:04:28 +00:00
Martin Fuchs
2ac3a79689 debug message for unimplemented popup menus
svn path=/trunk/; revision=7727
2004-01-17 20:13:41 +00:00
Martin Fuchs
98e32f5ac0 eliminated misleading GCC warning
svn path=/trunk/; revision=7726
2004-01-17 17:29:04 +00:00
Martin Fuchs
ea7bc6c78a output warning message before launching more than one program at one time
svn path=/trunk/; revision=7725
2004-01-17 17:25:18 +00:00
Martin Fuchs
dc141d9e7c added missing PIDL parameter for SHELL_FindExecutable()
svn path=/trunk/; revision=7724
2004-01-17 17:23:16 +00:00
Art Yerkes
5405cd7d70 Cross commits from the release branch. Serial echo option + local keyboard
mouse on/off.

svn path=/trunk/; revision=7723
2004-01-17 17:13:13 +00:00
Martin Fuchs
83da931554 fixed called to Unicode SHELL_FindExecutable()
svn path=/trunk/; revision=7721
2004-01-17 16:53:19 +00:00
Martin Fuchs
5a76bbd8ac context menu for desktop bar
svn path=/trunk/; revision=7720
2004-01-17 16:41:20 +00:00
Martin Fuchs
00a738fdfd allow only shell links to single objects
svn path=/trunk/; revision=7719
2004-01-17 16:08:38 +00:00
Martin Fuchs
acba5dbeef move fucnion declaration into header file
svn path=/trunk/; revision=7718
2004-01-17 16:06:33 +00:00
Gé van Geldorp
bfd145cda4 Patch by Hartmut Birr.
Allow building with newer windres (2.14.90 20030612)

svn path=/trunk/; revision=7717
2004-01-17 15:27:21 +00:00
Filip Navara
698d0a3be5 Preparing for the win32k emulated mouse cursor support.
svn path=/trunk/; revision=7714
2004-01-17 15:21:09 +00:00
Filip Navara
6020629df1 Fix window repainting - Attempt #2
svn path=/trunk/; revision=7713
2004-01-17 15:18:25 +00:00
Martin Fuchs
ef40097fff rename _FS_ProcessDisplayFilename to SHELL_FS_ProcessDisplayFilename() -> Wine naming rule for internal functions
svn path=/trunk/; revision=7712
2004-01-17 11:10:18 +00:00
Hartmut Birr
31273508a7 Fixed RtlImageDirectoryEntryToData.
svn path=/trunk/; revision=7711
2004-01-17 10:30:53 +00:00
Art Yerkes
c2d0df8688 Print userland addresses where possible in bugchecks, etc.
svn path=/trunk/; revision=7709
2004-01-17 03:19:35 +00:00
Gé van Geldorp
fa2b0ba8e3 Swap arguments of LocalAlloc and only update Malloc32 block on successful
allocation. Fixes bug #154.

svn path=/trunk/; revision=7707
2004-01-17 02:21:42 +00:00
Gé van Geldorp
c60de92aba Fix drawing of window move/resize rectangle in VMware
svn path=/trunk/; revision=7705
2004-01-17 01:04:45 +00:00
Martin Fuchs
2e1c823c7e last fix for RecursiveCreateDirectory()
svn path=/trunk/; revision=7703
2004-01-17 00:57:51 +00:00
Martin Fuchs
b5fec56137 fixed UNICODE RecursiveCreateDirectory()
svn path=/trunk/; revision=7702
2004-01-17 00:42:57 +00:00
Martin Fuchs
f3077c25b9 fixed RecursiveCreateDirectory()
svn path=/trunk/; revision=7701
2004-01-17 00:36:46 +00:00
Martin Fuchs
020f7d429d merged back WineHQ commit
svn path=/trunk/; revision=7700
2004-01-16 23:39:01 +00:00
Gé van Geldorp
25dfcd5244 Reset viewport stuff on DC release
svn path=/trunk/; revision=7699
2004-01-16 23:29:10 +00:00
Martin Fuchs
d073f772d1 merge back WineHQ commit
svn path=/trunk/; revision=7697
2004-01-16 23:23:38 +00:00
Martin Fuchs
a7406cc7a7 corrected TIME_NOSECONDS handling
svn path=/trunk/; revision=7696
2004-01-16 23:19:16 +00:00
Martin Fuchs
448af8f18a added locale resources
svn path=/trunk/; revision=7695
2004-01-16 23:09:01 +00:00
Martin Fuchs
182cd0377f don't clear GetTimeFormat() flags when calling RosGetTimeFormat()
svn path=/trunk/; revision=7694
2004-01-16 23:08:38 +00:00
Martin Fuchs
1c99ac5f74 Don't specify any specific time format for the clock.
svn path=/trunk/; revision=7693
2004-01-16 22:53:12 +00:00
Eric Kohl
7a72b1d1a7 Add creation of administrator profile.
svn path=/trunk/; revision=7692
2004-01-16 21:33:23 +00:00
Martin Fuchs
4e0b597dfa added language resources for english, german and french
svn path=/trunk/; revision=7691
2004-01-16 21:08:32 +00:00
Thomas Bluemel
9ef2c888de show <JUNCTION> "type" in dir listing
svn path=/trunk/; revision=7690
2004-01-16 19:58:47 +00:00
Thomas Bluemel
06866a65df show <JUNCTION> "type" in dir listing
svn path=/trunk/; revision=7689
2004-01-16 19:57:13 +00:00
Gé van Geldorp
660a7812d3 Serialize access to display driver. Fixes serious display corruption
with the VGA driver: drawing function starts and sets up VGA registers,
mouse moves and pointer needs to be redrawn for which VGA registers
are changed, then drawing function continues with wrong registers

svn path=/trunk/; revision=7688
2004-01-16 19:32:00 +00:00
Gé van Geldorp
0fd869efa8 Don't use RECTL structure in ntoskrnl
svn path=/trunk/; revision=7686
2004-01-16 15:39:28 +00:00
Eric Kohl
c97ad8c5de Create user profile directory by copying the default user directory.
Prepare to copy the default user hive.

svn path=/trunk/; revision=7684
2004-01-16 15:31:53 +00:00
Filip Navara
4dbcbd1b9d Fixed window activation bug (GA_ROOTOWNER -> GA_ROOT).
svn path=/trunk/; revision=7683
2004-01-16 13:28:29 +00:00
Gé van Geldorp
b91ffe51dc Patch by Filip Navara.
Fix window activation flickering

svn path=/trunk/; revision=7682
2004-01-16 13:26:26 +00:00
Gé van Geldorp
ade9a80f9a Store area touched by mouse pointer as this may be larger than the cursor
size. Fixes bug #63.

svn path=/trunk/; revision=7679
2004-01-16 13:18:23 +00:00
Gé van Geldorp
3fb858b15e Adjust for cabinet/oledlg
svn path=/trunk/; revision=7677
2004-01-16 13:08:56 +00:00
Mark Tempel
9d16b51f6b Add winfile back into the build.
svn path=/trunk/; revision=7676
2004-01-16 05:17:31 +00:00
Mark Tempel
c26a81328e Update makefile to build winfile again.
svn path=/trunk/; revision=7675
2004-01-16 05:12:03 +00:00
Mark Tempel
9b74fe4b28 Add the net apps back into the default build.
svn path=/trunk/; revision=7674
2004-01-16 04:44:41 +00:00
Mark Tempel
d57d41f1f8 Update ping to build again.
Remove some errors.

svn path=/trunk/; revision=7673
2004-01-16 04:43:19 +00:00
Mark Tempel
f1ec3f9804 Update finger to build again.
svn path=/trunk/; revision=7672
2004-01-16 04:42:06 +00:00
Mark Tempel
d236f9c5f7 Update to build snmpapi.a
svn path=/trunk/; revision=7671
2004-01-16 04:35:07 +00:00
Mark Tempel
f118079b90 Update to add in some typedefs needed my winsock2.h
svn path=/trunk/; revision=7670
2004-01-16 03:41:13 +00:00
Mark Tempel
aab70138d5 Update to add in some typedefs needed my winsock2.h
svn path=/trunk/; revision=7669
2004-01-16 03:35:03 +00:00
Thomas Bluemel
0cf7978c58 Draw window icons into the title bar.
However SendMessageTimeout() needs to be implemented to get it working properly (and also DrawIconEx() has to be extended to use StretchBlt() in order to get drawing big icons poperly.

svn path=/trunk/; revision=7668
2004-01-15 22:33:30 +00:00
Gé van Geldorp
304b25bbb6 Allow building with released 2.4 w32api and current pre-2.5 CVS w32api
svn path=/trunk/; revision=7667
2004-01-15 22:21:36 +00:00
Martin Fuchs
b125070d51 remove unused variable 'commandlen'
svn path=/trunk/; revision=7666
2004-01-15 22:20:57 +00:00
Martin Fuchs
17198161b0 use return value of GetLocaleInfoW() in GetTimeFormatW()
svn path=/trunk/; revision=7665
2004-01-15 22:10:29 +00:00
Martin Fuchs
41fd456b47 - merged in WineHQ's shell32 commit about "Get rid of W->A calls for shlexec" and FindExecutableW()
- fixed some errors with wrong buffer lengths for wide character strings when calling RegQueryValueW()

svn path=/trunk/; revision=7664
2004-01-15 22:09:33 +00:00
Gé van Geldorp
c15141cd94 Patch by Filip Navara.
- Unlock DC in error case.

svn path=/trunk/; revision=7663
2004-01-15 21:03:05 +00:00
Gé van Geldorp
a51baa3efc Patch by Filip Navara.
- Fixed foolish comparing of window handle and pointer.
- Fixed dereferencing of not referenced window in WinPosSetWindowPos.

svn path=/trunk/; revision=7662
2004-01-15 21:02:39 +00:00
Gé van Geldorp
78bad70f56 Patch by Filip Navara
- Removed nonsense code for activating invisible windows in NtUserCreateWindowEx.

svn path=/trunk/; revision=7661
2004-01-15 21:02:09 +00:00
Gé van Geldorp
c2b74fc86f Patch by Filip Navara.
- Don't ask twice for window from the same specified point.

svn path=/trunk/; revision=7660
2004-01-15 21:01:40 +00:00
Gé van Geldorp
1ccba09119 Patch by Filip Navara.
- Don't try to move window on the top if it is already.
- Removed small block of commented-out code.
- Activated the message queue locking which caused dead-lock earlier.

svn path=/trunk/; revision=7659
2004-01-15 21:00:49 +00:00
Gé van Geldorp
aded6947aa Patch by Filip Navara.
- Fixed IsChild.

svn path=/trunk/; revision=7658
2004-01-15 20:59:57 +00:00
Gé van Geldorp
6afe5b36ec Patch by Filip Navara.
- Work on correctly activating the MDI child windows.

svn path=/trunk/; revision=7657
2004-01-15 20:59:35 +00:00
Gé van Geldorp
077f983899 Fix VGA display corruption caused by mouse pointer
svn path=/trunk/; revision=7649
2004-01-15 16:29:10 +00:00
Eric Kohl
9595c8617b Implemented most of the user profile creation.
svn path=/trunk/; revision=7646
2004-01-15 14:59:06 +00:00
Eric Kohl
4a42875891 Resorted dlls and made libwine a static library.
svn path=/trunk/; revision=7645
2004-01-15 10:32:19 +00:00
Eric Kohl
9dfb5ee1cc Fixed a potential cause of registry corruption in NtSetValueKey():
- Mark all modified cells dirty.
- Allocate value cell after value list cell has been created or resized.

svn path=/trunk/; revision=7643
2004-01-15 09:26:56 +00:00
Martin Fuchs
c6f4c292e9 changed comment to a better description
svn path=/trunk/; revision=7642
2004-01-15 08:29:15 +00:00
Mark Tempel
0acbe2acf6 Really fix the make file this time (and add the maze demo back in :) )
svn path=/trunk/; revision=7641
2004-01-15 06:36:44 +00:00
Mark Tempel
4729e23087 Remove finger from the list of apps to build. This allows the apps list to make untill the header issues involved with network applications can be worked out.
svn path=/trunk/; revision=7640
2004-01-15 06:32:25 +00:00
Mark Tempel
4f49fbcdbc Update to remove a bit of MFC style preprocessor abuse to get this application to compile.
svn path=/trunk/; revision=7639
2004-01-15 05:27:18 +00:00
Gé van Geldorp
f3691049d8 Bump version number on HEAD
svn path=/trunk/; revision=7635
2004-01-14 23:40:14 +00:00
Richard Campbell
782a2efe59 changed explorer slightly
svn path=/trunk/; revision=7633
2004-01-14 23:28:33 +00:00
Gé van Geldorp
490c55529b Set explorer as default shell
svn path=/trunk/; revision=7632
2004-01-14 23:21:31 +00:00
Gé van Geldorp
0a8c4b149b Add creation of command prompt shortcut on desktop
svn path=/trunk/; revision=7631
2004-01-14 23:17:50 +00:00
Gé van Geldorp
89cfa2f16d Fix crash when clicking outside any button
svn path=/trunk/; revision=7630
2004-01-14 23:16:59 +00:00
Gé van Geldorp
95adb6598c Return nTrackPos if requested
svn path=/trunk/; revision=7629
2004-01-14 22:18:35 +00:00
Gé van Geldorp
1ec39bbe83 Rename SEVERITY_* constants to SYSSETUP_SEVERITY_* to avoid naming conflict
svn path=/trunk/; revision=7628
2004-01-14 22:15:09 +00:00
Richard Campbell
73b055af44 added small FIXME note.
svn path=/trunk/; revision=7627
2004-01-14 21:41:24 +00:00
Richard Campbell
da051e4b51 Implement GetLocaleInfoW
svn path=/trunk/; revision=7626
2004-01-14 21:40:12 +00:00
Gé van Geldorp
fa6209cc0f Scrollbar implementation
svn path=/trunk/; revision=7625
2004-01-14 21:28:25 +00:00
Richard Campbell
eb5f406f20 use GetTimeFormat for explorer, since it displays time properly for the most part.
svn path=/trunk/; revision=7624
2004-01-14 20:21:16 +00:00
Filip Navara
9f007e7037 Size optimalizations.
svn path=/trunk/; revision=7623
2004-01-14 16:38:15 +00:00
Richard Campbell
f43df06422 implemented GetTimeFormat, loosely based off from wine, still broken though. This might not be 100% correct, but it compiles and doesn't crash, i'll go over it and implement the functions it depends on tomorrow.
svn path=/trunk/; revision=7622
2004-01-14 07:22:17 +00:00
Steven Edwards
f05da1af6e Added taskmgr, oledlg and cabinet in time for 0.2......
svn path=/trunk/; revision=7621
2004-01-14 02:14:46 +00:00
Steven Edwards
f06451968c Updated the WINE porting Readme for 0.2 Release
svn path=/trunk/; revision=7620
2004-01-14 02:08:32 +00:00
Steven Edwards
fc98d15686 Ported oledlg.dll from WINE
svn path=/trunk/; revision=7619
2004-01-14 01:55:00 +00:00
Steven Edwards
5ce6d8afc9 Ported cabinet.dll ported from WINE.
svn path=/trunk/; revision=7618
2004-01-14 01:47:46 +00:00
Steven Edwards
ee78d6302f Added fci/fdi.h as w32api would not accept Cabinet support headers.
svn path=/trunk/; revision=7617
2004-01-14 01:47:01 +00:00
Martin Fuchs
a40cb5023f automatically adjusted size of notification area and quicklaunch bar in desktop bar
svn path=/trunk/; revision=7616
2004-01-13 23:35:47 +00:00
Gé van Geldorp
61b6e0fe14 Install more DLLs
svn path=/trunk/; revision=7615
2004-01-13 22:04:31 +00:00
Filip Navara
109bff5226 Better palette generating algorithm.
svn path=/trunk/; revision=7614
2004-01-13 19:45:31 +00:00
Hartmut Birr
1057df8763 - Fixed the month of the date on the image.
- Used the last write time for the time value on the image.

svn path=/trunk/; revision=7612
2004-01-13 19:25:03 +00:00
Hartmut Birr
a07bc80d2e - Fixed the handling of command line parameters between quotes.
svn path=/trunk/; revision=7611
2004-01-13 18:16:05 +00:00
Steven Edwards
7f8041c8b9 Fix building with DBG = 1
svn path=/trunk/; revision=7610
2004-01-13 17:24:41 +00:00
Filip Navara
42c7da6d23 Removed file that accidently got into CVS.
svn path=/trunk/; revision=7609
2004-01-13 17:22:49 +00:00
Filip Navara
64f4bcec4e Fixed.
svn path=/trunk/; revision=7608
2004-01-13 17:19:28 +00:00
Filip Navara
bc0b751b2b Initial version of generic framebuffer display driver.
svn path=/trunk/; revision=7607
2004-01-13 17:18:33 +00:00
Filip Navara
e1815888c5 Scrollbar redrawing fix.
svn path=/trunk/; revision=7606
2004-01-13 17:14:38 +00:00
Filip Navara
6fec87f961 Removed some nonsense code that has no effect.
svn path=/trunk/; revision=7605
2004-01-13 17:13:48 +00:00
Eric Kohl
208e3769eb Add user profile directory functions.
Create user profile directories from registry.

svn path=/trunk/; revision=7604
2004-01-13 12:34:09 +00:00
Eric Kohl
992dc83fd2 Moved a lot of registry settings around.
svn path=/trunk/; revision=7603
2004-01-13 12:30:54 +00:00
Eric Kohl
46059ee5d0 Cleaned up NtSetValueKey() and NtQueryValueKey().
Made CmiScanKeyForValue() more robust.

svn path=/trunk/; revision=7602
2004-01-13 12:29:27 +00:00
Richard Campbell
bc5e5cf2fd a small reversion from other mod that wasn't committed.
svn path=/trunk/; revision=7601
2004-01-13 05:14:19 +00:00
Richard Campbell
22d27ef5ec - Modified Tray Notify area and quicklaunch size to be smaller (to accomodate the 640x480 of the standard vga driver in ROS). NOTE that this really needs to autosize based on contents.
- Format the time for your specific locale.  This allows 12 hour clock under windows, note that the function used probably isn't implemented in ROS. *not committed, not committing until after 0.2 is released*

svn path=/trunk/; revision=7600
2004-01-13 05:09:41 +00:00
Art Yerkes
a9582ff53d Proper search for lines and files as with functions.
svn path=/trunk/; revision=7599
2004-01-13 03:43:01 +00:00
Art Yerkes
2b806f43c8 Re-enabled stabs reading in the kernel debugger.
In ke/main.c, stabs for boot time drivers that were loaded with the kernel
are linked and enabled before calling KdbInit, so that the user has them
available.

In ldr, drivers are now loaded with their symbols if available.  This applies
to userland dlls, too.

I added DEL as well as backspace to the keys that cause the cursor to back
up in kdb.

The 'addr' command in kdb now prints a correct address (with symbol
info if available).

The kernel stack trace printer in exp.c now uses kdb to print addresses if
it was enabled.

svn path=/trunk/; revision=7598
2004-01-13 03:23:11 +00:00
Steven Edwards
e1399c5621 Added notepad ported from WINE. Not built by default but its there
if you want to edit your code under ROS without a reboot.

We should move this to where ever the apps realy belong......
subsys/system? apps/utils?.......

svn path=/trunk/; revision=7597
2004-01-13 00:01:52 +00:00
Steven Edwards
c24c294c02 Added -D__REACTOS__
svn path=/trunk/; revision=7596
2004-01-12 23:48:37 +00:00
Steven Edwards
5dbcaef65b Added comdlg32.dll and imm32.dll to the build.
svn path=/trunk/; revision=7595
2004-01-12 23:47:51 +00:00
Steven Edwards
d429625fea Fixed comdlg32.dll under ReactOS
Start -> Run -> Browse now works in explorer even if its slow.

svn path=/trunk/; revision=7594
2004-01-12 23:46:20 +00:00
Steven Edwards
aa5d25239a Some minor addons to work around missing things in w32api.
svn path=/trunk/; revision=7593
2004-01-12 23:44:24 +00:00
Steven Edwards
4e26cd81eb Add a semi-working stub of GetDefaultPrinter[A/W] ported from WINE.
This isnt right but its needed to get comdlg32.dll working.

svn path=/trunk/; revision=7592
2004-01-12 23:42:23 +00:00
Martin Fuchs
27e99ffec4 use system image list instead of discrete icons as far as possible
svn path=/trunk/; revision=7591
2004-01-12 23:03:38 +00:00
Steven Edwards
f4ee51ec85 Build fixes for w32api.
svn path=/trunk/; revision=7590
2004-01-12 22:45:53 +00:00
Gé van Geldorp
08277c1b6a Rewrite loop so it can't be optimized away. Patch by Mike Nordell
svn path=/trunk/; revision=7589
2004-01-12 22:36:04 +00:00
Gé van Geldorp
a07586dc9d Try harder to find another window to activate, fixes bug #127
svn path=/trunk/; revision=7588
2004-01-12 22:26:00 +00:00
Filip Navara
02fb8db0d0 Temporary reverted my last painting change before I'll do it the right way.
svn path=/trunk/; revision=7587
2004-01-12 21:24:20 +00:00
Filip Navara
54beec6da4 Minor fix.
svn path=/trunk/; revision=7586
2004-01-12 20:52:37 +00:00
Gé van Geldorp
b3828d8c73 Remove debugging cruft
svn path=/trunk/; revision=7585
2004-01-12 20:51:05 +00:00
Gé van Geldorp
e5d2f4623c Handle mouse activation of windows by setting it (or its ancestor) as
foreground window instead of only focus window

svn path=/trunk/; revision=7584
2004-01-12 20:48:48 +00:00
Martin Fuchs
63179798b9 support for pos1/end in keyboard navigation
svn path=/trunk/; revision=7583
2004-01-12 20:46:01 +00:00
Gé van Geldorp
117693c338 WA_* is stored in wParam, not lParam
svn path=/trunk/; revision=7582
2004-01-12 20:38:59 +00:00
Thomas Bluemel
fb7c647040 fixed GetVolumeInformationW(), GetDiskFreeSpaceW() and GetDiskFreeSpaceExW()
svn path=/trunk/; revision=7581
2004-01-12 20:02:42 +00:00
Eric Kohl
1631cca917 Reverted most of the changes from 2004-01-08.
Fixed buggy key enumeration for volatile and 'foreign' keys.

svn path=/trunk/; revision=7580
2004-01-12 12:52:27 +00:00
Gé van Geldorp
314759a953 Display both cmd.exe version and OS version when running under ReactOS
svn path=/trunk/; revision=7579
2004-01-12 11:06:27 +00:00
Gé van Geldorp
8f153a5029 Include build no in szCSDVersion
svn path=/trunk/; revision=7578
2004-01-12 11:05:38 +00:00
Gé van Geldorp
ddf0217684 Change build number to current YYYYMMDD, include state (CVS, RC, FINAL)
in version

svn path=/trunk/; revision=7577
2004-01-12 00:22:35 +00:00
Filip Navara
4a55551375 Fixes on paining code to get PuTTY and RegEdit working correctly.
svn path=/trunk/; revision=7576
2004-01-12 00:07:34 +00:00
Martin Fuchs
2a72140cb1 keyboard navigation in start menu
svn path=/trunk/; revision=7575
2004-01-11 22:20:59 +00:00
Filip Navara
f784ea6e51 Workaround for W32API bug.
svn path=/trunk/; revision=7574
2004-01-11 21:42:54 +00:00
Filip Navara
73b404c2ea - Removed some obsolete headers.
- Converted some of the (mostly network) stuff to compile with W32API.

svn path=/trunk/; revision=7573
2004-01-11 20:46:06 +00:00
Gé van Geldorp
881fd1b420 Do a dummy BitBlt at the end of a MaskBitBlt to inform the driver that
a region was updated. Fixes bug #125

svn path=/trunk/; revision=7572
2004-01-11 19:52:27 +00:00
Gé van Geldorp
e98f4ce2f0 Auto-detect whether to create a GUI or a TUI console
svn path=/trunk/; revision=7571
2004-01-11 17:31:16 +00:00
Emanuele Aliberti
0307fd628b Little program to report how NT stati are converted into a Win32 error code by NTDLL. Running it under real NT 4.0/5.x and under ROS will show the differences.
svn path=/trunk/; revision=7570
2004-01-11 17:06:21 +00:00
Martin Fuchs
fecf52f44e removed unnecessary commented out lines
svn path=/trunk/; revision=7569
2004-01-11 12:34:34 +00:00
Martin Fuchs
ad4a39e88a removed C++ comments
svn path=/trunk/; revision=7568
2004-01-11 12:24:56 +00:00
Martin Fuchs
3d13a75874 RecursiveCreateDirectory()
svn path=/trunk/; revision=7567
2004-01-11 11:59:22 +00:00
Martin Fuchs
bd31a6dcde adjustments for building in Wine; eliminated compiler warnings
svn path=/trunk/; revision=7566
2004-01-11 11:40:50 +00:00
Hartmut Birr
22c683b088 - Fixed the binary search in _dosmaperr.
svn path=/trunk/; revision=7565
2004-01-11 10:58:45 +00:00
Martin Fuchs
90c35972de re-inserted execfuncparameter for SHELL_Execute16()
svn path=/trunk/; revision=7564
2004-01-11 09:39:00 +00:00
Gé van Geldorp
98f8c7a3cc Print args of DPRINT and DPRINT1 too
svn path=/trunk/; revision=7563
2004-01-11 01:43:18 +00:00
Gé van Geldorp
5eef2adaff Silence debug message when DeleteObject()ing a NULL object
svn path=/trunk/; revision=7562
2004-01-11 01:42:08 +00:00
Hartmut Birr
bc6f5312c7 - Fixed a wrong parameter in a call to LdrpLoadUserModuleSymbols.
svn path=/trunk/; revision=7561
2004-01-11 00:25:17 +00:00
Martin Fuchs
adfc55b3cf fixes for many ShellExecute() problems
svn path=/trunk/; revision=7560
2004-01-10 23:01:48 +00:00
Gé van Geldorp
ad5496bb9b Use IntLPtoDP instead of NtGdiLPtoDP since kernel addresses are passed
svn path=/trunk/; revision=7559
2004-01-10 21:59:05 +00:00
Filip Navara
449966544c Minor cleanup.
svn path=/trunk/; revision=7558
2004-01-10 21:46:25 +00:00
Art Yerkes
225fb101e7 Added javascript initialization.
svn path=/trunk/; revision=7557
2004-01-10 21:14:39 +00:00
Art Yerkes
38758dfce7 Added kjs system to the kernel.
svn path=/trunk/; revision=7556
2004-01-10 21:06:38 +00:00
Art Yerkes
a047e3ecf5 Added usage document.
svn path=/trunk/; revision=7555
2004-01-10 21:04:49 +00:00
Art Yerkes
f48739f395 Added kjs -- The kernel javascript system.
This system allows the kernel debugger to be scripted with the new js
command.

Functions for reading and writing memory, as well as reading the module
list, the registry, and the trap frame registers are provided.  A simple
mechanism is provided for reading javascript initialization from the
registry so that the user may provide custom functions for use during
debugging sessions.

I have already used it to find a bug in kdb itself; as well as to list
sections in modules and perform various other tedious tasks often
required while debugging linked lists, etc.

This is a static library that will be built when KDBG=1, and linked
with ntoskrnl.

svn path=/trunk/; revision=7554
2004-01-10 20:38:18 +00:00
Martin Fuchs
0d8f07c6a3 ShellExecute...(): expand environment strings
svn path=/trunk/; revision=7553
2004-01-10 17:32:32 +00:00
Martin Fuchs
3a8b4c506b fix for incorrect start directories
svn path=/trunk/; revision=7552
2004-01-10 17:09:43 +00:00
Martin Fuchs
877d88090f prepare hidden startmenu to enhance responsivness
svn path=/trunk/; revision=7551
2004-01-10 17:08:31 +00:00
Filip Navara
e7e924134c Modified the location of VGA driver.
svn path=/trunk/; revision=7550
2004-01-10 15:49:55 +00:00
Filip Navara
902f9f5ba3 Removed the VGA driver from the old location.
svn path=/trunk/; revision=7549
2004-01-10 14:42:20 +00:00
Filip Navara
095ab8c8dd Moved video drivers to a separate directory and added initial version of VBE miniport driver.
svn path=/trunk/; revision=7548
2004-01-10 14:39:21 +00:00
Hartmut Birr
cba93d012e - Fixed the freeing of boot driver memory if KDBG is defined.
svn path=/trunk/; revision=7547
2004-01-10 14:24:30 +00:00
Hartmut Birr
deb18d2120 - Check first for string length and second for the string end in string/stringw.
svn path=/trunk/; revision=7546
2004-01-10 14:22:14 +00:00
Gé van Geldorp
7da5a1aca6 Pass inheritable attribute on to kernel
svn path=/trunk/; revision=7545
2004-01-10 13:54:52 +00:00
Martin Fuchs
6b88f5285f merged WineHQ changes
svn path=/trunk/; revision=7544
2004-01-10 10:35:52 +00:00
Art Yerkes
091c63fe23 These former stubs are now defined in fillshap.c
ExtFloodFill
FloodFill

svn path=/trunk/; revision=7543
2004-01-10 02:57:08 +00:00
Steven Edwards
c7fc094e9d Removed taskmgr.
svn path=/trunk/; revision=7542
2004-01-10 02:15:50 +00:00
Steven Edwards
04ee7024f3 Moved taskmgr from rosapps to reactos module for 0.2 release.
svn path=/trunk/; revision=7541
2004-01-10 02:14:13 +00:00
Richard Campbell
8d2d328ced Moved (Ext)FloodFill to fillshap.c and have it call NtGdi(Ext)FloodFill
svn path=/trunk/; revision=7540
2004-01-10 02:10:27 +00:00
Richard Campbell
dc9be66534 FloodFill now calls ExtFloodFill with FLOODFILLBORDER, though this is rather pointless as ExtFloodFill isn't implemented.
svn path=/trunk/; revision=7539
2004-01-10 01:50:49 +00:00
Steven Edwards
919d5a7811 Added -D__REACTOS__
svn path=/trunk/; revision=7538
2004-01-10 00:39:52 +00:00
Steven Edwards
7a53ba6050 Removed the last of the C++ style comments. Adjusted the coding style a bit.
svn path=/trunk/; revision=7537
2004-01-09 23:00:43 +00:00
Gé van Geldorp
2c6c5f8a32 Silence debug message
svn path=/trunk/; revision=7536
2004-01-09 22:52:30 +00:00
Steven Edwards
17a2022200 Convert the last of Task Manager from C++ to C.
Patch by Eric Pouech.

svn path=/trunk/; revision=7535
2004-01-09 22:28:32 +00:00
Gé van Geldorp
3ca5b12bca Add needed libs
svn path=/trunk/; revision=7534
2004-01-09 21:54:24 +00:00
Gé van Geldorp
c2ae3f1124 Never try to stuff more into the Ioctl OutputBuffer than will fit
svn path=/trunk/; revision=7533
2004-01-09 20:22:38 +00:00
Gé van Geldorp
42367670aa IOCTL_DISK_SET_DRIVE_LAYOUT doesn't return any info so leave Information at 0
svn path=/trunk/; revision=7532
2004-01-09 20:21:31 +00:00
Eric Kohl
ed1971f7c3 Add userenv.dll
svn path=/trunk/; revision=7531
2004-01-09 20:06:47 +00:00
Eric Kohl
14eeda1399 Initialize profiles.
svn path=/trunk/; revision=7530
2004-01-09 20:05:04 +00:00
Eric Kohl
0a3b04610c Add userenv.dll
svn path=/trunk/; revision=7529
2004-01-09 19:55:29 +00:00
Eric Kohl
a2e92f560f Create profile directories.
svn path=/trunk/; revision=7528
2004-01-09 19:52:01 +00:00
Eric Kohl
27044f2ad0 Store hive root key name.
Patch partially by Filip Navara.

svn path=/trunk/; revision=7527
2004-01-09 19:44:45 +00:00
Eric Kohl
cff5149eca Do not dereference key objects if they are used to link hives.
svn path=/trunk/; revision=7526
2004-01-09 19:42:40 +00:00
Steven Edwards
8450d1eb80 Changed /NOBOOTSCREEN to /NOGUIBOOT to be
command-line compatible with 2k and XP.

svn path=/trunk/; revision=7525
2004-01-09 17:29:27 +00:00
Steven Edwards
508aa36d5f Changed /NOBOOTSCREEN to /NOGUIBOOT to be
command-line compatible with 2k and XP.

svn path=/trunk/; revision=7524
2004-01-09 17:16:26 +00:00
Aleksey Bragin
586bc7a1fb Johannes Olofsson's swedish keyboard dll (kbdse.dll)
svn path=/trunk/; revision=7523
2004-01-09 13:18:37 +00:00
Martin Fuchs
b580695359 some more ShellExecuteEx() refactoring
svn path=/trunk/; revision=7522
2004-01-09 09:40:59 +00:00
Steven Edwards
e26802329f Added dlgs.h for port of comdlg32.dll
svn path=/trunk/; revision=7521
2004-01-09 02:00:55 +00:00
Steven Edwards
cdb174eccc Ported comdlg32.dll from Wine. There are still a few minor bugs with it.
svn path=/trunk/; revision=7520
2004-01-09 01:58:22 +00:00
Steven Edwards
3c18dfae6f Code cleanup for the Winelib port by Eric Pouech.
svn path=/trunk/; revision=7519
2004-01-09 01:45:06 +00:00
Martin Fuchs
25cfe47ab8 some refactoring for ShellExecuteEx()
svn path=/trunk/; revision=7518
2004-01-09 00:09:29 +00:00
Filip Navara
512aeb1b33 Don't use uninitialized variable in CmiAddKeyToHashTable. Patch by Mike Nordell.
svn path=/trunk/; revision=7517
2004-01-08 22:39:51 +00:00
Filip Navara
9384f583e0 Fix for bug #138.
svn path=/trunk/; revision=7516
2004-01-08 20:59:42 +00:00
Gé van Geldorp
8f41100a91 Re-enable assert
svn path=/trunk/; revision=7515
2004-01-08 20:39:29 +00:00
Gé van Geldorp
13713116d5 MIM_MENUDATA is now defined in w32api CVS HEAD
svn path=/trunk/; revision=7514
2004-01-08 20:31:11 +00:00
Gé van Geldorp
6e186d661c Fix compile-time error when compiling with DBG
svn path=/trunk/; revision=7513
2004-01-08 20:23:20 +00:00
Jason Filby
acf679a8bc Save eax in interrupt_handler2d(). Patch by Mike Nordell.
svn path=/trunk/; revision=7512
2004-01-08 18:54:12 +00:00
Jason Filby
2b0c6570ca Add a _commit() to fflush() functions. As advised by Mike Nordell.
svn path=/trunk/; revision=7511
2004-01-08 18:42:44 +00:00
Eric Kohl
0dd0b373bc Use a list to store linked hives.
Enable enumeration of linked hive root keys.
Patch partially written by Filip Navara.

svn path=/trunk/; revision=7510
2004-01-08 15:02:45 +00:00
Eric Kohl
f35801a5a9 Store hive root key name.
Patch partially by Filip Navara.

svn path=/trunk/; revision=7509
2004-01-08 14:57:17 +00:00
Eric Kohl
b576ae3681 Fixed exports
svn path=/trunk/; revision=7508
2004-01-08 14:55:12 +00:00
Martin Fuchs
22922dec07 SHELL_SHGetPathFromIDList()
svn path=/trunk/; revision=7507
2004-01-07 23:34:08 +00:00
Martin Fuchs
01c51c2aab preciser error codes for some shell functions
svn path=/trunk/; revision=7506
2004-01-07 21:48:29 +00:00
Martin Fuchs
18f935cbb8 create quicklaunch dir it it does not already exist
svn path=/trunk/; revision=7505
2004-01-07 21:22:52 +00:00
Emanuele Aliberti
f6f1650b2b Minor changes for NT compatibility.
svn path=/trunk/; revision=7504
2004-01-07 21:13:22 +00:00
Filip Navara
eda6d2e794 Move to a new line in EngDebugPrint.
svn path=/trunk/; revision=7503
2004-01-07 19:24:37 +00:00
Steven Edwards
09a23ffea3 Compleated the update of the license headers and converted most
of the rest of the C++ style comments to C.

svn path=/trunk/; revision=7502
2004-01-07 18:57:22 +00:00
Emanuele Aliberti
f45476a7fb Copyright years: 1998-2004.
svn path=/trunk/; revision=7501
2004-01-07 11:14:11 +00:00
Hartmut Birr
f38b2b2f0a - Added 'image file execution options' for loadlib.exe to print some infos while a dll is loading.
svn path=/trunk/; revision=7500
2004-01-07 10:18:21 +00:00
Hartmut Birr
c7d94ffc7c - Fixed the hex conversion in RtlUnicodeStringToInteger.
svn path=/trunk/; revision=7499
2004-01-07 10:11:03 +00:00
Hartmut Birr
446ec6d27b - Implemented fast loading of bounded images.
- Implemented handling of tls sections.
- Fixed referencing of loaded dlls.

svn path=/trunk/; revision=7498
2004-01-07 10:09:03 +00:00
Martin Fuchs
d3fbd8e582 declared SHCoCreateInstance()
svn path=/trunk/; revision=7497
2004-01-07 08:48:02 +00:00
Martin Fuchs
0e1aea5234 merge in WineHQ changes
svn path=/trunk/; revision=7496
2004-01-07 07:43:19 +00:00
Martin Fuchs
c7b79d1742 hopefully the last fix for _SHGetPathFromIDListA/W() to be compatible with MS Windows and make control panel icons reappear
svn path=/trunk/; revision=7495
2004-01-06 22:40:53 +00:00
Martin Fuchs
4f28875a40 take over Alexandre's better solution for LPSHELLEXECUTEINFOA
svn path=/trunk/; revision=7494
2004-01-06 22:15:15 +00:00
Martin Fuchs
df4c7c8464 implemented IShellExecuteHook for control panel
svn path=/trunk/; revision=7493
2004-01-06 21:33:12 +00:00
Martin Fuchs
35e2c06791 implemented IShellExecuteHook for control panel
svn path=/trunk/; revision=7492
2004-01-06 21:33:12 +00:00
Martin Fuchs
95d7074a7f merged WineHQ correction for SHCoCreateInstance()
svn path=/trunk/; revision=7491
2004-01-06 21:31:27 +00:00
Martin Fuchs
6cd1349c6a merged WinHQ Makefile optimization
svn path=/trunk/; revision=7490
2004-01-06 21:30:29 +00:00
Martin Fuchs
38883fca0b some small improvements
svn path=/trunk/; revision=7489
2004-01-06 21:27:28 +00:00
Martin Fuchs
769315c915 define interface IShellExecuteHook
svn path=/trunk/; revision=7488
2004-01-06 17:21:34 +00:00
Martin Fuchs
41e10d4931 use _vsnprintf() instead of vsnprintf()
svn path=/trunk/; revision=7487
2004-01-06 17:19:55 +00:00
Martin Fuchs
903c2007e0 include <wine/port.h> header file
svn path=/trunk/; revision=7486
2004-01-06 17:13:24 +00:00
Martin Fuchs
163af77b0b implemented wine_dbg_sprintf()
svn path=/trunk/; revision=7485
2004-01-06 16:44:51 +00:00
Martin Fuchs
a67fb59c6e declared wine_dbg_sprintf()
svn path=/trunk/; revision=7484
2004-01-06 16:38:40 +00:00
Eric Kohl
d4973a4ea4 Moved some Nt/Zw functions and types.
svn path=/trunk/; revision=7483
2004-01-06 16:11:57 +00:00
Martin Fuchs
409b6b7682 call QueryInterface for Desktop in SHBindToParent()
svn path=/trunk/; revision=7482
2004-01-06 15:53:06 +00:00
Martin Fuchs
7cf14adb77 FIXME for CreateProcess(): use CurDir to search for the executable file in the new working directory in GetFileName()
svn path=/trunk/; revision=7481
2004-01-06 13:47:01 +00:00
Martin Fuchs
db725ea7e2 correct implementation of SHGetRealIDL()
svn path=/trunk/; revision=7480
2004-01-06 13:32:57 +00:00
Thomas Bluemel
0c5f9ff854 fixed compiling problems
svn path=/trunk/; revision=7479
2004-01-06 12:45:46 +00:00
Martin Fuchs
fff71811fe fixed string length in RenderFILENAMEW()
svn path=/trunk/; revision=7478
2004-01-06 12:34:17 +00:00
Martin Fuchs
a113fd463b FIXME comment for SHGetSetSettings()
svn path=/trunk/; revision=7477
2004-01-06 11:46:32 +00:00
Martin Fuchs
246790dff7 renamed PathYetAnotherMakeUniqueNameA() to PathYetAnotherMakeUniqueName()
svn path=/trunk/; revision=7476
2004-01-06 11:46:12 +00:00
Martin Fuchs
b9107ed69d implemented SHGetRealIDL()
svn path=/trunk/; revision=7475
2004-01-06 11:45:37 +00:00
Martin Fuchs
18045c4c66 added FIXME comments for IResolveShellLink
svn path=/trunk/; revision=7474
2004-01-06 11:17:38 +00:00
Martin Fuchs
80f7dc3e34 fixed buffer size management in _ShgetPathFromIDListA()
svn path=/trunk/; revision=7473
2004-01-06 11:11:14 +00:00
Martin Fuchs
4562169f04 added some FIXME comments to ShellExecuteExA32()
svn path=/trunk/; revision=7472
2004-01-06 11:10:23 +00:00
Martin Fuchs
06983e9ad1 corrected return type of SHFileOperation()
svn path=/trunk/; revision=7471
2004-01-06 11:09:46 +00:00
Martin Fuchs
e6d3a05dff corrected types and function name of PathYetAnotherMakeUniqueName()
svn path=/trunk/; revision=7470
2004-01-06 11:08:08 +00:00
Art Yerkes
5662831f38 Fixes for bugs previously posted in bugzilla.
svn path=/trunk/; revision=7469
2004-01-06 03:44:38 +00:00
Vizzini
e2bc674743 added a cast to silence a compiler warning
svn path=/trunk/; revision=7468
2004-01-05 20:38:48 +00:00
Vizzini
282696e4ee cross-compile fixes
svn path=/trunk/; revision=7467
2004-01-05 20:01:17 +00:00
Vizzini
7bb4859c69 cross-compile fixes for winebuild
svn path=/trunk/; revision=7466
2004-01-05 19:49:59 +00:00
Martin Fuchs
48113b3c64 SHELL32_GetItemAttributes(): implemented SFGAO_LINK
svn path=/trunk/; revision=7465
2004-01-05 19:30:59 +00:00
Martin Fuchs
2b81d7c7cc dependency scanning
svn path=/trunk/; revision=7464
2004-01-05 18:53:08 +00:00
Filip Navara
5463ff80c7 Cross-compilation fixes.
svn path=/trunk/; revision=7463
2004-01-05 18:42:56 +00:00
Filip Navara
2556727beb Remove winver.h and fix the errors.
svn path=/trunk/; revision=7462
2004-01-05 18:12:18 +00:00
Thomas Bluemel
94ecbd89db fixed div/0 bug
svn path=/trunk/; revision=7461
2004-01-05 15:43:55 +00:00
Thomas Bluemel
583de66b3e tamlin's work on compiling the kernel with another compiler than GCC. Patch by Mike Nordell.
svn path=/trunk/; revision=7460
2004-01-05 14:28:21 +00:00
Thomas Bluemel
16da2140a1 struct packing compiler independence. Patch by Mike Nordell.
svn path=/trunk/; revision=7459
2004-01-05 13:50:23 +00:00
Thomas Bluemel
1354f5b5a9 Correct compiler-agnostic stdcall function pointers. Patch by Mike Nordell.
svn path=/trunk/; revision=7458
2004-01-05 13:49:18 +00:00
Martin Fuchs
83cc821fc7 removed NONAMELESSUNION and NONAMELESSSTRUCT
svn path=/trunk/; revision=7457
2004-01-04 23:36:06 +00:00
Martin Fuchs
7bf39cb245 use DUMMYUNIONNAME instead of plain 'u'
svn path=/trunk/; revision=7456
2004-01-04 23:15:36 +00:00
Martin Fuchs
63080fde1a eliminated warnings for GCC 3.3
svn path=/trunk/; revision=7455
2004-01-04 23:15:16 +00:00
Thomas Bluemel
c82235044d some fixes
svn path=/trunk/; revision=7454
2004-01-04 21:26:59 +00:00
Martin Fuchs
73990aee98 read configuration of hidden file extensions from registry
svn path=/trunk/; revision=7453
2004-01-04 21:23:08 +00:00
Martin Fuchs
42a645bad5 enhanced file sytem icon cache
svn path=/trunk/; revision=7452
2004-01-04 20:48:32 +00:00
Steven Edwards
fc05db5095 Added strpbrkW - I am going to need it for comdlg32 coming this week.
svn path=/trunk/; revision=7451
2004-01-04 20:22:02 +00:00
Martin Fuchs
3073e11cf8 icon caching
svn path=/trunk/; revision=7450
2004-01-04 17:11:53 +00:00
Filip Navara
7babf71f1f Cross-compilation fixes.
svn path=/trunk/; revision=7449
2004-01-04 15:50:41 +00:00
Filip Navara
0386197096 Compilation fixes.
svn path=/trunk/; revision=7448
2004-01-04 14:41:24 +00:00
Gé van Geldorp
bd0297ecdc Rely on CSRSS to do console handle duplication
svn path=/trunk/; revision=7447
2004-01-04 11:40:56 +00:00
Steven Edwards
5ce260d1fa Fix typo spotted by Casper.
svn path=/trunk/; revision=7446
2004-01-04 00:22:32 +00:00
Steven Edwards
ebe1289de5 Use strncmp.
svn path=/trunk/; revision=7445
2004-01-03 23:52:40 +00:00
Steven Edwards
edb38c2bd0 Minor fixes.
svn path=/trunk/; revision=7444
2004-01-03 23:45:25 +00:00
Steven Edwards
5bc9a2c173 Minor fixes.
svn path=/trunk/; revision=7443
2004-01-03 23:34:17 +00:00
Steven Edwards
791019b4b4 Remove wineros.h. The world is better off without it.
svn path=/trunk/; revision=7442
2004-01-03 23:20:11 +00:00
Steven Edwards
f2003fb2a3 Always link to libwine.a first.
svn path=/trunk/; revision=7441
2004-01-03 23:16:03 +00:00
Filip Navara
1571da986b Guard for W32API 2.5.
svn path=/trunk/; revision=7440
2004-01-03 23:14:33 +00:00
Steven Edwards
18a45dba80 Dont run the implib rule on apps.
svn path=/trunk/; revision=7439
2004-01-03 23:12:19 +00:00
Martin Fuchs
2d9a09646b changes restart/shutdown messages to some neutral text (no Windows/WINE/ReactOS
svn path=/trunk/; revision=7438
2004-01-03 23:03:39 +00:00
Gé van Geldorp
cd9ce31d63 Quotation fun
svn path=/trunk/; revision=7437
2004-01-03 23:03:22 +00:00
Martin Fuchs
09ad94f5c7 look into the registry configuration to see which file extensions should be hidden
svn path=/trunk/; revision=7435
2004-01-03 22:50:29 +00:00
Steven Edwards
a06846aefa Define __REACTOS__
svn path=/trunk/; revision=7434
2004-01-03 22:25:59 +00:00
Gé van Geldorp
9407236c53 Add Everaldos terminal.ico as application icon
svn path=/trunk/; revision=7433
2004-01-03 22:18:56 +00:00
Gé van Geldorp
ff2417063d Don't destroy heap on unload, other DLLs might still depend on it
svn path=/trunk/; revision=7432
2004-01-03 21:59:55 +00:00
Martin Fuchs
c738276596 renamed Ole2.c -> ole2.c
svn path=/trunk/; revision=7431
2004-01-03 21:52:27 +00:00
Martin Fuchs
a84e00e10b renamed Ole2.c -> ole2.c
svn path=/trunk/; revision=7430
2004-01-03 21:52:11 +00:00
Martin Fuchs
ca03151737 renamed Ole2.c -> ole2.c
svn path=/trunk/; revision=7429
2004-01-03 21:51:14 +00:00
Martin Fuchs
210498fba3 renamed Ole2.c -> ole2.c
svn path=/trunk/; revision=7428
2004-01-03 21:50:56 +00:00
Martin Fuchs
87a2a6c778 eliminated SHBindToParent()
svn path=/trunk/; revision=7427
2004-01-03 21:05:23 +00:00
Martin Fuchs
4fa9d79e7f eliminated SHBindToParent()
svn path=/trunk/; revision=7426
2004-01-03 21:03:50 +00:00
Martin Fuchs
8d3be28398 link dynamicly to SHBindToParent()
svn path=/trunk/; revision=7425
2004-01-03 18:35:31 +00:00
Martin Fuchs
398b10102e direct file system access for start menu
svn path=/trunk/; revision=7424
2004-01-03 18:27:54 +00:00
Thomas Bluemel
33f1db80ee fixed handling of control focus
svn path=/trunk/; revision=7423
2004-01-03 15:59:46 +00:00
Martin Fuchs
7fbcfcbc71 lazy icon extraction for start menu
svn path=/trunk/; revision=7422
2004-01-03 11:43:41 +00:00
Martin Fuchs
b1f2f1ed55 fix for empty submenus
svn path=/trunk/; revision=7421
2004-01-03 10:24:47 +00:00
Martin Fuchs
955c62bf6a optimized screen update
svn path=/trunk/; revision=7420
2004-01-03 09:03:47 +00:00
Gé van Geldorp
d36decca0d Print substituted values in the output file in the same order as in the
input file

svn path=/trunk/; revision=7419
2004-01-03 08:53:52 +00:00
Martin Fuchs
17d470dad4 begin of drag drop support on desktop
svn path=/trunk/; revision=7418
2004-01-02 23:57:58 +00:00
Filip Navara
4ee6053221 Cleaned up. If there will be any build problems, contact me.
svn path=/trunk/; revision=7417
2004-01-02 23:28:59 +00:00
Martin Fuchs
00d157f1d3 set working directory out of shell links in ShellExecute..()
svn path=/trunk/; revision=7416
2004-01-02 22:47:51 +00:00
Thomas Bluemel
a93fff8b9c added missing and fixed .cvsignore files
svn path=/trunk/; revision=7415
2004-01-02 21:45:22 +00:00
Gé van Geldorp
1fc3cf8187 Allow buidling with current CVS w32api
svn path=/trunk/; revision=7414
2004-01-02 21:29:50 +00:00
Filip Navara
72c429c0e5 Guard for W32API 2.5.
svn path=/trunk/; revision=7413
2004-01-02 21:26:12 +00:00
Martin Fuchs
538a9b34e2 reimplemented start menu as light weight version
svn path=/trunk/; revision=7412
2004-01-02 21:09:41 +00:00
Martin Fuchs
90679ee807 merged wine/dlls/shell32 and reactos/lib/shell32
svn path=/trunk/; revision=7411
2004-01-02 21:03:50 +00:00
Filip Navara
2a542a8199 Guard for W32API 2.5.
svn path=/trunk/; revision=7410
2004-01-02 20:29:46 +00:00
Gé van Geldorp
9f1759234a Refactoring of Wine DLL import
svn path=/trunk/; revision=7409
2004-01-02 19:49:47 +00:00
Martin Fuchs
cc9e382b7a re-added icons in binary mode
svn path=/trunk/; revision=7408
2004-01-02 18:52:37 +00:00
Martin Fuchs
75c9f9f7ed removed non-binary icons
svn path=/trunk/; revision=7407
2004-01-02 18:51:58 +00:00
Filip Navara
22cda87a36 Reverted last change by Martin Fuchs. The icon file was corrupted and prevented proper builds.
svn path=/trunk/; revision=7406
2004-01-02 17:56:30 +00:00
Steven Edwards
dfa3449f1b Enabled support for /DEBUGPORT=FILE
This fixes bug #28
 - Thanks for the help Filip

svn path=/trunk/; revision=7405
2004-01-02 17:46:17 +00:00
Martin Fuchs
89af47536b error messages for missing functions in SHELL32.dll
svn path=/trunk/; revision=7404
2004-01-02 15:38:23 +00:00
Martin Fuchs
338f8e366a integrated start menu root with StartMenuHandler
svn path=/trunk/; revision=7403
2004-01-02 15:26:46 +00:00
Martin Fuchs
975329fe8b class StartMenuHandler
svn path=/trunk/; revision=7402
2004-01-02 15:18:17 +00:00
Martin Fuchs
8f70adb80c enable shoutdown by hitting Alt+F4
svn path=/trunk/; revision=7401
2004-01-02 15:07:42 +00:00
Martin Fuchs
8ca6781591 use COPYCMD for XP to be compatible with NT4
svn path=/trunk/; revision=7400
2004-01-02 14:27:34 +00:00
Jason Filby
23d5fe1c50 Initial tests for memory APIs
svn path=/trunk/; revision=7399
2004-01-02 03:23:25 +00:00
Thomas Bluemel
a5c9f3e660 more improvements
svn path=/trunk/; revision=7398
2004-01-01 22:29:12 +00:00
Martin Fuchs
0e76daebf1 transparency
svn path=/trunk/; revision=7397
2004-01-01 21:12:19 +00:00
Martin Fuchs
98cf42d325 switch explorer icon to new folder symbol
svn path=/trunk/; revision=7396
2004-01-01 20:55:58 +00:00
Martin Fuchs
4b4a555cbc added dependency on resource binaries
svn path=/trunk/; revision=7395
2004-01-01 20:42:52 +00:00
Martin Fuchs
f7f2d1f90d improved icons a bit
svn path=/trunk/; revision=7394
2004-01-01 20:42:27 +00:00
Thomas Bluemel
22cf7a0a7d some more fixes
svn path=/trunk/; revision=7393
2004-01-01 17:47:48 +00:00
Thomas Bluemel
df212d0711 fixed changing of string values (now it works)
svn path=/trunk/; revision=7392
2004-01-01 17:29:05 +00:00
Steven Edwards
a2ef615d16 Added msvcrt20 to list.
svn path=/trunk/; revision=7391
2004-01-01 17:10:55 +00:00
Steven Edwards
11c72d54c6 Added msvcrt20 to list of targets.
svn path=/trunk/; revision=7390
2004-01-01 17:09:30 +00:00
Steven Edwards
ea6bc1f0ee More WINE porting work.
svn path=/trunk/; revision=7389
2004-01-01 17:08:38 +00:00
Martin Fuchs
461d9dcf8c added some more icons for start menu subfolders
svn path=/trunk/; revision=7388
2004-01-01 17:02:07 +00:00
Steven Edwards
ffa50f24ef Fixed compilation
svn path=/trunk/; revision=7387
2004-01-01 16:54:24 +00:00
Thomas Bluemel
f5f5b2ebc8 fixed changing of string values
svn path=/trunk/; revision=7386
2004-01-01 16:45:26 +00:00
Steven Edwards
3a7d842ffb Updated license information.
svn path=/trunk/; revision=7385
2004-01-01 16:32:14 +00:00
Steven Edwards
815d0dee06 removed 2 more tests from the list.
svn path=/trunk/; revision=7384
2004-01-01 16:22:22 +00:00
Steven Edwards
a75a47f9ff removed the messagebox test.
Winhello now displays a messagebox during the hotkey test.

svn path=/trunk/; revision=7383
2004-01-01 16:21:13 +00:00
Steven Edwards
3841fa3f78 Removed hotkey test. Its now part of winhello.
svn path=/trunk/; revision=7382
2004-01-01 16:19:40 +00:00
Martin Fuchs
a2e1521bbe integrated some of Everaldo's icons
svn path=/trunk/; revision=7381
2004-01-01 16:10:31 +00:00
Steven Edwards
2f1da730d4 Updated Info.
svn path=/trunk/; revision=7380
2004-01-01 16:07:21 +00:00
Steven Edwards
e943e91a30 Added a bit of documentation for ReactOS-WINE developers.
This document is a work in progress and is here to help us keep track
of what code we have ported directly from Wine.

svn path=/trunk/; revision=7379
2004-01-01 15:29:51 +00:00
Steven Edwards
073f42e857 - Ported msvcrt20 from WINE (01-01-04)
This get hover from the Win95 CD at least load.

svn path=/trunk/; revision=7378
2004-01-01 15:27:58 +00:00
Thomas Bluemel
ff57ed11e3 added regedit to package list and added version information to regedit and welcome
svn path=/trunk/; revision=7377
2004-01-01 15:26:04 +00:00
Thomas Bluemel
7b27426d88 updated regedit (and some minor changes)
svn path=/trunk/; revision=7376
2004-01-01 15:12:11 +00:00
Gé van Geldorp
769dcae440 Re-create notification window when needed
svn path=/trunk/; revision=7375
2003-12-31 20:16:39 +00:00
Martin Fuchs
eba8b31ea1 WSHELL32 -> SHELL32
svn path=/trunk/; revision=7374
2003-12-31 19:56:02 +00:00
Filip Navara
bf3bd0f212 Bug fixes.
svn path=/trunk/; revision=7373
2003-12-31 19:25:51 +00:00
Thomas Bluemel
3e2d632fc3 do not limit number of clipping rectangles
svn path=/trunk/; revision=7372
2003-12-31 16:10:35 +00:00
Hartmut Birr
b6526368dc - Bypass the completion routines from kernel if there is a
reading or writing request to the storage device.

svn path=/trunk/; revision=7371
2003-12-31 15:07:10 +00:00
Hartmut Birr
e612170f41 - Implemented shared segments for images.
- Fixed a memory leakage in page file sections.
- Fixed the locking bug on cow operations.
- Do not increment the page reference count if the share count is incremented.

svn path=/trunk/; revision=7370
2003-12-31 14:52:06 +00:00
Thomas Bluemel
f8eea2e937 fixed infinite loop if the number of clipping rectangles exceeded the maximum allowed.
svn path=/trunk/; revision=7369
2003-12-31 14:43:48 +00:00
Hartmut Birr
3c069498cc - Made the system time in the shared data page available.
- Queried the system time without holding a lock.
- Splited the timer queue for absolute and relative timers.

svn path=/trunk/; revision=7368
2003-12-31 14:37:34 +00:00
Hartmut Birr
f08ebc1cee - Set the flag IRP_CLOSE_OPERATION in IopDeleteFile.
svn path=/trunk/; revision=7367
2003-12-31 14:20:26 +00:00
Hartmut Birr
237c87c4c3 - Bypass IoSecondStageCompletion for irp's with the flags
IRP_PAGING_IO or IRP_CLOSE_OPERATION in IofCompleteRequest.

svn path=/trunk/; revision=7366
2003-12-31 14:16:18 +00:00
Martin Fuchs
76706d5835 allow UNICODE=0 builds
svn path=/trunk/; revision=7365
2003-12-31 11:45:33 +00:00
Martin Fuchs
1558a94775 allow UNICODE=0 builds
svn path=/trunk/; revision=7364
2003-12-31 11:45:33 +00:00
Martin Fuchs
4d9498236c german frame menu
svn path=/trunk/; revision=7363
2003-12-31 11:33:15 +00:00
Hartmut Birr
3381197e55 Fixed InsertDescendingList and InsertAscendingList.
svn path=/trunk/; revision=7362
2003-12-31 11:33:07 +00:00
Gé van Geldorp
16ed415455 Fix compile problem when compiling with DBG
svn path=/trunk/; revision=7361
2003-12-31 08:18:21 +00:00
Jason Filby
633f796e40 Initial implementaions of MmAllocateContiguousMemorySpecifyCache() and MmFreeContiguousMemorySpecifyCache()
svn path=/trunk/; revision=7360
2003-12-31 05:33:04 +00:00
Martin Fuchs
6ba4d142ab better command line handling for MinGW
svn path=/trunk/; revision=7359
2003-12-31 01:03:08 +00:00
Martin Fuchs
56deb316c5 eliminated GCC -Wall warnings
svn path=/trunk/; revision=7358
2003-12-31 00:50:38 +00:00
Martin Fuchs
ecc0688f2f implemented Explorer About Dialog
svn path=/trunk/; revision=7357
2003-12-31 00:41:01 +00:00
Richard Campbell
0374ccee3d more small fixes
svn path=/trunk/; revision=7356
2003-12-31 00:38:10 +00:00
Steven Edwards
58837d34cc Added Hotkey tests to winhello.
svn path=/trunk/; revision=7355
2003-12-31 00:36:28 +00:00
Steven Edwards
5f7c494081 Make GlobalMemoryStatus lie about what we really have......
svn path=/trunk/; revision=7354
2003-12-30 23:16:43 +00:00
Aleksey Bragin
a755da6416 Make compatible w/both MinGW and MSVC
svn path=/trunk/; revision=7353
2003-12-30 22:33:32 +00:00
Aleksey Bragin
ac110a4500 Fix to be compatible w/both MinGW and MSVC
svn path=/trunk/; revision=7352
2003-12-30 22:18:12 +00:00
Aleksey Bragin
e4c6acf822 Update inline assembler to be compatible with MSVC
svn path=/trunk/; revision=7351
2003-12-30 22:10:45 +00:00
Steven Edwards
729c0cac35 Removed SampleWindow and Winhello2.
They are now all contained in winhello.

svn path=/trunk/; revision=7350
2003-12-30 20:25:13 +00:00
Steven Edwards
125ac57c6b Removed winhello2
svn path=/trunk/; revision=7349
2003-12-30 20:23:58 +00:00
Steven Edwards
aa1befdfab Removed SampleWindow.
svn path=/trunk/; revision=7348
2003-12-30 20:23:24 +00:00
Steven Edwards
562967f063 Merged SimpleWindow and Winhello2 in to winhello
svn path=/trunk/; revision=7347
2003-12-30 20:22:16 +00:00
Thomas Bluemel
cc7800aa6b do not send WM_MOUSEACTIVATE if WM_NCHITTEST returned HTTRANSPARENT
svn path=/trunk/; revision=7346
2003-12-30 20:09:11 +00:00
Steven Edwards
c829b778a9 Fixed makefile
svn path=/trunk/; revision=7345
2003-12-30 19:43:08 +00:00
Steven Edwards
8ca7541c5e WINE has a much better CreateFile test.
svn path=/trunk/; revision=7344
2003-12-30 19:37:06 +00:00
Steven Edwards
ce0de78273 Removed Named pipe test. Its now in the WINE kernel32 regression test.
svn path=/trunk/; revision=7343
2003-12-30 19:32:25 +00:00
Aleksey Bragin
f4a6e3d287 and even third --- please excuse me for so much of commits, it should be one instead of 3 :-)
svn path=/trunk/; revision=7342
2003-12-30 19:23:30 +00:00
Steven Edwards
05dfe2a7c4 Ported more dialog code from Wine to fix dirdlg test app.
svn path=/trunk/; revision=7341
2003-12-30 19:21:55 +00:00
Aleksey Bragin
b3a850e0ea second fix follows
svn path=/trunk/; revision=7340
2003-12-30 19:14:29 +00:00
Aleksey Bragin
55128bd027 Fix for anonymous struct definition, which made at least /drivers/net/dd/pcnet uncompilable
svn path=/trunk/; revision=7339
2003-12-30 19:13:43 +00:00
Aleksey Bragin
49f967d0ed Continue of MSVC-compiling changes....
I double checked, but in case someone's recent commit is somehow overwritten -- please, don't be very frustrated :) -- I will fix it, just drop me a note.

svn path=/trunk/; revision=7338
2003-12-30 18:52:06 +00:00
Aleksey Bragin
4150f6827f Continue of MSVC-compiling changes....
I double checked, but in case someone's recent commit is somehow overwritten -- please, don't be very frustrated :) -- I will fix it, just drop me a note.

svn path=/trunk/; revision=7337
2003-12-30 18:34:59 +00:00
Aleksey Bragin
920ee1834d Continue of MSVC-compiling changes....
I double checked, but in case someone's recent commit is somehow overwritten -- please, don't be very frustrated :) -- I will fix it, just drop me a note.
struct KTHREAD, ETHREAD, EPROCESS removed from this file by Mike Nordell, since their purpose is very unclear.

svn path=/trunk/; revision=7336
2003-12-30 18:22:08 +00:00
Thomas Bluemel
7ff3d66ade fixed IntFindWindowToRepaint() so it only returns handles to child windows that belong to the calling thread
svn path=/trunk/; revision=7335
2003-12-30 18:19:20 +00:00
Aleksey Bragin
2e3675731a Continue of MSVC-compiling changes....
svn path=/trunk/; revision=7334
2003-12-30 17:39:38 +00:00
Thomas Bluemel
b670b417e9 fixed IntIsWindowDrawable()
svn path=/trunk/; revision=7333
2003-12-30 16:55:00 +00:00
Robert Dickenson
a17da31116 removed unused, useless & erroneous makefile...
svn path=/trunk/; revision=7332
2003-12-30 16:15:36 +00:00
Aleksey Bragin
b6310a8efc added Thomas's changes to defines.h (sorry they were taken away by my update)
svn path=/trunk/; revision=7331
2003-12-30 14:31:51 +00:00
Thomas Bluemel
b8aa4bcd37 added missing .cvsignore and updated makefile
svn path=/trunk/; revision=7330
2003-12-30 14:28:48 +00:00
Hartmut Birr
837f9ed8a7 - Fixed the stack deallocation in RtlRosFreeUserThreadStack.
svn path=/trunk/; revision=7329
2003-12-30 13:06:54 +00:00
Richard Campbell
1a75d537fa ewps, forgot an icon, also a small update to the simple makefile, feel free to 'fix' this makefile to be compatible with the ReactOS build system.
svn path=/trunk/; revision=7328
2003-12-30 11:55:54 +00:00
Aleksey Bragin
f43d6624c8 It is a part of a multipart commit, related to making ReactOS compilable both under MinGW and MSVC6.
Main work on converting ROS to be able to be compiled under MSVC6 was done by Mark Nordell.
Work done by me - incorporating all this stuff into the newest CVS tree.

svn path=/trunk/; revision=7327
2003-12-30 11:53:35 +00:00
Richard Campbell
077fbea4d3 added directories and a dummy file for a wordpad and paint clone.
svn path=/trunk/; revision=7326
2003-12-30 11:53:28 +00:00
Richard Campbell
7d8b928a54 initial version of a reactos version of notepad. didn't have time to finish it tonight before i went to work, so i'll work on it more later.
svn path=/trunk/; revision=7325
2003-12-30 11:52:04 +00:00
KJK::Hyperion
4be9e19495 Whooops
svn path=/trunk/; revision=7324
2003-12-30 05:11:54 +00:00
KJK::Hyperion
f3fcc98b2d - include/rosrtl/thread.h, lib/rosrtl/makefile, lib/rosrtl/makefile.i386, lib/rosrtl/thread/stack.c, lib/rosrtl/thread/exit.c, lib/rosrtl/thread/i386/stackexit.c: three new RosRtl functions (RtlRosExitUserThread, RtlRosFreeUserThreadStack and RtlRosSwitchStackForExit)
- lib/kernel32/makefile, lib/kernel32/thread/thread.c, lib/kernel32/thread/thread/i386/exit.S: kernel32.dll now uses them
 - lib/ntdll/dbg/debug.c, lib/ntdll/rtl/thread.c: ntdll.dll too
 - subsys/csrss/api/wapi.c: CSRSS too (should fix regression)

svn path=/trunk/; revision=7323
2003-12-30 05:10:32 +00:00
KJK::Hyperion
baea3fcd85 Free the TEB on thread termination. Partially fixes a recent regression
svn path=/trunk/; revision=7322
2003-12-30 03:27:52 +00:00
KJK::Hyperion
d8575f7b6a Still not done...
svn path=/trunk/; revision=7321
2003-12-30 01:08:16 +00:00
KJK::Hyperion
c8f27683f0 Screw branches, I'm committing to HEAD. Life is too short
svn path=/trunk/; revision=7320
2003-12-30 00:12:47 +00:00
KJK::Hyperion
699d3efcd8 Please, mr. CVS, accept my files
svn path=/trunk/; revision=7319
2003-12-30 00:03:48 +00:00
Martin Fuchs
b824b25697 move search start menu entries into 'Search' submenu
svn path=/trunk/; revision=7317
2003-12-29 23:46:33 +00:00
Steven Edwards
5e2692a21b DPRINT another message.
Notepad and the edit control is a bit faster now.

svn path=/trunk/; revision=7314
2003-12-29 23:28:46 +00:00
Steven Edwards
a11793fec7 Added a sample system.ini to shutup some winmm messages for now.
svn path=/trunk/; revision=7313
2003-12-29 23:06:38 +00:00
Gé van Geldorp
6161de8e1a On error return from RegQueryValueExW, don't touch *lpcbData. *lpcbData
is always in bytes, even for string registry settings.

svn path=/trunk/; revision=7312
2003-12-29 23:04:55 +00:00
Steven Edwards
e12604e3d7 DPRINT GlobalUnlock message.
svn path=/trunk/; revision=7311
2003-12-29 23:04:08 +00:00
Steven Edwards
7467b2f74a Added tempory winver.h till my patch is accepted by Mingw
svn path=/trunk/; revision=7310
2003-12-29 22:59:07 +00:00
Steven Edwards
dfa4c347b8 And Get my name right.....
svn path=/trunk/; revision=7309
2003-12-29 22:55:10 +00:00
Steven Edwards
e42170ed0a Added Changelog info for version.dll merge
svn path=/trunk/; revision=7308
2003-12-29 22:54:18 +00:00
Steven Edwards
3372617d7f Merged version.dll with WINE 12-29-03
svn path=/trunk/; revision=7307
2003-12-29 22:50:59 +00:00
Gé van Geldorp
46376679ce Fix deadlock when two threads were trying to SendMessage() each other
svn path=/trunk/; revision=7306
2003-12-29 10:09:33 +00:00
Filip Navara
ea561a262b Fixed debugging macros.
svn path=/trunk/; revision=7305
2003-12-29 00:41:16 +00:00
Art Yerkes
c21519fbe8 A simple test case that verifies that RegQueryValueExW and RegQueryValueExA
match.

svn path=/trunk/; revision=7304
2003-12-28 23:23:27 +00:00
Art Yerkes
f1f2b431c9 Fixed RegQueryValueExA. It was broken in a way that made it work properly,
given the broken RegQueryValueExW.  I'm checking in a test case for these
two that should print the same string for each assuming everything works.

svn path=/trunk/; revision=7303
2003-12-28 23:22:30 +00:00
Martin Fuchs
c1bd24b5d5 process one command line parameter to open cabinet window
svn path=/trunk/; revision=7302
2003-12-28 23:11:46 +00:00
Aleksey Bragin
5a6b27edc4 This is part of the big 'ReactOS under MSVC6' project. Main work on converting ROS to be able to be compiled under MSVC6 was done by Mark Nordell.
Work done by me - incorporating all this stuff into the newest CVS tree. So blame me if I did something wrong during tamlin -> new CVS tree merging :-)
It's HAL turn now.

svn path=/trunk/; revision=7301
2003-12-28 22:39:06 +00:00
Gé van Geldorp
585b1fea42 Link creation test by Martin Fuchs (slightly modified, so errors introduced
by me...)

svn path=/trunk/; revision=7300
2003-12-28 21:36:53 +00:00
Gé van Geldorp
578b0d16ed Add open action for exefile
svn path=/trunk/; revision=7299
2003-12-28 21:28:08 +00:00
Gé van Geldorp
3b85b43844 Properly convert between ascii and unicode in SearchPathA
svn path=/trunk/; revision=7298
2003-12-28 21:25:48 +00:00
Gé van Geldorp
755d9f5216 Don't destroy heap on unload, other DLLs might still depend on it
svn path=/trunk/; revision=7297
2003-12-28 17:52:15 +00:00
Thomas Bluemel
ce3d36ede6 reverted my last change
svn path=/trunk/; revision=7296
2003-12-28 17:49:53 +00:00
Thomas Bluemel
4a8eb78729 minor fixes
svn path=/trunk/; revision=7295
2003-12-28 17:22:16 +00:00
Filip Navara
b4c2add1d1 Use EngMulDiv instead of IntMulDiv.
svn path=/trunk/; revision=7294
2003-12-28 17:06:37 +00:00
Thomas Bluemel
279f8d333b use DSTINVERT for DrawFocusRect() and the moving/sizing rectangle
svn path=/trunk/; revision=7293
2003-12-28 16:31:44 +00:00
Gé van Geldorp
1a0383df0b Use mingw32-windres when cross-compiling
svn path=/trunk/; revision=7292
2003-12-28 14:38:50 +00:00
Thomas Bluemel
ce1768d3c3 moved NtUserTranslateMessage() to message.c
svn path=/trunk/; revision=7291
2003-12-28 14:21:03 +00:00
Filip Navara
39ed4e8db9 - Use smaller font for captions and status bar.
- Return more accurate font height in TextIntGetTextExtentPoint.

svn path=/trunk/; revision=7290
2003-12-28 14:14:04 +00:00
Thomas Bluemel
1ff3a7da81 small fix to NtUserDispatchMessage()
svn path=/trunk/; revision=7289
2003-12-28 13:53:14 +00:00
Filip Navara
ff4cde9c00 Fixed mimized window repainting bug. Reported by Thomas Weidenmuller.
svn path=/trunk/; revision=7288
2003-12-28 12:17:15 +00:00
Gé van Geldorp
b462f0f82b Validate parent after copying bits in child
svn path=/trunk/; revision=7287
2003-12-28 10:56:20 +00:00
Filip Navara
0e37a36d20 - New OLE32 port from Wine 20031212. [Currently not build by default]
svn path=/trunk/; revision=7286
2003-12-28 10:40:56 +00:00
Thomas Bluemel
0bbf2ce262 translate WM_NCRBUTTONUP messages to WM_CONTEXTMENU if HitTest == HTCAPTION or HTSYSMENU
svn path=/trunk/; revision=7285
2003-12-28 10:27:51 +00:00
Art Yerkes
cba7351fef Properly deal with a larger buffer than we expect.
svn path=/trunk/; revision=7284
2003-12-28 09:53:22 +00:00
Art Yerkes
25dba4902b Don't return ERROR_MORE_DATA in the case of lpData == NULL.
svn path=/trunk/; revision=7283
2003-12-28 09:28:39 +00:00
Art Yerkes
ff637e689a Nameservers are now correctly listed when per adapter nameservers are
specified in the registry.  This now does the same thing I observe on
win2k, GetNetworkParams.  This function is used by our DNS query
implementation to find out what nameservers it should use.  There is
a test case in apps/tests/nameserverlist.

svn path=/trunk/; revision=7282
2003-12-28 09:09:50 +00:00
Gé van Geldorp
4aa9677fa4 Silence debug messages
svn path=/trunk/; revision=7281
2003-12-28 08:59:24 +00:00
Art Yerkes
a7a6d33f53 RegQueryValueExW: Now returns the space needed for the query to succeed
with a return of ERROR_MORE_DATA, as required by documentation.

svn path=/trunk/; revision=7280
2003-12-28 08:47:28 +00:00
Thomas Bluemel
bb4da13c9c small fixes
svn path=/trunk/; revision=7278
2003-12-28 01:13:02 +00:00
Thomas Bluemel
94859ee96d some fixes on system menu handling
svn path=/trunk/; revision=7277
2003-12-28 00:41:32 +00:00
Thomas Bluemel
12c7158866 implemented EndMenu()
svn path=/trunk/; revision=7276
2003-12-28 00:19:24 +00:00
Filip Navara
023ebb37c2 Fixed usermode stack traces.
svn path=/trunk/; revision=7275
2003-12-27 23:55:02 +00:00
Thomas Bluemel
7ec1d6fece don't draw menu bar and scrollbars when minimized
svn path=/trunk/; revision=7274
2003-12-27 23:51:05 +00:00
Thomas Bluemel
cda2695c4c added test app for TrackPopupMenu(Ex)()
svn path=/trunk/; revision=7273
2003-12-27 23:45:48 +00:00
Thomas Bluemel
38ff929b3a added a few missing constants for TrackPopupMenu(Ex)()
svn path=/trunk/; revision=7272
2003-12-27 23:19:09 +00:00
Martin Fuchs
5d14cf086f fixed FIXME message
svn path=/trunk/; revision=7271
2003-12-27 20:19:00 +00:00
Martin Fuchs
47ffd4826c added dummy target 'implib'
svn path=/trunk/; revision=7270
2003-12-27 20:06:28 +00:00
Gé van Geldorp
3bd689f185 Build and install explorer by default
svn path=/trunk/; revision=7269
2003-12-27 19:03:09 +00:00
Gé van Geldorp
17cd4520da Do not endlessly repeat first character of line when using bright
background (fixes bug #105)

svn path=/trunk/; revision=7268
2003-12-27 18:25:31 +00:00
Gé van Geldorp
e5259c9644 Make stock fonts a little bit smaller
svn path=/trunk/; revision=7267
2003-12-27 17:47:44 +00:00
Martin Fuchs
957a258b42 dynamically calculating the required size for the clock bar window based on the font size [patch of Ge van Geldorp <ge@gse.nl>]
svn path=/trunk/; revision=7266
2003-12-27 15:37:29 +00:00
Filip Navara
2ff0dc4d33 Fixed calculating client area size for minimized windows.
svn path=/trunk/; revision=7265
2003-12-27 15:33:32 +00:00
Filip Navara
ca3586e5a9 Painting bug fixes.
svn path=/trunk/; revision=7264
2003-12-27 15:09:51 +00:00
Gé van Geldorp
6168d52ff8 Build Unicode version by default, add "install" and "bootcd" targets,
allow cross-compilation (untested)

svn path=/trunk/; revision=7263
2003-12-27 14:34:08 +00:00
Martin Fuchs
59e174e888 Don't display cabinet window in desktop mode as default
svn path=/trunk/; revision=7262
2003-12-27 12:29:42 +00:00
Thomas Bluemel
b5391fbee5 small fixes
svn path=/trunk/; revision=7261
2003-12-27 11:09:58 +00:00
Gé van Geldorp
3d94ef5e21 Fix to handling of inter-thread and inter-process messages
svn path=/trunk/; revision=7260
2003-12-27 10:08:31 +00:00
Art Yerkes
b3d403eec3 Everything right now.
svn path=/trunk/; revision=7259
2003-12-27 03:49:48 +00:00
Art Yerkes
2b28365c4e test case for iphlpapi GetNetworkParams, dns server list.
svn path=/trunk/; revision=7258
2003-12-26 23:59:49 +00:00
Martin Fuchs
c359123664 french resources translated by Gerard Gatineau
svn path=/trunk/; revision=7257
2003-12-26 23:25:32 +00:00
Gé van Geldorp
c0ba949f78 Marshall messages across process boundaries (not complete yet) and
generalize message sending from kernel

svn path=/trunk/; revision=7256
2003-12-26 22:52:12 +00:00
Steven Edwards
765b3a2476 Another fix for me breaking user32.
svn path=/trunk/; revision=7255
2003-12-26 17:07:26 +00:00
Steven Edwards
c4a12181ec Fix compile bug. - remove this config.h in the future.
svn path=/trunk/; revision=7254
2003-12-26 16:51:12 +00:00
Thomas Bluemel
dd7349f037 small fixes
svn path=/trunk/; revision=7253
2003-12-26 16:19:15 +00:00
Thomas Bluemel
ca543d98b9 some more fixes on minimized windows
svn path=/trunk/; revision=7252
2003-12-26 14:50:29 +00:00
Thomas Bluemel
d92bf52121 some fixes
svn path=/trunk/; revision=7251
2003-12-26 13:06:34 +00:00
Thomas Bluemel
d391a75ab3 some fixes
svn path=/trunk/; revision=7250
2003-12-26 12:37:53 +00:00
Gé van Geldorp
7ff57296b2 Fix array overflow
svn path=/trunk/; revision=7249
2003-12-26 10:47:20 +00:00
Gé van Geldorp
c8c4b549eb Serialize access to FreeType
svn path=/trunk/; revision=7248
2003-12-26 10:43:08 +00:00
Filip Navara
6da419e367 Fixed compilation problems with GCC 3.4.
svn path=/trunk/; revision=7247
2003-12-26 09:52:37 +00:00
Thomas Bluemel
8638ffb7f0 don't maximize windows that don't have a maximize button when double-clicking the caption bar
svn path=/trunk/; revision=7246
2003-12-26 01:21:17 +00:00
Thomas Bluemel
a4b5d47bed maximize child window to the client area of the parent window
svn path=/trunk/; revision=7245
2003-12-26 01:14:10 +00:00
Thomas Bluemel
51be13a34a small fix
svn path=/trunk/; revision=7244
2003-12-26 01:05:41 +00:00
Thomas Bluemel
f90a37f641 fixed hardcoded workarea size
svn path=/trunk/; revision=7243
2003-12-26 00:58:33 +00:00
Thomas Bluemel
b68bca0e99 fixed hardcoded workarea size
svn path=/trunk/; revision=7242
2003-12-26 00:47:18 +00:00
Thomas Bluemel
ed3497f42e disable font smoothing if screen resolution < 8bpp
svn path=/trunk/; revision=7241
2003-12-26 00:31:22 +00:00
Thomas Bluemel
0705f303d0 disable gradient captions on resolutions <= 8bpp
svn path=/trunk/; revision=7240
2003-12-25 21:14:24 +00:00
Thomas Bluemel
c2b73a09cb fixed missing lib
svn path=/trunk/; revision=7239
2003-12-25 20:46:51 +00:00
Filip Navara
8ff01625ad Fixed compilation problems.
svn path=/trunk/; revision=7238
2003-12-25 20:22:30 +00:00
Martin Fuchs
9053b1515d template for french resources
svn path=/trunk/; revision=7237
2003-12-25 19:29:36 +00:00
Martin Fuchs
03881fe9f4 FIXME for ILC_COLOR32
svn path=/trunk/; revision=7236
2003-12-25 18:42:48 +00:00
KJK::Hyperion
f935f66635 "Ancillary Function Driver" is about as descriptive as "Foo Thingy". Let's stop the insanity: from today, 25 December 2003, AFD will be known as "Socket Filesystem Driver". OK, so I'm bored
svn path=/trunk/; revision=7235
2003-12-25 18:35:20 +00:00
Aleksey Bragin
e24cbd5ce2 define HAVE_SSIZE_T in wineros.h to fix double definition of ssize_t during /lib/msvcrt compilation
svn path=/trunk/; revision=7234
2003-12-25 18:34:57 +00:00
KJK::Hyperion
a39dcfd091 I was bored, so I fixed some random forgotten test applications
svn path=/trunk/; revision=7233
2003-12-25 18:30:09 +00:00
Casper Hornstrup
08ba5babf3 2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
	not __wchar_t*.
	* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
	(TARGET_GCCLIBS): Add stdc++.
	* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
	* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
	warning.
	* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
	(DriverEntry): Initialize ListenRequestLookasideList.
	* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
	(AfdDispListen): Partial implement.
	* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
	NewFCB->ListenRequestQueue.
	(AfdKillListenRequests): New function.
	(AfdClose): Call AfdKillListenRequests.
	* drivers/net/afd/afd/routines.c (DumpName): New function.
	* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
	(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
	(TdiBuildNullConnectionInfo): New function.
	(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
	0-terminated.
	(TdiListen): New function.
	* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
	(AFD_LISTEN_REQUEST): New structure.
	(ListenRequestLookasideList): Declare.
	(DumpName, TdiListen): Add prototypes.
	* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
	AnsiAddress.Length and AnsiAddress.MaximumLength.
	* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
	* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
	prototype.
	(DISPLAY_TCP_PACKET): Define.
	* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
	* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
	* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
	* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
	network byte order.
	* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
	Initialize AddrFile->Connection.
	(DispTdiListen): Implement.
	* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
	initialize AddrFile->Connections.
	* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
	(DisplayIPPacket): Enable.
	(DisplayTCPHeader, DisplayTCPPacket): New functions.
	* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
	(TCPListen, TCPiReceive): New functions.
	(TCPReceive): Partial implement.
	* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
	{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
	* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
	* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
	(WINSOCK_THREAD_BLOCK): Remove Initialized member.
	* (WSAINITIALIZED, WSASETINITIALIZED): Update.
	* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
	{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
	(Initialized): New variable.
	(DllMain): Don't initialize p->Initialized.
	* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
	* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
	message.

svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
Filip Navara
9aa489b9bf Fixed double clicks.
svn path=/trunk/; revision=7231
2003-12-25 12:26:35 +00:00
Martin Fuchs
8b52e2dfa1 Relase Build configuration
svn path=/trunk/; revision=7230
2003-12-25 11:31:59 +00:00
Filip Navara
f9f22093dc Use correct color translation in AlphaBltMask.
svn path=/trunk/; revision=7229
2003-12-25 10:49:30 +00:00
Filip Navara
9621b3a131 Fixed few obvious bugs.
svn path=/trunk/; revision=7228
2003-12-25 10:21:02 +00:00
Art Yerkes
643255deed I'm not really sure how the --kill-at, --add-stdcall alias dichotomy should
be handled, but I do have a workable solution at least.  It'll be part of
my patch, that will appear shortly on bugzilla.

svn path=/trunk/; revision=7227
2003-12-25 09:52:44 +00:00
Art Yerkes
89222717af A test only of querying DNS. Currently works with windows dnsapi, and our
dnsapi on windows.  Almost works on reactos.

svn path=/trunk/; revision=7226
2003-12-25 08:45:48 +00:00
Art Yerkes
59eb01566e *** empty log message ***
svn path=/trunk/; revision=7225
2003-12-25 08:40:09 +00:00
Art Yerkes
d42bd99ca1 Correct, linking and working (so far) dnsapi.
It makes a query, and adns gets as far as sendto, but things break there.
The sendto call is made correctly, so all of the code above ws2_32 is
correct.

svn path=/trunk/; revision=7224
2003-12-25 05:50:37 +00:00
Art Yerkes
db0182fe34 Corrected bug: passing value of Adjustment rather than address.
svn path=/trunk/; revision=7223
2003-12-25 05:48:35 +00:00
Thomas Bluemel
6e2e1c2fa5 implemented font smoothing
svn path=/trunk/; revision=7222
2003-12-25 00:28:09 +00:00
Steven Edwards
4a0ecf56be Added a README file regarding the status of msvcrt.
svn path=/trunk/; revision=7221
2003-12-24 23:25:13 +00:00
Steven Edwards
5f431cda4c Removed the old port of the __CxxFrameHandler
svn path=/trunk/; revision=7220
2003-12-24 23:21:22 +00:00
Steven Edwards
443715773c Marry Christmas!!!!!
Reported the WINE __CxxFrameHandler and C++ functions.
Enabled -D__USE_W32API on most files.
Imported the internal WINE msvcrt headers as msvcrt/wine/msvcrt pending cleanup.

Freecell and more C++ applications work. Please report if you have problems.

svn path=/trunk/; revision=7219
2003-12-24 23:20:09 +00:00
Steven Edwards
9fb814dc9e Added a newly generated config.h
updated ERR to report as DPRINT1
Added the WINE exception handler header.
Cleanup of the porting headers.......

Let me know if something breaks. I did a rebuild and it was fine for me

svn path=/trunk/; revision=7218
2003-12-24 23:17:27 +00:00
Gé van Geldorp
b110169179 Pass pointer to DWORD instead of casted USHORT pointer
svn path=/trunk/; revision=7217
2003-12-24 21:51:38 +00:00
Filip Navara
822a987bc4 Do not zero memory in RegQueryValueExW and handle the error cases better way.
svn path=/trunk/; revision=7216
2003-12-24 21:23:03 +00:00
Filip Navara
2105eedbc7 Kill the white rectangle around menu entries!
svn path=/trunk/; revision=7215
2003-12-24 21:10:16 +00:00
Gé van Geldorp
05d88629dd Add lpApplicationName processing back in again
svn path=/trunk/; revision=7214
2003-12-24 19:57:42 +00:00
Martin Fuchs
a4d9927ea3 configuration for Release builds with Wine DLLs
svn path=/trunk/; revision=7213
2003-12-24 15:04:41 +00:00
Filip Navara
8bde79329e Fixed RegisterClipboardFormatW.
svn path=/trunk/; revision=7212
2003-12-24 11:24:29 +00:00
Filip Navara
9516179123 Support for HWN_BROADCAST in NtUserPostMessage.
svn path=/trunk/; revision=7211
2003-12-24 10:23:13 +00:00
Thomas Bluemel
b1e7c60fdd implemented gradient caption bars
svn path=/trunk/; revision=7210
2003-12-24 01:26:10 +00:00
Gé van Geldorp
a52d82602e Handle spaces in command line
svn path=/trunk/; revision=7209
2003-12-23 22:01:10 +00:00
Filip Navara
8dec71c0b4 Zero memory for value info in RegQueryValueExW, otherwise we will return invalid values in case of error.
svn path=/trunk/; revision=7208
2003-12-23 22:00:54 +00:00
Martin Fuchs
4373da8151 build Win32 version as UNICODE
svn path=/trunk/; revision=7207
2003-12-23 21:40:20 +00:00
Thomas Bluemel
9f53ca3272 small fix
svn path=/trunk/; revision=7206
2003-12-23 21:39:10 +00:00
Filip Navara
7bd2fe4cb1 Attempt to fix thread dereferencing problem caused by my last thread patch.
svn path=/trunk/; revision=7205
2003-12-23 21:34:52 +00:00
Thomas Bluemel
caedc5bf6b fixed NtUserGetClientOrigin()
svn path=/trunk/; revision=7204
2003-12-23 21:33:25 +00:00
Filip Navara
3470b283b2 GetCharWidth32 implementation.
svn path=/trunk/; revision=7203
2003-12-23 21:29:37 +00:00
Filip Navara
51d9fc9647 Fixed RegSetValueEx for NULL value name.
svn path=/trunk/; revision=7202
2003-12-23 21:18:31 +00:00
Thomas Bluemel
da73036e85 some fixes
svn path=/trunk/; revision=7201
2003-12-23 21:13:00 +00:00
Thomas Bluemel
a0f8c6d8ff some fixes
svn path=/trunk/; revision=7200
2003-12-23 20:40:00 +00:00
Filip Navara
86308e6a22 Reverted my last change!
svn path=/trunk/; revision=7199
2003-12-23 19:28:23 +00:00
Gé van Geldorp
aded67d27d Add some parameter checking
svn path=/trunk/; revision=7198
2003-12-23 19:22:17 +00:00
Filip Navara
2fca03e6cc Fixed division by zero in StretchBlt functions.
svn path=/trunk/; revision=7197
2003-12-23 19:15:08 +00:00
Filip Navara
02ce06682e Appearance bug fixes.
svn path=/trunk/; revision=7196
2003-12-23 18:19:07 +00:00
Thomas Bluemel
96b1759d3d fixed minimize, restore/maximize bugs
svn path=/trunk/; revision=7195
2003-12-23 18:12:38 +00:00
Thomas Bluemel
ff1bec5cec small fix
svn path=/trunk/; revision=7194
2003-12-23 17:56:55 +00:00
Filip Navara
6e39aab608 Bug fixes.
svn path=/trunk/; revision=7193
2003-12-23 08:48:59 +00:00
Art Yerkes
47a02358b6 KDB: Serial driver.
svn path=/trunk/; revision=7192
2003-12-23 08:41:14 +00:00
Art Yerkes
f92adc55e8 Added makefile stuff for kdb serial.
svn path=/trunk/; revision=7191
2003-12-23 05:07:26 +00:00
Art Yerkes
5a010039c5 Added the beginnings of an implementation of NtSetInformationToken.
Options used by cygwin are implemented, others return an error.

svn path=/trunk/; revision=7190
2003-12-23 05:06:47 +00:00
Art Yerkes
b1e0d0b3cc Added KDSERIAL option.
svn path=/trunk/; revision=7189
2003-12-23 05:05:10 +00:00
Art Yerkes
0ce3d6f67c Added "addr" "x" and "tlist" commands to kdbg.
addr  -- Displays address info from kdb_stabs.
x     -- Dumps memory.
tlist -- List threads.  Helps with bt, because normally, you don't know
         what the thread ids are or the stack addresses.
kdb_stabs.c: Fixed bug: length of module vs length of name.
kdb_serial.c: Added /KDSERIAL option allowing the user to type commands
              to the serial port.

svn path=/trunk/; revision=7188
2003-12-23 05:04:59 +00:00
Martin Fuchs
6876cc7caf __WINE__ compile checks
svn path=/trunk/; revision=7185
2003-12-22 20:53:28 +00:00
Thomas Bluemel
704f9a0abe added ros-internal NtUserSetScrollBarInfo()
svn path=/trunk/; revision=7184
2003-12-22 20:44:02 +00:00
Filip Navara
6171a32cfa Minor work on scrollbars.
svn path=/trunk/; revision=7183
2003-12-22 20:22:40 +00:00
Filip Navara
6cb2390fa6 Minor work on scrollbars.
svn path=/trunk/; revision=7181
2003-12-22 19:55:39 +00:00
Filip Navara
2e9b3c4ad3 Fixed drawing of restore button.
svn path=/trunk/; revision=7180
2003-12-22 19:40:29 +00:00
Martin Fuchs
636479dcd3 only merge start menu directories of the same name - no simple entries
svn path=/trunk/; revision=7179
2003-12-22 18:13:13 +00:00
Filip Navara
0ebaadbbae - Removed NtGdiGetSysColorBrush and modified functions that used it.
- Modified desktop drawing to use PaintDesktop.

svn path=/trunk/; revision=7178
2003-12-22 15:30:21 +00:00
Filip Navara
13347b6918 Modified CalcChildScroll to work in ReactOS.
svn path=/trunk/; revision=7177
2003-12-22 15:30:03 +00:00
Thomas Bluemel
3c22c1ba77 small fix in NtUserGetWindowPlacement()
svn path=/trunk/; revision=7176
2003-12-22 14:34:25 +00:00
Filip Navara
51a1df82b9 Don't draw lines with BS_NULL brush.
svn path=/trunk/; revision=7175
2003-12-22 12:44:16 +00:00
Filip Navara
5c52558817 - Enabled CS_PARENTDC style for edit control.
- Minor corrections in [Get/Set]WindowPlacement.
- Fixed handling of MDI client info structure.
- Bug fixes.

svn path=/trunk/; revision=7174
2003-12-22 11:37:32 +00:00
Steven Edwards
e0fd57122f Workaround for __USE_W32API
svn path=/trunk/; revision=7173
2003-12-21 23:52:19 +00:00
Filip Navara
d9ade843d5 Bug fixes.
svn path=/trunk/; revision=7172
2003-12-21 22:41:00 +00:00
Thomas Bluemel
fc7a16a754 minimize windows to the left-top desktop edge for now
svn path=/trunk/; revision=7171
2003-12-21 22:38:38 +00:00
Thomas Bluemel
814b5b5e80 prevent crashing with buggy thread cleanup
svn path=/trunk/; revision=7170
2003-12-21 22:09:07 +00:00
Thomas Bluemel
52b2f9b429 reimplemented support for double clicks
svn path=/trunk/; revision=7169
2003-12-21 21:26:29 +00:00
Thomas Bluemel
d97dfed664 slienced a DbgPrint
svn path=/trunk/; revision=7168
2003-12-21 21:21:33 +00:00
Thomas Bluemel
b4ca845b10 reimplemented support for double clicks
svn path=/trunk/; revision=7167
2003-12-21 21:20:31 +00:00
Filip Navara
dea090e06c - Attempt to fix race condition in timer handler. Reported by Jason Filby.
- Temporary disabled NtGdiExtTextOut experimental clipping implementation because it caused problems with buttons.

svn path=/trunk/; revision=7166
2003-12-21 20:37:42 +00:00
Emanuele Aliberti
99af0f4db6 Minor changes to make the posix module partially compile.
svn path=/trunk/; revision=7165
2003-12-21 20:11:46 +00:00
Thomas Bluemel
c3725861f5 removed support for double clicks
svn path=/trunk/; revision=7164
2003-12-21 20:06:45 +00:00
Martin Fuchs
15850784d7 reactivated work around for Z-order problem on Wine
svn path=/trunk/; revision=7163
2003-12-21 19:40:34 +00:00
Filip Navara
6ddff53540 Corrected debug message.
svn path=/trunk/; revision=7162
2003-12-21 19:12:19 +00:00
Filip Navara
f2c4bc3f8b Bug fixes.
svn path=/trunk/; revision=7161
2003-12-21 18:38:37 +00:00
Filip Navara
d8fdb7eddc Fixed problems with caret moving in edit control.
svn path=/trunk/; revision=7160
2003-12-21 16:49:41 +00:00
Thomas Bluemel
4c2b31ef87 Added missing definition of IsDialogMessageA()
svn path=/trunk/; revision=7159
2003-12-21 16:48:23 +00:00
Thomas Bluemel
494b88827c small fixes
svn path=/trunk/; revision=7158
2003-12-21 16:24:19 +00:00
Martin Fuchs
9ac0b83efd use icon with alpha channel
svn path=/trunk/; revision=7157
2003-12-21 15:55:53 +00:00
Thomas Bluemel
3299829b0c small fixes
svn path=/trunk/; revision=7156
2003-12-21 15:08:56 +00:00
Gé van Geldorp
97791f7264 Cleanup outdated files
svn path=/trunk/; revision=7155
2003-12-21 14:43:19 +00:00
Eric Kohl
d44ee8c1b1 Updated welcome.exe.
svn path=/trunk/; revision=7154
2003-12-21 14:38:25 +00:00
Filip Navara
22e7c1f6cb Partial implementation of GetPixel.
svn path=/trunk/; revision=7153
2003-12-21 10:27:10 +00:00
Thomas Bluemel
3ee841df37 moved the INTERNALPOS structure to the WINDOW_OBJECT struct
svn path=/trunk/; revision=7152
2003-12-21 10:19:40 +00:00
Thomas Bluemel
25ef6ca59a Name correction
svn path=/trunk/; revision=7151
2003-12-21 09:46:35 +00:00
Thomas Bluemel
df068a3bdb DefWndHandleSetCursor() sets default cursor for maximized windows' borders
svn path=/trunk/; revision=7150
2003-12-20 22:33:45 +00:00
Thomas Bluemel
6c6cd533e1 partially implemented WM_SETCURSOR messages
svn path=/trunk/; revision=7149
2003-12-20 21:45:14 +00:00
Filip Navara
01d6bd1786 Use of binary search in LdrFindResource_U. Patch by Alexey Stepanenko <alexeystepanenko@mail.ru>.
svn path=/trunk/; revision=7148
2003-12-20 21:43:27 +00:00
Filip Navara
088013a7f1 Added few debug messages.
svn path=/trunk/; revision=7147
2003-12-20 21:43:21 +00:00
Filip Navara
bfebf46a34 Fixed many problems with WS_EX_TOOLWINDOW windows.
svn path=/trunk/; revision=7146
2003-12-20 21:43:10 +00:00
Filip Navara
188c654673 Fixed parameter names of PatBlt.
svn path=/trunk/; revision=7145
2003-12-20 21:43:01 +00:00
Martin Fuchs
67839ab422 avoid error messages with invisible parent windows
svn path=/trunk/; revision=7144
2003-12-20 21:15:23 +00:00
Martin Fuchs
9d96bc3118 work around for incomplete implementation of QueryContextMenu() in Wine
svn path=/trunk/; revision=7143
2003-12-20 20:59:25 +00:00
Martin Fuchs
70d9884109 corrected context menu in explorer windows
svn path=/trunk/; revision=7142
2003-12-20 20:37:59 +00:00
Martin Fuchs
5ff90962eb fixed ShellFolderContextMenu() parameter
svn path=/trunk/; revision=7141
2003-12-20 18:52:50 +00:00
Martin Fuchs
69090b81d4 context menu implementation for desktop window
svn path=/trunk/; revision=7140
2003-12-20 18:23:10 +00:00
Filip Navara
f1977c73d3 Compilation fixes.
svn path=/trunk/; revision=7139
2003-12-20 16:51:40 +00:00
Filip Navara
cdf42cb419 Corrected packing of the structures.
svn path=/trunk/; revision=7138
2003-12-20 16:51:05 +00:00
Thomas Bluemel
b730717d89 install msgina.dll and userinit.exe
svn path=/trunk/; revision=7137
2003-12-20 16:18:31 +00:00
Eric Kohl
fdab84b368 Install bootvid.sys. This fixes bug #98.
svn path=/trunk/; revision=7136
2003-12-20 16:04:20 +00:00
Eric Kohl
44854e906d Don't stop after hardware detection.
svn path=/trunk/; revision=7135
2003-12-20 16:00:20 +00:00
Thomas Bluemel
9efeb21225 some fixes on carets
svn path=/trunk/; revision=7134
2003-12-20 15:42:47 +00:00
Filip Navara
705104e713 Removed space optimalization of XLATEGDI that caused some problems.
svn path=/trunk/; revision=7133
2003-12-20 14:51:41 +00:00
Filip Navara
6594b15c96 Bugfix.
svn path=/trunk/; revision=7132
2003-12-20 14:19:47 +00:00
Eric Kohl
8bb5ad2bd8 - Detect PS/2 Port and Pointer Device (Mouse).
- Calculate CPU speed.
- Fixed delay counter overrun.

svn path=/trunk/; revision=7131
2003-12-20 12:35:27 +00:00
Filip Navara
57af3eb9c8 - Palette fixes.
svn path=/trunk/; revision=7130
2003-12-20 10:31:32 +00:00
Thomas Bluemel
e437baff45 implemented maximize/restore and minimize buttons for windows, minimize and restore need to be fixed, they don't work properly
svn path=/trunk/; revision=7129
2003-12-19 23:20:06 +00:00
Filip Navara
764ff71a49 - Removed last GvG's fix to COMCTL32.
- Implemented proper color -> mono bitmap conversion.

svn path=/trunk/; revision=7128
2003-12-19 22:58:47 +00:00
Thomas Bluemel
9f039ad29c implemented GetMessageExtraInfo() and SetMessageExtraInfo()
svn path=/trunk/; revision=7127
2003-12-19 19:30:05 +00:00
Filip Navara
4bfb4ce695 - Updated COMCTL32 to Wine 20031212 release.
svn path=/trunk/; revision=7126
2003-12-19 16:41:02 +00:00
Gé van Geldorp
c5f80947d5 Create toolbar images as unmasked
svn path=/trunk/; revision=7125
2003-12-18 23:06:58 +00:00
Gé van Geldorp
5ebfb618b2 Since we have created the off-screen bitmap, let's actually use it
svn path=/trunk/; revision=7124
2003-12-18 23:04:54 +00:00
Thomas Bluemel
b3720ef867 IntFindWindowToRepaint() only returns window handles that belong to the given thread
svn path=/trunk/; revision=7123
2003-12-18 21:56:44 +00:00
Thomas Bluemel
83d245a222 small fix
svn path=/trunk/; revision=7122
2003-12-18 21:42:38 +00:00
Aleksey Bragin
964636c2ab Stretchblitting 8->8 bpp implemented
svn path=/trunk/; revision=7121
2003-12-18 18:30:48 +00:00
Aleksey Bragin
10d1fb4bda Stretchblitting 32->32 bpp implemented
svn path=/trunk/; revision=7120
2003-12-18 18:09:48 +00:00
Filip Navara
8bef76d86b Call CreateMDIWindow[AW] from CreateWindowEx[AW] if WS_EX_MDICHILD style is set.
svn path=/trunk/; revision=7119
2003-12-18 16:47:27 +00:00
Filip Navara
3beff4f5a3 Fixed compilation with __USE_W32API.
svn path=/trunk/; revision=7118
2003-12-18 14:07:41 +00:00
Gé van Geldorp
6da76befc4 Fix the error in the original implementation of Unicode status
determination (Filip agrees)

svn path=/trunk/; revision=7117
2003-12-18 13:00:56 +00:00
Art Yerkes
f5a8a4acd8 Final edit for tonight.
svn path=/trunk/; revision=7116
2003-12-18 12:09:58 +00:00
Art Yerkes
d52259a199 Stubs.
svn path=/trunk/; revision=7115
2003-12-18 11:38:00 +00:00
Art Yerkes
770e411257 Added stubbed calls.
svn path=/trunk/; revision=7114
2003-12-18 11:37:46 +00:00
Art Yerkes
ac3e44799f Initial version of dnsapi. Not working yet, but compiling and with
seemingly good code.

svn path=/trunk/; revision=7113
2003-12-18 10:54:48 +00:00
Art Yerkes
9bd7d5ce0f Initial dnsapi sources.
svn path=/trunk/; revision=7112
2003-12-18 10:54:02 +00:00
Art Yerkes
c52179ff55 *** empty log message ***
svn path=/trunk/; revision=7111
2003-12-18 10:50:50 +00:00
Art Yerkes
c411b4045f Added ADNS library. A nice, versatile DNS client library, which forms the
basis of our DNSAPI implementation.

ADNS was written by Ian Jackson (http://www.chiark.greenend.org.uk/~ian/adns/)
and was release under the GPL.  We are using Jarle Aase's win32 port:
(http://adns.jgaa.com/)

Arty added timercmp.h, which contains some missing elements from sys/time.h

svn path=/trunk/; revision=7110
2003-12-18 10:48:20 +00:00
Art Yerkes
47ff6dc9eb WinError and WinDNS headers.
svn path=/trunk/; revision=7109
2003-12-18 10:37:10 +00:00
Art Yerkes
92d507d00a dnsapi test application.
svn path=/trunk/; revision=7108
2003-12-18 10:35:36 +00:00
Gé van Geldorp
78aaee0a8b Allow launching of console apps from GUI apps
svn path=/trunk/; revision=7107
2003-12-18 09:51:08 +00:00
Vizzini
41b4cb6b5a turned off debug spew
svn path=/trunk/; revision=7106
2003-12-17 23:35:10 +00:00
Vizzini
0e8ef19002 - Enable "Full Maps" by default
- IP addresses are now registry-configured, per-adapter
 - Minor bugfix for off-by-one with extended attributes

svn path=/trunk/; revision=7105
2003-12-17 23:34:35 +00:00
Vizzini
fd2014a883 added missing parens, courtesy of mike nordell
svn path=/trunk/; revision=7104
2003-12-17 22:36:20 +00:00
Martin Fuchs
abb4afd9df added TEST code for executing non-folders without shell32
svn path=/trunk/; revision=7103
2003-12-17 22:21:56 +00:00
Filip Navara
d162a9dbc6 Unicodifity of window shouldn't be determined by unicodifity of window class.
svn path=/trunk/; revision=7102
2003-12-17 21:46:10 +00:00
Eric Kohl
4f2ee03f8d Implemented FsRtlDissectName().
svn path=/trunk/; revision=7101
2003-12-17 20:27:06 +00:00
Aleksey Bragin
1fc5217c9b Inserted UNIMPLEMENTED macro definiton, otherwise /lib/user32 won't compile.
svn path=/trunk/; revision=7100
2003-12-17 20:06:10 +00:00
Thomas Bluemel
48cbf21922 fixed destroying child windows and some fixes on menus
svn path=/trunk/; revision=7099
2003-12-17 19:56:13 +00:00
Filip Navara
7127873aac - Print function name in Wine debugging macros.
- Updated COMCTL32 to Wine 20031212 release.

svn path=/trunk/; revision=7098
2003-12-17 18:09:54 +00:00
Filip Navara
c98a386e26 Fixed more registry entries for Shell Folders.
svn path=/trunk/; revision=7097
2003-12-17 17:00:13 +00:00
Filip Navara
540b933d8e Fixed registry entries for Wine DLLs, Shell Folders and some other things.
svn path=/trunk/; revision=7096
2003-12-17 15:53:11 +00:00
Thomas Bluemel
21c54e41c6 fixed dereferencing of child window objects in IntDestroyWindow() and send a WM_DESTROY message to them if they don't belong to the calling thread
svn path=/trunk/; revision=7095
2003-12-17 13:11:55 +00:00
KJK::Hyperion
c64c44c316 - genntdll, shut up
- fixed some forward exports in kernel32
 - fixed a couple of embarassing bugs in my getopt implementation
 - fixed a warning in pipetools

svn path=/trunk/; revision=7094
2003-12-17 01:46:08 +00:00
KJK::Hyperion
b536b4fce2 Some changes to UxTheme to make it compile with GCC
svn path=/trunk/; revision=7093
2003-12-17 01:39:21 +00:00
Gé van Geldorp
d4d929e12c Split CreateFileMapping flags before passing them on to NtCreateSection
svn path=/trunk/; revision=7091
2003-12-16 21:32:18 +00:00
Thomas Bluemel
8ca785b781 deny destroying a window that does not belong to the calling thread
svn path=/trunk/; revision=7090
2003-12-16 18:14:39 +00:00
Aleksey Bragin
23dc27f809 Added include <stdlib.h> to remove warning about abs().
svn path=/trunk/; revision=7089
2003-12-16 17:24:42 +00:00
Richard Campbell
97b6938315 Added a debug note and a warning messages to CopyImage
svn path=/trunk/; revision=7088
2003-12-16 06:51:02 +00:00
Gé van Geldorp
c709b088c9 Directory is empty and doesn't really need a .cvsignore
svn path=/trunk/; revision=7087
2003-12-16 00:10:13 +00:00
Aleksey Bragin
2a3fde38a2 Shrinking bug fixed
svn path=/trunk/; revision=7086
2003-12-15 23:33:45 +00:00
Thomas Bluemel
a8a0a11c74 fixed WinPosWindowFromPoint() to reference the returning window object
svn path=/trunk/; revision=7085
2003-12-15 21:51:10 +00:00
Steven Edwards
09b8fd44b9 Add libwine.a
svn path=/trunk/; revision=7084
2003-12-15 20:50:52 +00:00
Filip Navara
f9b0dd90cd Implementation of [NtGdi]RectVisible.
svn path=/trunk/; revision=7083
2003-12-15 20:47:57 +00:00
Steven Edwards
6e4a63bb10 Added MultiMedia headers to support Winmm.
svn path=/trunk/; revision=7082
2003-12-15 20:21:57 +00:00
Steven Edwards
3a99900c9d Add some basic type information.
svn path=/trunk/; revision=7081
2003-12-15 20:21:13 +00:00
Steven Edwards
23cf9e30b0 Ported Winmm.dll from Winehq CVS 12-15-03.
With help of C. H.

svn path=/trunk/; revision=7080
2003-12-15 20:20:34 +00:00
Thomas Bluemel
8c6352f4f6 change entry point to 0x0
svn path=/trunk/; revision=7079
2003-12-15 20:03:13 +00:00
Steven Edwards
1f896c5c45 More minor cleanup.
svn path=/trunk/; revision=7078
2003-12-15 19:39:37 +00:00
Gé van Geldorp
2836686955 Fix CBT create hook for NULL window name
svn path=/trunk/; revision=7077
2003-12-15 19:32:32 +00:00
Steven Edwards
2eea196a4a Turn off a few more debug messages in the edit control.
svn path=/trunk/; revision=7076
2003-12-15 19:20:27 +00:00
Eric Kohl
47cba05f69 Implemented driver reinitialization.
svn path=/trunk/; revision=7075
2003-12-15 17:50:23 +00:00
Thomas Bluemel
416cb07ba3 fixed handling of WM_MOUSEWHEEL messages...again
svn path=/trunk/; revision=7074
2003-12-15 15:08:33 +00:00
Thomas Bluemel
ff7ca5e860 added WM_NCXBUTTON* messages
svn path=/trunk/; revision=7073
2003-12-15 00:44:52 +00:00
Thomas Bluemel
9d372b138d NtUserDispatchMessage() shouldn't allow calling the window proc if the window doesn't belong to the thread
svn path=/trunk/; revision=7072
2003-12-14 23:52:54 +00:00
Thomas Bluemel
6dda6e7ca6 fixed wrong handling of WM_MOUSEWHEEL messages that caused the desktop thread crashing
svn path=/trunk/; revision=7071
2003-12-14 23:30:32 +00:00
Hartmut Birr
08baddcab7 - Fixed the recursive scan and if there is given a path spec.
- Fixed the displaying of empty dir levels on recursive scans.
- Fixed the call to GetProcAddress for using unicode functions.
- Added more parameters for the call to GetDiskFreeSpaceEx.

svn path=/trunk/; revision=7070
2003-12-14 22:51:52 +00:00
Gé van Geldorp
c0253014fd Disable UNIMPLEMENTED for unknown or global hooks so winEmbed runs again
svn path=/trunk/; revision=7069
2003-12-14 22:34:47 +00:00
Thomas Bluemel
c9edcad72d another fix to message queues and fixed handling of WM_XBUTTONDOWN messages
svn path=/trunk/; revision=7068
2003-12-14 22:14:45 +00:00
Martin Fuchs
d4dd1a3915 fixed Context destructor when constructed using the copy constructor
svn path=/trunk/; revision=7067
2003-12-14 22:10:24 +00:00
Martin Fuchs
ec57d5df80 check for availability of SHRestricted() in shell32.dll
svn path=/trunk/; revision=7066
2003-12-14 21:56:52 +00:00
Filip Navara
303442cb3f Fixed palette locking.
svn path=/trunk/; revision=7065
2003-12-14 21:32:52 +00:00
Filip Navara
7cc31db5e6 Fixed compilation.
svn path=/trunk/; revision=7064
2003-12-14 21:29:42 +00:00
KJK::Hyperion
9a77dd5548 fixed wsock32 export ordinals
svn path=/trunk/; revision=7063
2003-12-14 21:25:42 +00:00
Gé van Geldorp
f5d602de19 Reverse WndProcA and WndProcW, our order is the reverse of the order in
Wine (we should change it)

svn path=/trunk/; revision=7062
2003-12-14 21:07:54 +00:00
Steven Edwards
c8004d7823 Added inital port of Wine Preprocessor
svn path=/trunk/; revision=7061
2003-12-14 19:53:39 +00:00
Steven Edwards
b53aeac47d added internal WINE Preprocessor header.
svn path=/trunk/; revision=7060
2003-12-14 19:51:58 +00:00
Filip Navara
0a1e17fdad Fixed issue that cause user-mode exception stack traces not to work. Patch by Mike Nordell.
svn path=/trunk/; revision=7059
2003-12-14 19:43:09 +00:00
Gé van Geldorp
8f77e7b0ae Implement real locking for GDIOBJ objects
svn path=/trunk/; revision=7058
2003-12-14 19:39:50 +00:00
Steven Edwards
b66d0e5129 More updates for string handling.
svn path=/trunk/; revision=7057
2003-12-14 19:37:03 +00:00
Steven Edwards
11238b6c17 Added new port of WINE controls to get rid of some debug messages
and make the code a little cleaner.

svn path=/trunk/; revision=7056
2003-12-14 19:36:15 +00:00
Thomas Bluemel
fafd8079ae remove message from the list if it was freed in MsqTranslateMouseMessage()
svn path=/trunk/; revision=7055
2003-12-14 19:04:51 +00:00
Filip Navara
2cc22c2214 Added two debugging messages. Patch by Mike Nordell.
svn path=/trunk/; revision=7054
2003-12-14 18:36:15 +00:00
Steven Edwards
1f86ab3ae7 Added simple unix style process killer.
svn path=/trunk/; revision=7053
2003-12-14 18:31:32 +00:00
Hartmut Birr
447dd99842 - Do not place _main into the init section. If ntoskrnl is compiled
with higher optimisation levels, some code from a non init section
  is internal moved to _main. This does crash reactos.

svn path=/trunk/; revision=7052
2003-12-14 18:16:18 +00:00
Hartmut Birr
2d6b3f91ba - Use the correct heap for all heap functions.
svn path=/trunk/; revision=7051
2003-12-14 18:10:05 +00:00
Hartmut Birr
e60b5574fb - Fixed some declarations.
- Removed old linux declarations.

svn path=/trunk/; revision=7050
2003-12-14 18:08:29 +00:00
Hartmut Birr
55bc18d383 - Replaced ctype.h with internal\ctype.h.
On higher optimisation levels like '-O6', gcc does try to
  import some variables which only exist in msvcrt.dll.

svn path=/trunk/; revision=7049
2003-12-14 18:06:44 +00:00
Hartmut Birr
511cae90ca - Removed ctype.h.
svn path=/trunk/; revision=7048
2003-12-14 18:03:59 +00:00
Hartmut Birr
4e7d177b17 - Fixed the declaration of some thread functions.
svn path=/trunk/; revision=7045
2003-12-14 18:02:34 +00:00
Filip Navara
41b0a75f9a - Implementation of [NtUser]GetClipboardFormatName[A/W].
svn path=/trunk/; revision=7044
2003-12-14 17:59:17 +00:00
Hartmut Birr
ca0cd5480e - Fixed some debug messages.
- Removed ctype.h.

svn path=/trunk/; revision=7043
2003-12-14 17:58:00 +00:00
Hartmut Birr
7c2b20a019 - Initialized some local variables.
svn path=/trunk/; revision=7042
2003-12-14 17:56:23 +00:00
Hartmut Birr
271512ad67 - Fixed the initialisation of the core dump service in MmDumpToPagingFile.
svn path=/trunk/; revision=7041
2003-12-14 17:54:22 +00:00
Hartmut Birr
092d37b773 - Added return values to some unimplemented functions.
svn path=/trunk/; revision=7040
2003-12-14 17:51:41 +00:00
Hartmut Birr
e9568da21e - Added return values to some unimplemented functions.
svn path=/trunk/; revision=7039
2003-12-14 17:44:02 +00:00
Martin Fuchs
7401408c91 back to 1.30
svn path=/trunk/; revision=7038
2003-12-14 16:28:07 +00:00
Martin Fuchs
3c84b794d6 shell registry entries for recycle bin
svn path=/trunk/; revision=7037
2003-12-14 16:25:52 +00:00
Thomas Bluemel
b97ddcab8a added multi-threaded multiwin test app
svn path=/trunk/; revision=7036
2003-12-14 16:11:40 +00:00
Eric Kohl
85ab8b5562 Detect serial ports and serial pointer devices (Mice/Trackballs).
svn path=/trunk/; revision=7035
2003-12-14 16:11:34 +00:00
Martin Fuchs
b88b8a633f added Win32 configuration
svn path=/trunk/; revision=7034
2003-12-14 16:08:35 +00:00
Martin Fuchs
3a1d7c32b2 handle Exceptions early to ignore shell32 incompleteness
svn path=/trunk/; revision=7033
2003-12-14 16:07:54 +00:00
Martin Fuchs
e2b92fc4f9 back to 1.30
svn path=/trunk/; revision=7032
2003-12-14 15:48:33 +00:00
Martin Fuchs
460e0e19e3 back to 1.29
svn path=/trunk/; revision=7031
2003-12-14 15:42:59 +00:00
Martin Fuchs
438f6b21f8 registry entries for CLSID_COMPUTER_SEARCH_RESULTS
svn path=/trunk/; revision=7030
2003-12-14 15:39:49 +00:00
Thomas Bluemel
56c46f052a automatically build enumws test app
svn path=/trunk/; revision=7029
2003-12-14 15:13:05 +00:00
Thomas Bluemel
6e1dc58809 remove file from empty directory
svn path=/trunk/; revision=7028
2003-12-14 15:09:48 +00:00
Martin Fuchs
ca67299367 fixed typo
svn path=/trunk/; revision=7027
2003-12-14 15:02:28 +00:00
Martin Fuchs
e9fe559efd added LOG message
svn path=/trunk/; revision=7026
2003-12-14 15:02:17 +00:00
Thomas Bluemel
f0a64ffc31 added missing .cvsignore files
svn path=/trunk/; revision=7025
2003-12-14 15:01:27 +00:00
Filip Navara
ef7550f1ad - Added few ObDereferenceObject calls.
svn path=/trunk/; revision=7024
2003-12-14 14:29:44 +00:00
Thomas Bluemel
a55087b101 dereference thread in NtUserBuildHwndList()
svn path=/trunk/; revision=7023
2003-12-14 14:26:50 +00:00
Thomas Bluemel
5571270a01 win32k now can handle piped mouse input, the obsolete gdi callback can be disabled by changing ENABLEMOUSEGDICALLBACK to 0 (in input.c).
Feel free to fix mouclass to be windows compatible.

svn path=/trunk/; revision=7022
2003-12-14 14:05:47 +00:00
Gé van Geldorp
dbc9a2e835 Fix Unicode/Ansi conversion problem
svn path=/trunk/; revision=7021
2003-12-14 14:01:38 +00:00
Thomas Bluemel
87bff663cd fixed NtUserGetClipboardFormatName()
svn path=/trunk/; revision=7020
2003-12-14 13:55:01 +00:00
Thomas Bluemel
df4f47d0df fixed compiling problems
svn path=/trunk/; revision=7019
2003-12-14 13:26:20 +00:00
Filip Navara
09feaad3e1 - Separation of clipboard routines in win32k.
- Call NtUser* for clipboard functions in user32.
- Minor correction for SetCaretBlinkTime.
- Removed empty userobj.c file.

svn path=/trunk/; revision=7018
2003-12-14 12:39:32 +00:00
Gé van Geldorp
5b81f371b6 Since LoadLibrary is documented to return NULL on failure, use that as
indication of an invalid module handle instead of DDK INVALID_HANDLE_VALUE

svn path=/trunk/; revision=7017
2003-12-14 11:47:54 +00:00
Gé van Geldorp
96e065ecb2 When sending messages to a window in the same thread, call window proc
from usermode instead of from a kernelmode callback

svn path=/trunk/; revision=7016
2003-12-14 11:36:43 +00:00
Martin Fuchs
de49436dfe activated Doxygen option SEARCHENGINE
svn path=/trunk/; revision=7015
2003-12-14 11:15:53 +00:00
Martin Fuchs
1de0a62887 activate Doxygen SEARCHENGINE option
svn path=/trunk/; revision=7014
2003-12-14 10:55:30 +00:00
Martin Fuchs
231aabebcb activate Doxygen SEARCHENGINE option
svn path=/trunk/; revision=7013
2003-12-14 10:50:34 +00:00
Martin Fuchs
e28d71cdbf correct problem with temporary object descruction (reported by G� van Geldorp)
svn path=/trunk/; revision=7012
2003-12-14 10:47:41 +00:00
Martin Fuchs
13ba729805 handle NULL string pointers
svn path=/trunk/; revision=7011
2003-12-14 10:45:11 +00:00
Thomas Bluemel
78f6e71be8 Another crash removed. Patch by Mike Nordell.
svn path=/trunk/; revision=7010
2003-12-14 00:45:39 +00:00
Gé van Geldorp
b295839f98 In RegQueryValueExA, always request the type from RegQueryValueExW, we
need it, even if our caller doesn't, to determine if conversion is required

svn path=/trunk/; revision=7009
2003-12-13 23:59:45 +00:00
Gé van Geldorp
44123858ae Remove optimization (not thread-safe)
svn path=/trunk/; revision=7008
2003-12-13 23:26:04 +00:00
Thomas Bluemel
0d9840021e fixes to cursors
svn path=/trunk/; revision=7007
2003-12-13 22:38:29 +00:00
Gé van Geldorp
d15b8ab119 Print debug message if memory allocation fails
svn path=/trunk/; revision=7006
2003-12-13 21:11:53 +00:00
Filip Navara
87219b9874 Minor correction.
svn path=/trunk/; revision=7005
2003-12-13 19:59:08 +00:00
Thomas Bluemel
c24738870e removed an unneccessary call to BITMAPOBJ_UnlockBitmap. Patch by Mike Nordell.
svn path=/trunk/; revision=7004
2003-12-13 19:53:17 +00:00
Filip Navara
9743e313e0 Updated list of developers.
svn path=/trunk/; revision=7003
2003-12-13 19:47:27 +00:00
Thomas Bluemel
d63d830a62 fixed NtGdiCreateIC() to use UNICODE_STRING
svn path=/trunk/; revision=7002
2003-12-13 19:27:10 +00:00
Gé van Geldorp
1da0ada508 Fix setting z-order of HWND_BOTTOM
svn path=/trunk/; revision=7001
2003-12-13 18:42:52 +00:00
Gé van Geldorp
ff557884f4 Fix rectangle computation in NtUserPaintDesktop() and remove Wine-ism
svn path=/trunk/; revision=7000
2003-12-13 18:40:34 +00:00
Filip Navara
04d3cc439d Fixed boot video driver registry entry.
svn path=/trunk/; revision=6999
2003-12-13 18:36:47 +00:00
Filip Navara
9c5dbfa383 Fixed algorithm for generating driver path.
svn path=/trunk/; revision=6998
2003-12-13 18:35:50 +00:00
Filip Navara
a7d4741918 Desktop should handle WM_ERASEBKGND.
svn path=/trunk/; revision=6997
2003-12-13 16:04:36 +00:00
Thomas Bluemel
b0848526af fixed NtGdiCreateDC() to use UNICODE_STRINGs
svn path=/trunk/; revision=6996
2003-12-13 15:49:32 +00:00
Eric Kohl
619a2c32d9 Initialize IRP.RequestorMode in system functions that can be called from user mode.
Use safe copy routine to copy IoStatusBlock if a system funtion was called from user mode.
Do not use local IoStatusBlock copy in system functions.

svn path=/trunk/; revision=6995
2003-12-13 14:36:42 +00:00
Eric Kohl
90f099cffe Do not probe a user buffer until SEH is usable.
svn path=/trunk/; revision=6994
2003-12-13 14:25:04 +00:00
Thomas Bluemel
63a627527e fixed NtGdiGetDCOrgEx() and NtGdiGetObject()
svn path=/trunk/; revision=6993
2003-12-13 13:45:18 +00:00
Jason Filby
5e4291354e Copied _heapchk(), _heapmin(), _heapset() and _heapwalk() from CRTDLL
svn path=/trunk/; revision=6992
2003-12-13 13:27:46 +00:00
Thomas Bluemel
097d8c9998 fixed NtGdiPolygon() which i accidently broke
svn path=/trunk/; revision=6991
2003-12-13 13:05:30 +00:00
Thomas Bluemel
aa1e1145d5 fixed NtGdiGetClipBox()
svn path=/trunk/; revision=6990
2003-12-13 12:12:41 +00:00
Filip Navara
ce30efdf86 Commented out EnumWindowStationsW and NtUserBuildNameList implementations. If someone wants to work on them, feel free.
svn path=/trunk/; revision=6989
2003-12-13 11:34:53 +00:00
Thomas Bluemel
d646f08d69 fixed NtGdiCreateEllipticRgnIndirect()
svn path=/trunk/; revision=6988
2003-12-13 11:15:06 +00:00
Thomas Bluemel
3f9b54f180 fixed NtGdiPolyPolyline(), NtGdiPolygon() and NtGdiPolyPolygon()
svn path=/trunk/; revision=6987
2003-12-13 10:57:29 +00:00
Thomas Bluemel
5b3541de15 fixed TextIntRealizeFont()
svn path=/trunk/; revision=6986
2003-12-13 10:34:13 +00:00
Thomas Bluemel
3a6264fe95 fixed some line functions to be more secure
svn path=/trunk/; revision=6985
2003-12-13 10:18:01 +00:00
Art Yerkes
a04237fc97 Changed the SPIN_LOCK to a FAST_MUTEX. This is really what belongs there.
svn path=/trunk/; revision=6984
2003-12-13 06:19:59 +00:00
Thomas Bluemel
0d6a146059 added support for the FR_PRIVATE and FR_NOT_ENUM flags for AddFontResourceEx()
svn path=/trunk/; revision=6983
2003-12-12 23:49:48 +00:00
Thomas Bluemel
c3fedb7f0b little bugfix
svn path=/trunk/; revision=6982
2003-12-12 22:57:26 +00:00
Thomas Bluemel
98f06b02ed changed font table to a double-linked list
svn path=/trunk/; revision=6981
2003-12-12 22:50:20 +00:00
Eric Kohl
6010d1fd63 - Fix Unix line breaks.
- Use HAL PCI bus routines in order avoid race conditions.
- Use slot number to distinguish multiple device of the same kind.

svn path=/trunk/; revision=6980
2003-12-12 21:54:42 +00:00
Thomas Bluemel
0dc6bcee53 fixed NtGdiAddFontResource() to accept a PUNICODE_STRING
svn path=/trunk/; revision=6979
2003-12-12 21:37:39 +00:00
Martin Fuchs
2fac53c867 patch of Ge van Geldorp <ge@gse.nl>: added error handling for BackupRead()
svn path=/trunk/; revision=6978
2003-12-12 21:01:35 +00:00
Gé van Geldorp
d59d3daf21 Retrieve tmAveCharWidth font metric
svn path=/trunk/; revision=6977
2003-12-12 20:51:42 +00:00
Thomas Bluemel
b2854c757b implemented GetThreadDesktop()
svn path=/trunk/; revision=6976
2003-12-12 20:44:52 +00:00
Gé van Geldorp
59d7369cf8 Pass dpt parameter on from DrawTextExA to DrawTextExW
svn path=/trunk/; revision=6975
2003-12-12 20:30:02 +00:00
Thomas Bluemel
e76c8bc473 removed no longer needed VIS_RepaintDesktop()
svn path=/trunk/; revision=6974
2003-12-12 18:59:24 +00:00
Thomas Bluemel
a6f864bf92 moved IntGetDesktopWindow() to desktop.c and a few minor fixes
svn path=/trunk/; revision=6973
2003-12-12 18:18:21 +00:00
Gé van Geldorp
f0c3bc979b Implement NtUserGetDCEx() for non-cache DCs
svn path=/trunk/; revision=6972
2003-12-12 17:20:53 +00:00
Thomas Bluemel
08984a5120 Fix kernel-crash when handling user-mode exception with trashed stack pointer. Patch by Mike Nordell.
svn path=/trunk/; revision=6971
2003-12-12 17:09:27 +00:00
Thomas Bluemel
3deb3adee6 don't unlink a window that has no parent window
svn path=/trunk/; revision=6970
2003-12-12 16:56:20 +00:00
Thomas Bluemel
224147dd48 Fix kernel-crash when handling user-mode exception with trashed stack pointer. Patch by Mike Nordell.
svn path=/trunk/; revision=6969
2003-12-12 16:42:16 +00:00
Thomas Bluemel
32930c3ec6 fixed some gdi functions
svn path=/trunk/; revision=6968
2003-12-12 15:47:37 +00:00
Filip Navara
5e5010b3c3 Fixed compilation with DBG == 1.
svn path=/trunk/; revision=6967
2003-12-12 15:33:40 +00:00
Gé van Geldorp
e4ca173e64 Rollback changes which were checked in by accident
svn path=/trunk/; revision=6966
2003-12-12 14:57:23 +00:00
Gé van Geldorp
ae68da49b6 Incomplete implementation of hooks
svn path=/trunk/; revision=6965
2003-12-12 14:22:37 +00:00
Gé van Geldorp
dc8bfd1046 Remove breakpoint left in by accident
svn path=/trunk/; revision=6964
2003-12-12 12:54:30 +00:00
Gé van Geldorp
49546dc5fc Keep reference to display file open
svn path=/trunk/; revision=6963
2003-12-12 12:53:10 +00:00
Martin Fuchs
a754cb4e7f Fix Explorer name
svn path=/trunk/; revision=6962
2003-12-11 23:21:49 +00:00
Aleksey Bragin
43412229b7 Implemented 16bpp to 16bpp scaling. Only stretch now, shrinking works incorrectly! If you find errors in the code - email me.
svn path=/trunk/; revision=6961
2003-12-11 22:55:03 +00:00
Martin Fuchs
4fca2f2538 add mising initializations for ShellExecuteEx()
svn path=/trunk/; revision=6960
2003-12-11 20:14:15 +00:00
Filip Navara
30d25fb859 Small correction for drawing close button. Patch by Mike Nordell.
svn path=/trunk/; revision=6959
2003-12-11 19:36:20 +00:00
Gé van Geldorp
2007f3dbe9 Fix COLOR_3DLIGHT SysColour (or SysColor for our US friends).
Patch by tamlin.

svn path=/trunk/; revision=6958
2003-12-11 16:24:06 +00:00
Thomas Bluemel
24e3b63b61 fixed NtGdiCreateBrushIndirect() and NtGdiPolyPatBlt()
svn path=/trunk/; revision=6957
2003-12-11 15:14:40 +00:00
Thomas Bluemel
8e00d905ca fixed NtGdiCreatePenIndirect()
svn path=/trunk/; revision=6956
2003-12-11 14:48:55 +00:00
Art Yerkes
f11644a0f7 Fixed comments to reflect microseconds.
svn path=/trunk/; revision=6955
2003-12-11 04:23:25 +00:00
Thomas Bluemel
cf7329bc4c don't allow destroying cursors that are currently in use
svn path=/trunk/; revision=6954
2003-12-10 22:47:11 +00:00
Thomas Bluemel
a9272c95c1 store ShellWindow and ShellListView handle in window station and minor fix on destroying icons
svn path=/trunk/; revision=6953
2003-12-10 22:09:56 +00:00
Casper Hornstrup
c4403877c7 2003-12-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/wine2ros: New directory.
	* tools/wine2ros/Makefile: New file.
	* tools/wine2ros/wine2ros.c: Ditto.
	* tools/Makefile (wine2ros_target): Add.
	* rules.mak (WINE2ROS): Define.

svn path=/trunk/; revision=6952
2003-12-10 20:34:53 +00:00
Casper Hornstrup
2e670eb2b9 2003-12-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api/Wine

	* include/basetsd.h: #include_next <basetsd.h>. Add definitions missing
	in w32api.
	* include/mmddk.h: #include_next <mmddk.h>. Add definitions missing in
	w32api.
	* include/wine/winternl.h (DbgPrint): Use ReactOS prototype to avoid
	conflicts.

svn path=/trunk/; revision=6951
2003-12-10 20:15:51 +00:00
Thomas Bluemel
3a313ee195 added a (slightly modified) mdi test application from winprog.org. Thanks to Brook Miles aka theForger
svn path=/trunk/; revision=6950
2003-12-10 19:18:06 +00:00
Gé van Geldorp
71aa8f0389 Re-enabled call to NtUserFindExistingCursorIcon after w3seek found and
fixed the problem in it

svn path=/trunk/; revision=6949
2003-12-10 19:02:33 +00:00
Gé van Geldorp
26e57732ad Advancing the list pointer helps prevent infinite loops
svn path=/trunk/; revision=6948
2003-12-10 17:33:42 +00:00
Thomas Bluemel
d09553720e removed the WM_MDICREATE case from DefWindowProc because it should only be handled by the MDIClient class
svn path=/trunk/; revision=6947
2003-12-10 16:59:00 +00:00
Vizzini
c1e158eb0b minor fix by filip navara
svn path=/trunk/; revision=6946
2003-12-10 16:08:49 +00:00
Richard Campbell
e459bfb085 implemented WM_MDICREATE
svn path=/trunk/; revision=6945
2003-12-10 06:47:32 +00:00
Richard Campbell
0ae62e4d37 Sorry, ultraedit32 is REALLY starting to piss me off.
svn path=/trunk/; revision=6944
2003-12-10 05:41:21 +00:00
Richard Campbell
08ac08a433 Implemented OpenIcon()
svn path=/trunk/; revision=6943
2003-12-10 03:59:18 +00:00
Gé van Geldorp
2989352879 Handle \path\ending\in\slash\ directory searches
svn path=/trunk/; revision=6942
2003-12-09 23:37:59 +00:00
Gé van Geldorp
2f434abd37 Fix some Wine/ReactOS differences
svn path=/trunk/; revision=6941
2003-12-09 23:36:25 +00:00
Filip Navara
0b5e7d7f44 Fixes to get comctl32 compilable again.
svn path=/trunk/; revision=6940
2003-12-09 21:20:31 +00:00
Thomas Bluemel
a890849840 allow caching icons/cursors with different sizes
svn path=/trunk/; revision=6939
2003-12-09 20:58:16 +00:00
Filip Navara
75455da9ab Fixed exports of shlwapi.dll and added .cvsignore.
svn path=/trunk/; revision=6938
2003-12-09 20:07:01 +00:00
Gé van Geldorp
198d453823 Use GRPCURSORICONDIR instead of CURSORICONDIR (latter is defined wrong)
svn path=/trunk/; revision=6937
2003-12-09 19:45:37 +00:00
Gé van Geldorp
2acdd8da85 Temporarily deactivate LR_SHARED handling for icons
svn path=/trunk/; revision=6936
2003-12-09 19:43:38 +00:00
Thomas Bluemel
10e81a9d76 fixed small bug
svn path=/trunk/; revision=6935
2003-12-09 19:38:47 +00:00
Thomas Bluemel
d7faa0cc7a changed handle management of cursors/icons
svn path=/trunk/; revision=6934
2003-12-09 19:34:33 +00:00
Filip Navara
6bb203a698 Fixed compilation of shlwapi.dll.
svn path=/trunk/; revision=6933
2003-12-09 19:07:29 +00:00
Casper Hornstrup
23cb2784b6 2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak (WINEBUILD): Define.
	* tools/winebuild/Makefile: New file.
	* tools/winebuild/import.c (ldcombine_files): Replace mkstemps with Win32
	APIs.
	* tools/winebuild/main.c (main): Win16 specs and relays are not supported.
	* tools/winebuild/spec32.c (EXCEPTION_WINE_STUB, EH_NONCONTINUABLE):
	Define.
	(BuildDef32File): Don't emit PRIVATE.

svn path=/trunk/; revision=6932
2003-12-09 19:02:19 +00:00
Casper Hornstrup
6bb605e497 2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/winebuild: Import winebuild from Wine (D20031208).

svn path=/trunk/; revision=6931
2003-12-09 18:44:25 +00:00
Filip Navara
6830b8c962 Some compilation fixes,
svn path=/trunk/; revision=6930
2003-12-09 18:35:14 +00:00
Gé van Geldorp
adca6ce537 Use default langid if no resource langid given
svn path=/trunk/; revision=6929
2003-12-09 18:22:29 +00:00
Filip Navara
f420913748 Initial port of shlwapi.dll from Wine that doesn't compile yet. I don't want to keep it private, but there is still one file that doesn't compile. If anyone wants to go and fix it, feel free to do so.
svn path=/trunk/; revision=6928
2003-12-09 16:50:53 +00:00
Filip Navara
8615f19c50 Preparing for import of new Wine DLLs...
svn path=/trunk/; revision=6927
2003-12-09 16:44:49 +00:00
Aleksey Bragin
f104e01daa Removed unnecessary debug message.
svn path=/trunk/; revision=6926
2003-12-09 14:28:48 +00:00
Gé van Geldorp
a58f6413da Handle NULL FilePart
svn path=/trunk/; revision=6925
2003-12-09 10:38:05 +00:00
Gé van Geldorp
59ca8af658 Release mutex if handle not found
svn path=/trunk/; revision=6924
2003-12-08 22:51:11 +00:00
Casper Hornstrup
61fe50f6f6 2003-12-08 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/win32k/text.h (NtGdiExtTextOut): Follow ExtTextOut prototype.
	* lib/gdi32/objects/text.c (ExtTextOutW): Call NtGdiExtTextOut().
	* lib/user32/controls/edit.c (EDIT_BuildLineDefs_ML): Order parameters to
	CreateRectRgn().
	* lib/user32/windows/draw.c (TabbedTextOutA): Implement.
	(TEXT_TabbedTextOut): New function.
	(TabbedTextOutW): Implement.
	* subsys/win32k/objects/text.c (NtGdiExtTextOut): Call NtGdiTextOut() for
	now.

svn path=/trunk/; revision=6923
2003-12-08 20:58:44 +00:00
Gé van Geldorp
bfb695a0b4 Introduce separate lock for hardware message list
svn path=/trunk/; revision=6922
2003-12-08 20:40:41 +00:00
Hartmut Birr
6edff6b843 - Open the file for synchronous access in OpenFile.
svn path=/trunk/; revision=6921
2003-12-08 19:50:31 +00:00
Hartmut Birr
24c6c9673c - Check for illegal characters for short file names in RtlIsNameLegalDOS8Dot3.
svn path=/trunk/; revision=6920
2003-12-08 19:47:07 +00:00
Filip Navara
a060d87754 Fix for buggy libc under Linux. Patch by Sebastian Schmidt <yath@yath.eu.org>.
svn path=/trunk/; revision=6919
2003-12-08 19:17:56 +00:00
Filip Navara
592352cbb8 Converted '.phony' to '.PHONY'. Patch by Sebastian Schmidt.
svn path=/trunk/; revision=6918
2003-12-08 19:10:44 +00:00
Aleksey Bragin
52522c1d07 EngStretchBlt() removed from stubs
svn path=/trunk/; revision=6917
2003-12-08 18:41:59 +00:00
Filip Navara
7c18970a16 Implementation of ScrollWindow, ScrollWindowEx, ScrollDC and DDE ported from Wine.
svn path=/trunk/; revision=6916
2003-12-08 18:21:25 +00:00
Aleksey Bragin
893644d308 Changes to NtGdiStretchBlt().
If you encounter any problems compiling (though you shouldn't) -- I'm in IRC now.

svn path=/trunk/; revision=6915
2003-12-08 18:09:08 +00:00
Aleksey Bragin
2a9609d601 Note SURFGDI structure change --- added new DIB function called DIB_StretchBlt().
StretchBlt() skeleton is now working as it should (w/o some clipping, stretching modes set, but all this is marked either as FIXME or TODO).

svn path=/trunk/; revision=6914
2003-12-08 18:07:56 +00:00
Aleksey Bragin
c1eb7e7ef1 Added stubs for DIB_StretchBlt() functions for each BPP
svn path=/trunk/; revision=6913
2003-12-08 18:05:30 +00:00
Aleksey Bragin
c7588268ef Added IntEngStretchBlt() implementation.
If your video driver supports DrvStretchBlt(), it should already work.

svn path=/trunk/; revision=6912
2003-12-08 11:11:11 +00:00
Aleksey Bragin
d4638a1fd5 Added initial NtGdiStretchBlt() implementation
svn path=/trunk/; revision=6911
2003-12-08 11:10:02 +00:00
Aleksey Bragin
5d1f3e4b20 Added declaration of IntEngStretchBlt()
svn path=/trunk/; revision=6910
2003-12-08 11:08:27 +00:00
Gé van Geldorp
813825fd27 Handle NULL fname
svn path=/trunk/; revision=6909
2003-12-08 10:25:26 +00:00
Gé van Geldorp
89d0892531 Move desktop window proc from WIN32K to CSRSS
svn path=/trunk/; revision=6908
2003-12-07 23:02:57 +00:00
Thomas Bluemel
bfcd20af5e added check for hInstance in UnregisterClass()
svn path=/trunk/; revision=6907
2003-12-07 23:01:01 +00:00
Filip Navara
088e628e66 Implementation of _expand and _msize.
svn path=/trunk/; revision=6906
2003-12-07 22:59:13 +00:00
Thomas Bluemel
24c9fab813 implemented UnregisterClass()
svn path=/trunk/; revision=6905
2003-12-07 22:25:34 +00:00
Thomas Bluemel
7c98a98880 moved desktop code to desktop.c
svn path=/trunk/; revision=6904
2003-12-07 19:29:33 +00:00
Filip Navara
62acb5b575 Basic implementation of CopyImage and FindWidowExA.
svn path=/trunk/; revision=6903
2003-12-07 18:54:15 +00:00
Thomas Bluemel
11eed94164 fixed minor bug
svn path=/trunk/; revision=6902
2003-12-07 17:22:13 +00:00
Casper Hornstrup
13a5b00db7 2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/windows/accel.c (U32IsValidAccelMessage): Translate WM_KEYUP
	and WM_SYSKEYUP messages.
	(TranslateAcceleratorA): Returntype of RtlMultiByteToUnicodeN is NTSTATUS,
	so interpret it as such.
	* subsys/win32k/ntuser/accelerator.c (NtUserDestroyAcceleratorTable):
	Call ObmCloseHandle() before destroying the object.
	(IntTranslateAccelerator): New function.
	(NtUserTranslateAccelerator): Partial implementation.

svn path=/trunk/; revision=6901
2003-12-07 16:54:44 +00:00
Martin Fuchs
d85259d689 relative paths for option STRIP_FROM_PATH; avtivate source browsing
svn path=/trunk/; revision=6900
2003-12-07 16:46:31 +00:00
Martin Fuchs
9dd0e68761 make docu
svn path=/trunk/; revision=6899
2003-12-07 15:16:17 +00:00
Thomas Bluemel
7a1f816ca0 implemented NtUserCopyAcceleratorTable()
svn path=/trunk/; revision=6898
2003-12-07 14:21:00 +00:00
Martin Fuchs
79b526c30c comment
svn path=/trunk/; revision=6897
2003-12-07 13:40:08 +00:00
Martin Fuchs
5c0386cd16 incldue/exclude cleanup
svn path=/trunk/; revision=6896
2003-12-07 13:20:05 +00:00
Thomas Bluemel
62a63e2892 fixed releasing window object
svn path=/trunk/; revision=6895
2003-12-07 13:14:22 +00:00
Martin Fuchs
c5db293dcf added lib Doxygen config file
svn path=/trunk/; revision=6894
2003-12-07 13:08:02 +00:00
Martin Fuchs
39c8ef6f55 fix freetype typo
svn path=/trunk/; revision=6893
2003-12-07 13:00:18 +00:00
Casper Hornstrup
5efa33af96 2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/win32k/include/accelerator.h: New file.
	* subsys/win32k/ntuser/accelerator.c: Ditto.
	* include/win32k/ntuser.h (NtUserDestroyAcceleratorTable): Make returntype
	BOOLEAN.
	* subsys/win32k/makefile (NTUSER_OBJECTS): Add ntuser/accelerator.o.
	* subsys/win32k/include/object.h (USER_OBJECT_TYPE): Add otAcceleratorTable.
	* subsys/win32k/main/dllmain.c (DllMain): Call InitAcceleratorImpl().
	* subsys/win32k/ntuser/stubs.c (NtUserCopyAcceleratorTable,
	NtUserCreateAcceleratorTable, NtUserDestroyAcceleratorTable,
	NtUserTranslateAccelerator): Move to accelerator.c.

svn path=/trunk/; revision=6892
2003-12-07 12:59:34 +00:00
Martin Fuchs
22e15cb2f5 disabled pipetools compilation for cross compilation
svn path=/trunk/; revision=6891
2003-12-07 12:54:13 +00:00
Casper Hornstrup
b04c081348 2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/accelerator: New directory.
	* apps/tests/accelerator/accelerator.c: New file.
	* apps/tests/accelerator/.cvsignore: Ditto.
	* apps/tests/accelerator/Makefile: Ditto.
	* apps/tests/Makefile (TEST_APPS): Add accelerator.

svn path=/trunk/; revision=6890
2003-12-07 12:40:22 +00:00
Martin Fuchs
35e7df613e removed buildno.h from CVS
svn path=/trunk/; revision=6889
2003-12-07 12:38:55 +00:00
Martin Fuchs
2977c52afb Spaces
svn path=/trunk/; revision=6888
2003-12-07 12:10:09 +00:00
Martin Fuchs
d240c51df0 added doxygen config file for NTDLL and Freetype
svn path=/trunk/; revision=6887
2003-12-07 12:08:20 +00:00
Martin Fuchs
e1ad4ca5fc added doxygen config file for Freetype
svn path=/trunk/; revision=6886
2003-12-07 12:07:58 +00:00
Martin Fuchs
d490efa934 added doxygen config file for NTDLL
svn path=/trunk/; revision=6885
2003-12-07 12:06:45 +00:00
Martin Fuchs
659fa2aab8 added doxygen config file
svn path=/trunk/; revision=6884
2003-12-07 12:06:15 +00:00
Casper Hornstrup
3e8873192b 2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* regtests/Makefile: Generate regression test registrations.
	* regtests/kmregtests/.cvsignore: Ignore Makefile.tests.
	* regtests/win32base/.cvsignore: Ditto.
	* regtests/kmregtests/Makefile: Include Makefile.tests.
	* regtests/win32base/Makefile: Ditto.
	* regtests/kmregtests/tests: New directory.
	* regtests/win32base/tests: Ditto.
	* regtests/kmregtests/tests/.cvsignore: New file.
	* regtests/win32base/tests/.cvsignore: Ditto.
	* tools/helper.mk: Remove TARGET_GENREGTESTS.
	* tools/regtests.c: Generate makefile for regression tests.
	(change_extension): New function.
	* regtests/win32base/file-1.c: Move ...
	* regtests/win32base/tests/file-1.c: ... here.

svn path=/trunk/; revision=6883
2003-12-07 11:34:41 +00:00
Filip Navara
c22a7eb6ed Basic StretchDIBits implementation.
svn path=/trunk/; revision=6882
2003-12-07 10:31:56 +00:00
Filip Navara
419d47d89f Window classes/Atom fixes
svn path=/trunk/; revision=6881
2003-12-07 10:31:22 +00:00
Martin Fuchs
b2c247faf1 corrected EXCLUDE option
svn path=/trunk/; revision=6880
2003-12-07 08:35:57 +00:00
Filip Navara
08dcc0e1a6 Modification for compatibility with crtdll.
svn path=/trunk/; revision=6879
2003-12-07 08:23:18 +00:00
Thomas Bluemel
bcee43d68f a few changes
svn path=/trunk/; revision=6878
2003-12-07 01:17:28 +00:00
Thomas Bluemel
2be74a0eb2 added userinit application
svn path=/trunk/; revision=6877
2003-12-07 01:12:58 +00:00
Martin Fuchs
157d55a8aa adjusted tree view width
svn path=/trunk/; revision=6876
2003-12-07 00:15:40 +00:00
Martin Fuchs
d95e0e6fac adjusted doxygen options
svn path=/trunk/; revision=6875
2003-12-07 00:10:21 +00:00
Thomas Bluemel
0b4f93260c some more work on winlogon
svn path=/trunk/; revision=6874
2003-12-07 00:04:20 +00:00
Thomas Bluemel
ab4deea68c make CreateProcessAsUser() call CreateProcess() as we don't support user login
svn path=/trunk/; revision=6873
2003-12-06 23:29:35 +00:00
Martin Fuchs
f32217a0af initial doxygen configuration
svn path=/trunk/; revision=6872
2003-12-06 23:26:20 +00:00
Martin Fuchs
7a059d5382 integrated explorer documentaion build
svn path=/trunk/; revision=6871
2003-12-06 23:22:30 +00:00
Martin Fuchs
18173aff8b initial doxygen configuraion
svn path=/trunk/; revision=6870
2003-12-06 23:11:41 +00:00
Martin Fuchs
c327cd0a03 adjust displayed file tree
svn path=/trunk/; revision=6869
2003-12-06 21:04:22 +00:00
Filip Navara
6d529771a4 Bugfixes
svn path=/trunk/; revision=6868
2003-12-06 20:58:27 +00:00
Martin Fuchs
ba1e3f3b39 one more correction
svn path=/trunk/; revision=6867
2003-12-06 20:30:35 +00:00
Martin Fuchs
3e8376db45 corrected implementation of backup stream reading
svn path=/trunk/; revision=6866
2003-12-06 20:21:08 +00:00
Martin Fuchs
e8ecaa9aa1 basic support to display NTFS streams in winefile windows
svn path=/trunk/; revision=6865
2003-12-06 17:15:38 +00:00
Filip Navara
558e83ae6a - Removed winedbgc.dll from reactos.dff. Reported by Casper Hornstrup.
svn path=/trunk/; revision=6864
2003-12-05 16:21:03 +00:00
Gé van Geldorp
1359df41a4 Make room for error status code when invalid request is received
svn path=/trunk/; revision=6863
2003-12-05 08:43:16 +00:00
Aleksey Bragin
08340b2f6f Make StretchBlt() call NtGdiStretchBlt() if src and dest sizes differs, otherwise calls BitBlt() as it was already done.
svn path=/trunk/; revision=6862
2003-12-04 21:37:07 +00:00
Aleksey Bragin
578a12d532 Skeleton of NtGdiStretchBlt() implemented.
svn path=/trunk/; revision=6861
2003-12-04 21:35:11 +00:00
Richard Campbell
8a1c4241be Added a branch of linux-ntfs based on kernel 2.6.0test11, this can be used as a FOUNDATION for building a STABLE read/write ntfs driver. check out http://linux-ntfs.sf.net for details on this driver.
svn path=/trunk/; revision=6860
2003-12-04 18:03:56 +00:00
Filip Navara
f0d7ce034e - Fixed MSVCRTand CRTDLL building.
svn path=/trunk/; revision=6859
2003-12-04 13:23:26 +00:00
Gé van Geldorp
1ffe9401f6 Remove direct references from csrss to win32k (call via user32/gdi32 only)
svn path=/trunk/; revision=6858
2003-12-03 21:50:50 +00:00
Gé van Geldorp
42158841dc Don't release a mutex which wasn't acquired
svn path=/trunk/; revision=6857
2003-12-03 21:38:14 +00:00
Gé van Geldorp
06f996f723 Properly initialize variable before it is used
svn path=/trunk/; revision=6856
2003-12-03 21:37:34 +00:00
Gé van Geldorp
e11e69e45f Fix creation of display-compatible DCs
svn path=/trunk/; revision=6855
2003-12-03 19:28:23 +00:00
Filip Navara
4db35a9424 - Fixed a typo.
svn path=/trunk/; revision=6854
2003-12-03 18:58:41 +00:00
Filip Navara
a27b1a9ef3 - Patched prsht.h bug reported by Jonathan Wilson.
- Applied MSVCRT_doserrno patch by Mark Weaver <mark@npsl.co.uk>.

svn path=/trunk/; revision=6853
2003-12-03 17:17:03 +00:00
Gé van Geldorp
883794822c Clean up attach hack a little bit, it's still a hack though
svn path=/trunk/; revision=6852
2003-12-03 16:57:22 +00:00
Gé van Geldorp
14f190d1d4 Handle ClipRegion == 1 as a special case in NtUserGetDCEx()
svn path=/trunk/; revision=6851
2003-12-03 08:19:03 +00:00
Filip Navara
c2e130256e Fixed build errors.
svn path=/trunk/; revision=6850
2003-12-02 20:13:30 +00:00
Filip Navara
b4e30cf77b - Attempt to fix window activation bugs reported by G� van Geldorp and Thomas Weidenmueller.
svn path=/trunk/; revision=6849
2003-12-02 19:58:54 +00:00
Filip Navara
c2642685e7 - Replaced winedbg.dll with static library libwine.a.
svn path=/trunk/; revision=6848
2003-12-02 18:12:05 +00:00
Gé van Geldorp
9b6a56054d Fix called routine names
svn path=/trunk/; revision=6847
2003-12-02 11:45:37 +00:00
Gé van Geldorp
01c43b8e32 CSRSS code shuffle
svn path=/trunk/; revision=6846
2003-12-02 11:44:01 +00:00
Gé van Geldorp
4e366db69f CSRSS code reshuffle
svn path=/trunk/; revision=6845
2003-12-02 11:38:47 +00:00
Steven Edwards
ea6699f39e Removed the old Winedbg.c from NTDLL.
svn path=/trunk/; revision=6844
2003-12-01 23:09:56 +00:00
Filip Navara
5a08456bc0 - Cleaned up unused bits of winedbgc.
svn path=/trunk/; revision=6843
2003-12-01 21:59:49 +00:00
Filip Navara
76a9aa1474 - Some small fixes on debugging macros.
- Translating of most Wine debugging macros to ReactOS ones.

svn path=/trunk/; revision=6842
2003-12-01 18:28:54 +00:00
Thomas Bluemel
e4b1dac7b7 some work on winlogon
svn path=/trunk/; revision=6841
2003-12-01 18:21:04 +00:00
Martin Fuchs
695f82be0d fixed clean target
svn path=/trunk/; revision=6840
2003-11-30 22:49:12 +00:00
Martin Fuchs
d049dc52ef added first version of pipetools; fixed clean target
svn path=/trunk/; revision=6839
2003-11-30 22:48:54 +00:00
Martin Fuchs
85ba55d94e added first version of pipetools
svn path=/trunk/; revision=6838
2003-11-30 22:48:19 +00:00
Filip Navara
ef4ad83edf Attempt to fix WinPosActivateOtherWindow problem reported by GvG.
svn path=/trunk/; revision=6837
2003-11-30 22:48:11 +00:00
Gunnar Dalsnes
1c863eef7a -temporary and ugly fix/work-around for a bug that made CreateFileW crash
when calling it directly (meaning not indirectly thru CreateFileA)

svn path=/trunk/; revision=6836
2003-11-30 20:48:07 +00:00
Gunnar Dalsnes
0901ecbf1a -made an inadvertent asynch. read into a synch. read
svn path=/trunk/; revision=6835
2003-11-30 20:37:34 +00:00
Filip Navara
7603377ffd Forgot to add these files.
svn path=/trunk/; revision=6834
2003-11-30 20:29:09 +00:00
Filip Navara
791bef9a1b Work on activation/focus.
svn path=/trunk/; revision=6833
2003-11-30 20:03:47 +00:00
Gunnar Dalsnes
863613cbbd -user apc was called with incorrect SystemParameter1
svn path=/trunk/; revision=6832
2003-11-30 20:03:01 +00:00
Gunnar Dalsnes
33ab7e9567 -hopefully fix bug where IoSecondStageCompletion was sometimes
called at DISPATCH_LEVEL

svn path=/trunk/; revision=6831
2003-11-30 20:01:05 +00:00
Gunnar Dalsnes
322bc58d98 -removed "safe" stuff
-ByteOffset is not optional for asynch. operations!!!
-fixes and cleanup

svn path=/trunk/; revision=6830
2003-11-30 19:59:41 +00:00
Gunnar Dalsnes
764fff22b4 -ReadFile(Ex)/WriteFile(Ex): fixed return values and last errors to comply
with sdk
-ReadFileEx/WriteFileEx: fixed apc callback routine

svn path=/trunk/; revision=6829
2003-11-30 19:50:42 +00:00
Gé van Geldorp
6cbc61a453 Hack around attaching a process to an already attached thread
svn path=/trunk/; revision=6828
2003-11-30 19:15:21 +00:00
Gunnar Dalsnes
d6b77edb3c After enabling regular kmode APC's I have experienced random crashes.
I'm disabling it again, until we fix the APC implementation...

svn path=/trunk/; revision=6827
2003-11-30 19:00:02 +00:00
Gé van Geldorp
31c9e79de0 Silence confusing debug message
svn path=/trunk/; revision=6826
2003-11-30 18:55:57 +00:00
Gunnar Dalsnes
f495637b1f added error checking macros
svn path=/trunk/; revision=6825
2003-11-30 18:51:43 +00:00
Hartmut Birr
ee52d15ec0 - Call MmDeletePageFileMapping with the process in MmNotPresentFaultVirtualMemory.
This is necessary for dereferencing the user mode page table.

svn path=/trunk/; revision=6824
2003-11-30 17:24:22 +00:00
Hartmut Birr
36e302cc70 - Use binary search for the offset within the pagefile.
- Reduce the overhead for retrieving the sector offsets for page files while initialisation.

svn path=/trunk/; revision=6823
2003-11-30 17:19:28 +00:00
Hartmut Birr
8f5fca485e - Protect the region for the kernel mapped low memory with a memory area.
- Unmap the mapped low memory above 1mb (0xd0100000-0xd03fffff).

svn path=/trunk/; revision=6822
2003-11-30 17:17:02 +00:00
Martin Fuchs
949a4954aa added -break command line option for debug breakpoints
svn path=/trunk/; revision=6821
2003-11-30 17:13:28 +00:00
Steven Edwards
d9cd4fb435 Cabman is now a build tool. So we can remove this copy.
svn path=/trunk/; revision=6820
2003-11-29 22:08:44 +00:00
Martin Fuchs
13347e7de3 implemented GDB stub for remote debugging
svn path=/trunk/; revision=6819
2003-11-29 21:56:23 +00:00
Casper Hornstrup
13400788e1 2003-11-29 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/cabman/dfp.cxx (CDFParser::Parse): Allow TokenString.
	(CDFParser::PerformFileCopy): Use CurrentChar instead of length of
	CurrentString to find the start of the next token.

svn path=/trunk/; revision=6818
2003-11-29 19:30:19 +00:00
Steven Edwards
977cdc663a add a winternl.h header untill Mingw has one or our SDK is fixed.
svn path=/trunk/; revision=6817
2003-11-29 18:09:43 +00:00
Richard Campbell
16f8dec540 Install comctl32, winmm, and ole32
svn path=/trunk/; revision=6816
2003-11-29 14:46:12 +00:00
Richard Campbell
4b9a27a78a Added winmm, comctl32, and ole32 to the build system since they now properly build
svn path=/trunk/; revision=6815
2003-11-29 14:41:45 +00:00
Richard Campbell
13154777a5 temporarily commented out CreateStreamOnHGlobal, this gets ole32 compiling with the ROS build system
svn path=/trunk/; revision=6814
2003-11-29 14:40:40 +00:00
Richard Campbell
4dac7c9df2 commented out the GUID definition since it's already defined elsewhere
svn path=/trunk/; revision=6813
2003-11-29 14:38:16 +00:00
Steven Edwards
b63bf89d46 Updated license header to reflect relicense by Brian Palmer.
Converted Comments from C++ style to C.
(WINE is going to adopt our taskmgr soon)

svn path=/trunk/; revision=6812
2003-11-29 02:31:24 +00:00
Eric Kohl
1fb5fb5f1e Ignore event object for synchronous file operations.
svn path=/trunk/; revision=6811
2003-11-28 17:17:44 +00:00
Gé van Geldorp
b504c52de2 Fix single-stepping through usermode code
svn path=/trunk/; revision=6810
2003-11-27 22:58:24 +00:00
Gunnar Dalsnes
8a62f29d9e misc
svn path=/trunk/; revision=6809
2003-11-27 20:57:58 +00:00
Gunnar Dalsnes
d31fda6197 return correct info when overwriting files
svn path=/trunk/; revision=6808
2003-11-27 20:49:07 +00:00
Gunnar Dalsnes
b4d0d3aaf0 apc work
svn path=/trunk/; revision=6807
2003-11-27 01:13:05 +00:00
Gunnar Dalsnes
05dd288048 fixed/improved GetOverlappedResult
svn path=/trunk/; revision=6806
2003-11-27 00:57:57 +00:00
Gunnar Dalsnes
ebdb1b6328 disable regular kmode apc's around Resource locks
svn path=/trunk/; revision=6805
2003-11-27 00:52:16 +00:00
Gé van Geldorp
1d9998a97f Fix ownership of driver-created palettes
svn path=/trunk/; revision=6804
2003-11-26 22:24:04 +00:00
Filip Navara
0b8af550d1 - Small fixes to get combo boxes working.
svn path=/trunk/; revision=6803
2003-11-26 22:02:39 +00:00
Gé van Geldorp
b92c914a3d Fix some GDIOBJ ownership issues
svn path=/trunk/; revision=6802
2003-11-26 21:48:35 +00:00
Filip Navara
c9d415f9d2 - Support for index NUMRESERVED in NtGdiGetDeviceCaps.
svn path=/trunk/; revision=6801
2003-11-26 18:44:08 +00:00
Vizzini
fcfd77241a Fixed a race condition on unload, other minor clean-up, now loads and runs correctly on win2ksp4 checked w/ full verifier
svn path=/trunk/; revision=6800
2003-11-26 09:12:07 +00:00
Art Yerkes
d50eee1838 Fixes described in resolution to bug #51.
svn path=/trunk/; revision=6799
2003-11-26 04:38:25 +00:00
Gé van Geldorp
d1dcdd7a8d Fix DC leak
svn path=/trunk/; revision=6798
2003-11-25 23:47:10 +00:00
Gé van Geldorp
12903da5d6 Avoid message about invalid GDI object
svn path=/trunk/; revision=6797
2003-11-25 23:46:23 +00:00
Gé van Geldorp
a6e0b948ad Silence debug messages again
svn path=/trunk/; revision=6796
2003-11-25 22:28:00 +00:00
Gé van Geldorp
8122f72b7d Switch screen to graphics mode when the first window or DC is created
and switch back to text mode when the last app which created a window
or DC terminates

svn path=/trunk/; revision=6795
2003-11-25 22:11:37 +00:00
Gé van Geldorp
152368464d Switch screen to graphics mode when the first window or DC is created
and switch back to text mode when the last app which created a window
or DC terminates

svn path=/trunk/; revision=6794
2003-11-25 22:06:31 +00:00
Art Yerkes
500ec5fe43 Shift now cancels Numlock, as it does on real windows.
svn path=/trunk/; revision=6793
2003-11-25 01:09:06 +00:00
Gé van Geldorp
5e30da094e Clean up DCEs when switching out of graphics mode
svn path=/trunk/; revision=6792
2003-11-24 21:20:35 +00:00
Filip Navara
c4f578c98c - Small SetWindowPos fixes.
svn path=/trunk/; revision=6791
2003-11-24 21:01:20 +00:00
Eric Kohl
cadbbd51c9 Remove 'dist' target.
svn path=/trunk/; revision=6790
2003-11-24 20:39:16 +00:00
Eric Kohl
007e7e2dff Remove 'dist' target.
Don't build gditest any longer.

svn path=/trunk/; revision=6789
2003-11-24 20:37:35 +00:00
Eric Kohl
164e88185b Build registry hives in 'make install'.
Don't build gstart any longer.

svn path=/trunk/; revision=6788
2003-11-24 20:36:49 +00:00
Thomas Bluemel
c3ba871830 implemented WlxStartApplication() and WlxActivateUserShell()
svn path=/trunk/; revision=6787
2003-11-24 19:04:23 +00:00
Thomas Bluemel
42e71f0a9a implemented WlxInitialize()
svn path=/trunk/; revision=6786
2003-11-24 17:24:29 +00:00
Eric Kohl
337d61cb38 Remove 'dist' target
svn path=/trunk/; revision=6784
2003-11-24 16:48:41 +00:00
Eric Kohl
f20728dbc4 Print received error message.
svn path=/trunk/; revision=6783
2003-11-24 16:41:41 +00:00
Gé van Geldorp
1e4cbe0f46 Silence debug messages
svn path=/trunk/; revision=6782
2003-11-24 16:19:58 +00:00
Thomas Bluemel
950a4d9cea implemented WlxNegotiate()
svn path=/trunk/; revision=6781
2003-11-24 15:28:54 +00:00
Eric Kohl
befdc5d94a Tiny cleanup.
svn path=/trunk/; revision=6780
2003-11-24 14:53:02 +00:00
Eric Kohl
82a3cf5fc1 - Remove 'dist' target.
- Set default install directory for windows to 'C:\reactos'.
- Remove dependency checks from 'install' and 'bootcd' targets.

svn path=/trunk/; revision=6779
2003-11-24 14:41:29 +00:00
Thomas Bluemel
7dde2ec587 added header file for msgina
svn path=/trunk/; revision=6778
2003-11-24 14:28:27 +00:00
Thomas Bluemel
2432b2c7e8 added skeleton for msgina.dll
svn path=/trunk/; revision=6777
2003-11-24 14:25:28 +00:00
Gé van Geldorp
71664eb842 Silence debug messages
svn path=/trunk/; revision=6776
2003-11-24 14:19:52 +00:00
Gé van Geldorp
efdbadfbef Silence debug messages
svn path=/trunk/; revision=6775
2003-11-24 14:04:36 +00:00
Thomas Bluemel
415bdc5e7c moved IntIsMenu() to menu.c
svn path=/trunk/; revision=6774
2003-11-24 09:27:54 +00:00
Art Yerkes
a370e8e8d3 Sorry, did a bad commit on this file. Reverting to 1.143, the previous rev.
svn path=/trunk/; revision=6773
2003-11-24 00:26:08 +00:00
Art Yerkes
d792147982 These changes are described in earlier posts to the ros-kernel list.
I believe everything here is correct, Alt+Gr works with the french keyboard,
Numlock and Capslock work normally in my testing.

svn path=/trunk/; revision=6772
2003-11-24 00:22:53 +00:00
Gunnar Dalsnes
108b5183a6 Fixed to run on real Windows (but still doesn't run on ROS)
svn path=/trunk/; revision=6771
2003-11-24 00:12:04 +00:00
Martin Fuchs
b732658891 a bit of refactoring
svn path=/trunk/; revision=6770
2003-11-23 23:03:03 +00:00
Martin Fuchs
cfb3861175 enable console debug logs
svn path=/trunk/; revision=6769
2003-11-23 22:04:41 +00:00
Martin Fuchs
de8a2594e8 QuickLaunchBar-CONTEXT information
svn path=/trunk/; revision=6768
2003-11-23 20:00:43 +00:00
Martin Fuchs
963f962bc6 ANS/UNC utilities for ostringstream; more CONTEXT information
svn path=/trunk/; revision=6766
2003-11-23 15:44:14 +00:00
Martin Fuchs
5a5723bad2 Context Trace Outputs for Exceptions
svn path=/trunk/; revision=6765
2003-11-23 14:23:55 +00:00
Thomas Bluemel
e79ee7d5e6 added missing ObDereferenceObject calls
svn path=/trunk/; revision=6764
2003-11-23 13:46:33 +00:00
Thomas Bluemel
1d4b120ca5 use IntGetWindowObject() and IntReleaseWindowObject()
svn path=/trunk/; revision=6763
2003-11-23 12:41:42 +00:00
Thomas Bluemel
bfb5636854 moved IntIsMenu() to menu.c
svn path=/trunk/; revision=6762
2003-11-23 12:31:53 +00:00
Thomas Bluemel
b478b61c31 remove obsolete userobj code
svn path=/trunk/; revision=6761
2003-11-23 12:24:21 +00:00
Martin Fuchs
e900128ead logging using OutputDebugString()
svn path=/trunk/; revision=6760
2003-11-23 12:13:39 +00:00
Thomas Bluemel
2314762543 revert my implementation of WM_SETCURSOR messages
svn path=/trunk/; revision=6759
2003-11-23 12:08:00 +00:00
Thomas Bluemel
57264c6ac9 some fixes in NtUserGetGUIThreadInfo()
svn path=/trunk/; revision=6758
2003-11-23 12:04:54 +00:00
Filip Navara
9daca17473 - Added test for unimplemented EnumWindowStations and EnumDesktops functions.
- Small window station cleanup.

svn path=/trunk/; revision=6757
2003-11-23 11:39:48 +00:00
Martin Fuchs
83c21d74b3 _stprintf-fix
svn path=/trunk/; revision=6756
2003-11-23 03:10:14 +00:00
Martin Fuchs
17b9c8d455 CHECKERROR macro for file amd line info in Exceptions
svn path=/trunk/; revision=6755
2003-11-23 03:06:01 +00:00
Martin Fuchs
915d0c21ff added CONTEXT information to exceptions
svn path=/trunk/; revision=6754
2003-11-23 00:43:18 +00:00
Thomas Bluemel
668ad67060 only send WM_SETCURSOR messages when not capturing a window
svn path=/trunk/; revision=6753
2003-11-22 12:22:07 +00:00
Eric Kohl
d2c5f3b3b6 Minor cleanup.
svn path=/trunk/; revision=6752
2003-11-22 11:56:17 +00:00
Thomas Bluemel
6c6afa3794 get CursorBlinkRate from registry
svn path=/trunk/; revision=6751
2003-11-22 11:49:09 +00:00
Filip Navara
aadb87f5d7 - Fixed BitBlts with ROP != SRCCOPY.
- Added skeleton for NtUserCallHwndOpt.

svn path=/trunk/; revision=6750
2003-11-22 11:01:28 +00:00
Richard Campbell
ec4c966d0b revert my change, forgot i'm advapi isn't available in win32k, yes i'm a dumbass, it's official. Anyone know how to load/save settings from/to the registry in win32k?
svn path=/trunk/; revision=6749
2003-11-22 05:06:18 +00:00
Richard Campbell
874ee485d7 forgot to add FASTCALL
svn path=/trunk/; revision=6748
2003-11-22 01:51:05 +00:00
Richard Campbell
a1c96638c6 CursorBlinkRate is now loaded via the registry.
svn path=/trunk/; revision=6747
2003-11-22 01:49:39 +00:00
Richard Campbell
3efc298356 Added CursorBlinkRate setting, defaults to 530, the default for Windows XP
svn path=/trunk/; revision=6746
2003-11-22 01:49:08 +00:00
Thomas Bluemel
532cb947f9 small bugfix
svn path=/trunk/; revision=6745
2003-11-21 23:05:28 +00:00
Thomas Bluemel
72d71d1055 small bugfix
svn path=/trunk/; revision=6744
2003-11-21 22:46:27 +00:00
Eric Kohl
8366cbb31c Restart worker if it failed to send the log messages.
Add driver or device name to the log message.
Silence debug messages.

svn path=/trunk/; revision=6743
2003-11-21 22:28:50 +00:00
Filip Navara
348f231f03 - Updated comctl32.dll to latest WineHQ release.
svn path=/trunk/; revision=6742
2003-11-21 21:16:28 +00:00
Filip Navara
ba0efcb546 - Fixed multiwin.exe painting problem.
- Reverted my fix to cursoricon.c.

svn path=/trunk/; revision=6741
2003-11-21 21:12:09 +00:00
Royce Mitchell III
824b2303c4 added missing * to function pointer typedef 'exception_hook'
svn path=/trunk/; revision=6740
2003-11-21 20:26:35 +00:00
Filip Navara
c6dd56783c - A little more correct prototypes for NtGetPlugPlayEvent and NtPlugPlayControl. Does anybody know more about these functions?
svn path=/trunk/; revision=6739
2003-11-21 18:42:06 +00:00
Thomas Bluemel
0758139146 fixed hittest code to return HTBORDER if it's not a sizable window frame
svn path=/trunk/; revision=6738
2003-11-21 17:38:22 +00:00
Filip Navara
967fd54cdd - More painting bugfixes.
svn path=/trunk/; revision=6737
2003-11-21 17:01:16 +00:00
Thomas Bluemel
b14e35b6ac implement WM_SETCURSOR messages
svn path=/trunk/; revision=6736
2003-11-21 16:36:26 +00:00
Vizzini
83e288941c EA name handling fix
svn path=/trunk/; revision=6735
2003-11-21 00:06:58 +00:00
Thomas Bluemel
11cfdfc881 fixed crash when pressing a key while booting up
svn path=/trunk/; revision=6734
2003-11-20 22:28:49 +00:00
Vizzini
7531504712 updated install location of rundll32
svn path=/trunk/; revision=6733
2003-11-20 21:28:47 +00:00
Filip Navara
ef9cbc6dbf - More painting bugfixes. Still many bugs are left :-(
- Temporary disabled buggy code for setting window focus, because it causes many applications to crash.
- Fixed one FIXME in IntSetCursor.

svn path=/trunk/; revision=6732
2003-11-20 21:21:29 +00:00
Royce Mitchell III
ef60bea82e sped up strip_comments, and added File::SaveFromString() in the process of hunting down a recursive c include.
svn path=/trunk/; revision=6731
2003-11-20 18:27:33 +00:00
Vizzini
8a095f86fc TDI stuff I forgot to commit
svn path=/trunk/; revision=6730
2003-11-20 17:55:10 +00:00
Thomas Bluemel
b7f60af879 1. fixed SetProp()
2. implemented EnumProps() and EnumPropsEx()

svn path=/trunk/; revision=6729
2003-11-20 15:35:33 +00:00
Eric Kohl
ac510cefac Receive error log messages from the ErrorLogPort.
svn path=/trunk/; revision=6728
2003-11-20 11:09:49 +00:00
Eric Kohl
87b1b1f247 Build error log message and send it to the ErrorLogPort.
svn path=/trunk/; revision=6727
2003-11-20 11:08:52 +00:00
Eric Kohl
c966348df4 Fixed a cut-and-paste bug.
svn path=/trunk/; revision=6726
2003-11-20 11:06:35 +00:00
Filip Navara
06c149f1f1 - Painting bugfixes.
svn path=/trunk/; revision=6725
2003-11-20 09:18:49 +00:00
Vizzini
669a79e12b began refreshing tditest a bit
svn path=/trunk/; revision=6724
2003-11-20 06:31:51 +00:00
Vizzini
5997e35178 fixed a type name
svn path=/trunk/; revision=6723
2003-11-20 06:30:35 +00:00
Eric Kohl
ecc20f6dc5 Minor cleanup
svn path=/trunk/; revision=6722
2003-11-20 00:57:29 +00:00
Gunnar Dalsnes
ae3fddb31b HalRequestSoftwareInterrupt added
svn path=/trunk/; revision=6721
2003-11-19 22:39:01 +00:00
Steven Edwards
ed95d0bee5 Fixed FormatMessage[A/W] to not suck.
We now pass this kernel32 regression test.

svn path=/trunk/; revision=6720
2003-11-19 22:19:17 +00:00
Gunnar Dalsnes
c22bd852fd -KeLeaveCriticalRegion changes based on an article on ntfsd
svn path=/trunk/; revision=6719
2003-11-19 21:19:15 +00:00
Gunnar Dalsnes
0cceda5e2b -IoQueueThreadIrp impl.
svn path=/trunk/; revision=6718
2003-11-19 21:12:35 +00:00
Gunnar Dalsnes
9f05e5563f -HalRequestSoftwareInterrupt impl. (does nothing yet)
svn path=/trunk/; revision=6717
2003-11-19 21:04:21 +00:00
Gunnar Dalsnes
c9ee23ed15 -IoReuseIrp impl.
-Added missing define

svn path=/trunk/; revision=6716
2003-11-19 20:57:22 +00:00
Gunnar Dalsnes
4cb5f1126f IoReuseIrp impl.
IoQueueThreadIrp/IoEnqueueIrp impl.

svn path=/trunk/; revision=6715
2003-11-19 20:54:31 +00:00
Thomas Bluemel
1c86d55f2c small bugfix
svn path=/trunk/; revision=6714
2003-11-19 20:12:34 +00:00
Thomas Bluemel
7c0860d405 added a test app to test some (currently unimplemented) dialog functions
svn path=/trunk/; revision=6713
2003-11-19 19:59:57 +00:00
Royce Mitchell III
96d89d4dfa change to use input file list
svn path=/trunk/; revision=6712
2003-11-19 18:48:48 +00:00
Thomas Bluemel
54ebd5ce0e Patch by Jonathon Wilson:
add stubs to user32 and add partial non-working implementation of Message Pump Hooks

svn path=/trunk/; revision=6711
2003-11-19 13:19:40 +00:00
Filip Navara
0c998a6711 - Fixed importing forward exports by ordinal.
- Fixed export ordinals of wsock32.dll.
- Changed base addresses of mswsock.dll and wsock32.dll to match Win XP.

svn path=/trunk/; revision=6710
2003-11-19 13:16:22 +00:00
Eric Kohl
2612b909f3 Connect to the 'ErrorLogPort' and restart worker if connection fails.
svn path=/trunk/; revision=6709
2003-11-19 12:53:14 +00:00
Eric Kohl
8979b357a7 Add error log structs.
svn path=/trunk/; revision=6708
2003-11-19 12:50:11 +00:00
Thomas Bluemel
ded778c60a implemented CheckRadioButton()
svn path=/trunk/; revision=6707
2003-11-19 12:48:48 +00:00
Thomas Bluemel
8ac4a64766 forgot to add file
svn path=/trunk/; revision=6706
2003-11-19 12:33:32 +00:00
Thomas Bluemel
a55677b029 1. implemented GetGuiResources()
2. modified test app guithreadinfo to display additional information about the current process using GetGuiResources()

svn path=/trunk/; revision=6705
2003-11-19 12:25:03 +00:00
Richard Campbell
bc1f65ef73 install winedbgc.dll by default, this appears to fix an installation problem i'm having on my end with virtualpc 5.0
svn path=/trunk/; revision=6704
2003-11-19 10:21:17 +00:00
Richard Campbell
2fe49f7133 fixed compile error
svn path=/trunk/; revision=6703
2003-11-19 09:37:45 +00:00
Filip Navara
880ff5e0bd - Painting bugfixes.
svn path=/trunk/; revision=6702
2003-11-19 09:10:36 +00:00
Vizzini
fa60c511c7 patch for -Werror -Wall by jonathan wilson
svn path=/trunk/; revision=6701
2003-11-19 05:53:38 +00:00
Vizzini
d60d0aa990 patch by jonathan wilson to enable -Wall -Werror, and a path sep fix for unix by me
svn path=/trunk/; revision=6700
2003-11-19 05:47:28 +00:00
Vizzini
3a1972736a Fixes for compiling with -Wall -Werror on unix (tested with gcc-3.3)
svn path=/trunk/; revision=6699
2003-11-19 05:43:15 +00:00
Richard Campbell
11529b1abe temporarily removed imagehlp since it doesn't compile and i don't have the time nor interest to look into it myself
svn path=/trunk/; revision=6698
2003-11-19 03:20:25 +00:00
Vizzini
f8b24b07ce Updated version number
svn path=/trunk/; revision=6697
2003-11-19 02:46:13 +00:00
Thomas Bluemel
1bcf21b057 1. implemented GetGUIThreadInfo()
2. added test app for GetGUIThreadInfo()

svn path=/trunk/; revision=6696
2003-11-18 23:33:31 +00:00
Steven Edwards
fc42ec41b9 Added rpcrt4.dll and imagehlp.dll to the Makefile
svn path=/trunk/; revision=6695
2003-11-18 22:28:24 +00:00
Steven Edwards
56ec5a6edb Added user32 regression test from Wine.
svn path=/trunk/; revision=6694
2003-11-18 22:24:42 +00:00
Steven Edwards
7cc107f887 Moved rpcrt4 regression test to a better location.
svn path=/trunk/; revision=6693
2003-11-18 22:08:11 +00:00
Steven Edwards
ab82fe8f92 Moving ported WINE regression tests
svn path=/trunk/; revision=6692
2003-11-18 22:07:13 +00:00
Filip Navara
1ccabd4c8e - Rewritten painting implementation (not complete yet, but better then the current).
- Bug fixes.

svn path=/trunk/; revision=6691
2003-11-18 20:49:39 +00:00
Eric Kohl
cb10422980 Initialize error log worker.
svn path=/trunk/; revision=6690
2003-11-18 20:08:30 +00:00
Thomas Bluemel
69a485aba7 added LR_SHARED flag support for LoadIcon() and LoadCursor()
svn path=/trunk/; revision=6689
2003-11-18 19:59:51 +00:00
Steven Edwards
7fd98f181c RLE4/8 Bitmap Compression support.
Patch by Jonathan Wilson.

svn path=/trunk/; revision=6687
2003-11-18 18:05:40 +00:00
Eric Kohl
8fd7fe8abb Fixed directory creation date.
Typo found by Vadim A. Yagodkin.

svn path=/trunk/; revision=6686
2003-11-18 17:40:46 +00:00
Royce Mitchell III
1f5f11925a more special-cases
svn path=/trunk/; revision=6685
2003-11-18 05:20:00 +00:00
Royce Mitchell III
6c1d0b1576 remove unnecessary include
svn path=/trunk/; revision=6684
2003-11-18 05:17:22 +00:00
Royce Mitchell III
ca5684f167 added missing ;
svn path=/trunk/; revision=6683
2003-11-18 05:11:41 +00:00
Royce Mitchell III
3d93ac09f7 fix circular-dependency include
svn path=/trunk/; revision=6682
2003-11-18 05:09:17 +00:00
Steven Edwards
5dd7488660 Add -Wall -Werror and turn off -D__USE_W32API
svn path=/trunk/; revision=6681
2003-11-17 20:48:22 +00:00
Steven Edwards
0db4c66b1e Fixes for ntdll rtl and large int tests.
Added crc32 support to ntdll.
fix some unimplemented tags.

svn path=/trunk/; revision=6680
2003-11-17 20:35:46 +00:00
Royce Mitchell III
cdf123c30d handle functions that take function ptrs as args
svn path=/trunk/; revision=6679
2003-11-17 19:27:57 +00:00
Filip Navara
5e87359eaa - Support for RASTERCAPS in NtGdiGetDeviceCaps.
svn path=/trunk/; revision=6678
2003-11-17 08:20:24 +00:00
Royce Mitchell III
863b04b187 more special cases
svn path=/trunk/; revision=6677
2003-11-17 04:05:54 +00:00
KJK::Hyperion
38b48068ac Theme dumper almost finished, but not working correctly
svn path=/trunk/; revision=6676
2003-11-17 02:36:36 +00:00
KJK::Hyperion
dfabfaeccf Forgot a file
svn path=/trunk/; revision=6675
2003-11-17 02:32:45 +00:00
KJK::Hyperion
40e2bff3e7 Moved and renamed some ReactOS specific macros
svn path=/trunk/; revision=6672
2003-11-17 02:12:52 +00:00
Steven Edwards
8da4aa2712 Added port of LineDDA function from WINE.
svn path=/trunk/; revision=6671
2003-11-16 22:44:39 +00:00
Steven Edwards
03600c758d Added -D__USE_W32API
svn path=/trunk/; revision=6670
2003-11-16 22:42:43 +00:00
Steven Edwards
1172647efd Added -D__USE_W32API
svn path=/trunk/; revision=6669
2003-11-16 22:25:34 +00:00
Steven Edwards
a85264fc25 Added -D__USE_W32API
svn path=/trunk/; revision=6668
2003-11-16 21:47:20 +00:00
Eric Kohl
241482601d Use a safe IO_STATUS_BLOCK from the kernel stack.
svn path=/trunk/; revision=6667
2003-11-16 21:03:59 +00:00
Eric Kohl
b5b0d3d61c Open initial executable file synchronously.
svn path=/trunk/; revision=6666
2003-11-16 21:02:07 +00:00
Hartmut Birr
d0455ad11e - Moved the pager thread as balancer thread to balance.c.
- Fixed some deadlock conditions for low memory situations.

svn path=/trunk/; revision=6665
2003-11-16 15:20:39 +00:00
Hartmut Birr
29e31c6fb0 - Create a memory area for the kpcr.
- Fixed the end address for unmapping unused address space behind the kernel.
- Free some unmapped pages.
- Initialized the pageop and rmap implementation earlier in the startup process.

svn path=/trunk/; revision=6664
2003-11-16 15:19:28 +00:00
Hartmut Birr
6dbdc4ff63 - Initialized lookaside lists earlier in the startup process.
svn path=/trunk/; revision=6663
2003-11-16 15:17:46 +00:00
Martin Fuchs
d26666b86c added OLE error messages
svn path=/trunk/; revision=6662
2003-11-16 14:01:29 +00:00
Eric Kohl
662fd69962 Report handle information.
svn path=/trunk/; revision=6661
2003-11-16 13:47:20 +00:00
Eric Kohl
e9084a75c4 Support boot images larger than one sector (2048 bytes).
svn path=/trunk/; revision=6660
2003-11-16 13:45:42 +00:00
Martin Fuchs
dc28f04fd6 added error messages
svn path=/trunk/; revision=6659
2003-11-16 12:56:44 +00:00
Gé van Geldorp
a9f23d0bca - Fix problems with non-zero cursor hotspots
- Add auto dependency tracking to vga ddi driver
- Changes for w32api

svn path=/trunk/; revision=6658
2003-11-16 12:36:24 +00:00
Martin Fuchs
bf942e1744 added more COM/OLE registry entries
svn path=/trunk/; revision=6657
2003-11-16 11:40:30 +00:00
Martin Fuchs
b722a5372c added TRACE message for being not able to load messages with FormatMessage()
svn path=/trunk/; revision=6656
2003-11-16 11:35:25 +00:00
Martin Fuchs
5353eee005 added registry entries for explorer
svn path=/trunk/; revision=6655
2003-11-16 10:46:34 +00:00
Martin Fuchs
910a519182 added FIXME for FormatMessage()
svn path=/trunk/; revision=6654
2003-11-16 10:45:15 +00:00
Gé van Geldorp
f085df035a Silence debug messages
svn path=/trunk/; revision=6653
2003-11-16 10:41:42 +00:00
Thomas Bluemel
a4b7ce555c moved metafile functions into objects/metafile.c
svn path=/trunk/; revision=6652
2003-11-15 15:18:06 +00:00
Gé van Geldorp
f22cfcebd1 Fix warning if defined(DBG)
svn path=/trunk/; revision=6651
2003-11-15 15:08:32 +00:00
Thomas Bluemel
0320bf2ca6 small fixes
svn path=/trunk/; revision=6650
2003-11-15 14:25:50 +00:00
Thomas Bluemel
67e13dd228 added test app for enhanced meta files
svn path=/trunk/; revision=6649
2003-11-15 14:05:30 +00:00
Thomas Bluemel
ef913e1a3b fixed setting the cursor size member
svn path=/trunk/; revision=6648
2003-11-15 12:43:25 +00:00
Thomas Bluemel
1b844b220b fixed warning
svn path=/trunk/; revision=6647
2003-11-14 23:04:18 +00:00
Royce Mitchell III
99d650fdb4 added more tokens and libc headers
svn path=/trunk/; revision=6646
2003-11-14 19:51:59 +00:00
Thomas Bluemel
1c3867a641 Patch by Jonathon Wilson:
fix most of ReactOS to build with -Wall -Werror by default

svn path=/trunk/; revision=6645
2003-11-14 17:13:36 +00:00
Eric Kohl
52dd1df336 Added missing variables and moved variables in order to fix include order (declare types before use).
svn path=/trunk/; revision=6644
2003-11-14 15:19:35 +00:00
Eric Kohl
41cf5bc8f7 Fixed io statistic variables and initialized spinlock.
Patch by Mike Nordell.

svn path=/trunk/; revision=6643
2003-11-14 15:17:08 +00:00
Royce Mitchell III
6aed8b6dbd get rid of buggy unnecessary macro
svn path=/trunk/; revision=6642
2003-11-14 14:12:29 +00:00
Royce Mitchell III
8d30d471de fix unnecessarily recursive include
svn path=/trunk/; revision=6641
2003-11-14 14:10:55 +00:00
Royce Mitchell III
5822ae79d0 ignore #undef statements for now
svn path=/trunk/; revision=6640
2003-11-13 21:14:20 +00:00
Eric Kohl
b1fc831113 Enabled -Wall and -Werror and fixed resulting bugs.
svn path=/trunk/; revision=6639
2003-11-13 15:26:34 +00:00
Eric Kohl
97dc195d03 Enabled -Wall and -Werror and fixed resulting bugs.
svn path=/trunk/; revision=6638
2003-11-13 14:22:03 +00:00
Art Yerkes
3145ec42fb Corrects ext bit from the keyboard. This bit, once set, was never unset,
so both alt keys acted as Alt+Gr.

svn path=/trunk/; revision=6636
2003-11-13 08:29:19 +00:00
Thomas Bluemel
9208747968 fixed a bug that caused the caret creating many timers with the same id
svn path=/trunk/; revision=6635
2003-11-12 22:53:31 +00:00
Royce Mitchell III
2a02daaac3 handle return statements
svn path=/trunk/; revision=6634
2003-11-12 21:27:26 +00:00
Richard Campbell
d20b00b875 Very basic dll, needs a makefile and none of the functions are implemented, more soon...
svn path=/trunk/; revision=6633
2003-11-12 21:15:07 +00:00
Richard Campbell
72f18889ef Very basic dll, needs a makefile and none of the functions are implemented, more soon...
svn path=/trunk/; revision=6632
2003-11-12 21:05:23 +00:00
Eric Kohl
4ceed6aba6 Pass volume label a unterminated Unicode string.
svn path=/trunk/; revision=6631
2003-11-12 21:02:42 +00:00
Thomas Bluemel
2b33d147c1 added missing DllMain()
svn path=/trunk/; revision=6630
2003-11-12 17:39:28 +00:00
Eric Kohl
c9a794eb0e - Cleaned up some of the mess that was caused by a previous patch
- Support verify override
- Read volume name

svn path=/trunk/; revision=6629
2003-11-12 15:30:21 +00:00
Eric Kohl
063bd518b1 Support verify override.
svn path=/trunk/; revision=6628
2003-11-12 15:26:44 +00:00
Richard Campbell
3e13a23ceb Sorry, my cvs files are fubared, let me put these where they need to go...
svn path=/trunk/; revision=6627
2003-11-12 07:07:48 +00:00
Richard Campbell
3aba355dff Coming soon...
svn path=/trunk/; revision=6626
2003-11-12 06:58:41 +00:00
Royce Mitchell III
ce367d502f revert Filip's fix per Filip & Jonathon
svn path=/trunk/; revision=6625
2003-11-12 05:40:59 +00:00
Martin Fuchs
5524ae0860 strcasecmp work around for Winelib app
svn path=/trunk/; revision=6624
2003-11-11 23:19:26 +00:00
Thomas Bluemel
0331caa800 1.added a simple test application for hotkeys
2.some fixes on hotkeys

svn path=/trunk/; revision=6623
2003-11-11 22:17:18 +00:00
Filip Navara
9a97a2e0aa - Removed 'Parameters' member of WINDOW_OBJECT structure as it's useless.
svn path=/trunk/; revision=6622
2003-11-11 21:04:55 +00:00
Gé van Geldorp
44a3da7588 WndProc changes by Jonathan Wilson
svn path=/trunk/; revision=6621
2003-11-11 20:28:21 +00:00
Thomas Bluemel
bd9ad38a70 fixed some bugs in NtUserDrawIconEx()
svn path=/trunk/; revision=6620
2003-11-11 17:50:58 +00:00
Eric Kohl
5c59755ddd Added a 'done' message.
svn path=/trunk/; revision=6619
2003-11-11 17:02:49 +00:00
Eric Kohl
95d64bbf2f Enabled -Wall and -Werror and fixed resulting bugs.
svn path=/trunk/; revision=6618
2003-11-11 17:01:47 +00:00
Royce Mitchell III
bc1542edef handle __asm__, #elif, and #error
svn path=/trunk/; revision=6617
2003-11-11 15:31:48 +00:00
Eric Kohl
fe56ee2b4d Completed IOCTL_DISK_CHECK_VERIFY.
Fixed a retry bug.

svn path=/trunk/; revision=6616
2003-11-11 15:31:31 +00:00
KJK::Hyperion
932bfadaa5 BUTTON class:
- support for the root part and states
 - DrawThemeText implemented
 - GetThemeBackgroundContentRect implemented

DLL:
 - implemented DrawThemeText and GetThemeBackgroundContentRect

svn path=/trunk/; revision=6615
2003-11-11 03:44:53 +00:00
Eric Kohl
c718291b7d Implemented NdisMSynchronizeWithInterrupt().
svn path=/trunk/; revision=6614
2003-11-11 02:08:19 +00:00
Steven Edwards
12d1165682 Remove old regedit resources.
svn path=/trunk/; revision=6613
2003-11-11 01:34:36 +00:00
Martin Fuchs
e6c72a5a0d Defined __cplusplus for Doxygen
svn path=/trunk/; revision=6612
2003-11-10 23:03:52 +00:00
Martin Fuchs
4961049825 Completed Doxygen documentation of all compounds in Explorer
svn path=/trunk/; revision=6611
2003-11-10 22:38:03 +00:00
Martin Fuchs
8aedeab84e call startup routine in SESSION_START mode
svn path=/trunk/; revision=6610
2003-11-10 22:23:23 +00:00
Filip Navara
ae07465bee - Fixed some flags in calls to CreateWindowEx.
- Fixed color of the splitter (should be COLOR_BTNFACE and not light gray brush).

svn path=/trunk/; revision=6609
2003-11-10 21:48:56 +00:00
Martin Fuchs
3561af3a43 move new icon files into virtual resource folder
svn path=/trunk/; revision=6608
2003-11-10 21:21:22 +00:00
Thomas Bluemel
7f64c6fa81 fixes crash in DrvSetPointerShape()
svn path=/trunk/; revision=6607
2003-11-10 19:42:57 +00:00
Martin Fuchs
5b827d7354 use rdel instead of rm in Explorer Makefile
svn path=/trunk/; revision=6606
2003-11-10 19:29:24 +00:00
Eric Kohl
6e978c3db1 Retry failed requests.
Silenced debug output.

svn path=/trunk/; revision=6605
2003-11-10 18:09:54 +00:00
Eric Kohl
dc8ce663c6 Minor cleanup
svn path=/trunk/; revision=6604
2003-11-10 18:07:36 +00:00
Thomas Bluemel
1193f17c26 Implemented SetCursor and rewrote some cursor/icon routines
svn path=/trunk/; revision=6603
2003-11-10 17:44:50 +00:00
Eric Kohl
94e9ddef83 Silenced debug messages.
svn path=/trunk/; revision=6602
2003-11-10 17:09:29 +00:00
Thomas Bluemel
27fd6387f1 added displaying the current mouse cursor
svn path=/trunk/; revision=6601
2003-11-10 15:46:28 +00:00
Eric Kohl
2a681979b8 Finished media change support, except for prper volume dismount.
Added dependency checks.

svn path=/trunk/; revision=6600
2003-11-10 11:32:08 +00:00
Thomas Bluemel
bbb4ce681e fixed build problems
svn path=/trunk/; revision=6599
2003-11-09 23:26:34 +00:00
Gé van Geldorp
0ac3819023 Although ObDereferenceObject is usually macro-forwarded to ObfDereferenceObject,
it is also exported from NT4 NTOSKRNL.EXE

svn path=/trunk/; revision=6598
2003-11-09 23:20:27 +00:00
The ReactOS Team
abc01da30c This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2401
2001-11-28 01:38:00 +00:00
The ReactOS Team
7aeca22fed This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2398
2001-11-27 14:24:15 +00:00
The ReactOS Team
36e1bb60e8 This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2320
2001-10-25 23:22:09 +00:00
The ReactOS Team
74e77bb16f This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2316
2001-10-23 21:15:45 +00:00
Casper Hornstrup
e3a75fb4da no message
svn path=/branches/avendor/; revision=1279
2000-08-01 18:43:38 +00:00
The ReactOS Team
ce122bcdea This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=1278
2000-08-01 18:43:38 +00:00
6086 changed files with 1086956 additions and 539877 deletions

View File

@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -1,158 +0,0 @@
; FreeLoader by Brian Palmer
; FREELDR.INI - FreeLoader Initialization file
;
; Each line must be less than 1024 characters long
; and must be either a section heading (i.e. [section_name])
; or a setting (i.e. name=value) or a blank line.
; Comments start with a ';' character.
; Background colors can be any one of the following:
; Black
; Blue
; Green
; Cyan
; Red
; Magenta
; Brown
; Gray
; Text colors can be any one of the background
; colors and any of the following:
; DarkGray
; LightBlue
; LightGreen
; LightCyan
; LightRed
; LightMagenta
; Yellow
; White
; [FREELOADER] Section Commands:
;
; MessageBox - displays the specified text in a message box upon bootup
; MessageLine - adds a new line of text to a message box (must come before MessageBox command)
; TitleText - text that is displayed in the title box
; StatusBarColor - color of status bar's background
; StatusBarTextColor - color of status bar's text
; BackdropTextColor - color of the backdrop's fill
; BackdropColor - color of the backdrop's background
; BackdropFillStyle - backdrop fill style - can be Light, Medium, or Dark
; TitleBoxTextColor - title box text color
; TitleBoxColor - title box background color
; MessageBoxTextColor - message box text color
; MessageBoxColor - message box background color
; MenuTextColor - menu text color
; MenuColor - menu color
; TextColor - normal text color
; SelectedTextColor - selected text color
; SelectedColor - selected text background color
; TimeOut - sets the timeout (in seconds) before the first OS listed gets booted automagically
; [OS-General] Section Commands:
;
; BootType - sets the boot type: ReactOS, Linux, BootSector, Partition, Drive
; BootDrive - sets the boot drive: 0 - first floppy, 1 - second floppy, 0x80 - first hard disk, 0x81 - second hard disk
; BootPartition - sets the boot partition
; DriveMap - maps a BIOS drive number to another (i.e. DriveMap=hd1,hd0 maps harddisk1 to harddisk0 or DriveMap=fd1,fd0)
; [BootSector OSType] Section Commands:
;
; BootSector - sets the filename of the bootsector to be loaded
; [ReactOS OSType] Section Commands:
;
; SystemPath - sets the system root path (must be a valid ARC - Path):
; multi(0)disk(0)rdisk(0)partition(1)\reactos
; multi(0)disk(0)fdisk(0)
; Options - sets the command line options for the kernel being booted
; Kernel - sets the kernel filename (default: ntoskrnl.exe)
; Hal - sets the HAL filename (default: hal.dll)
[FREELOADER]
MessageBox=Welcome to FreeLoader!\nCopyright (c) 2003 by Brian Palmer <brianp@sginet.com>\n\nThis is a sample FreeLoader configuration file.\nEdit FREELDR.INI to change the boot settings.
DefaultOS=ReactOSHD
TimeOut=10
; DisplayMode can be:
; NORMAL_VGA for 80x25
; EXTENDED_VGA for 80x50 on VGA 80x43 on EGA
; 0x501C for 80x28
; 0x501E for 80x30
; 0x5022 for 80x34
; 0x502B for 80x43
; 0x503C for 80x60
[Display]
DisplayMode=NORMAL_VGA
TitleText=Brian<61>s Custom FreeLoader Boot Disk
StatusBarColor=Cyan
StatusBarTextColor=Black
BackdropTextColor=White
BackdropColor=Blue
BackdropFillStyle=Medium
TitleBoxTextColor=White
TitleBoxColor=Red
MessageBoxTextColor=White
MessageBoxColor=Blue
MenuTextColor=White
MenuColor=Blue
TextColor=Yellow
SelectedTextColor=Black
SelectedColor=Gray
SpecialEffects=Yes
[Operating Systems]
ReactOSHD="ReactOS (HardDrive)"
ReactOSFloppy="ReactOS (Floppy)"
Linux="Debian Linux"
Floppy="3 1/2 Floppy (A:)"
MSWinders="Microsoft Windows (C:)"
DriveD="Drive D:"
; Load ReactOS from harddisk (drive C:)
[ReactOSHD]
BootType=ReactOS
SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
Options=/DEBUGPORT=SCREEN
Kernel=\REACTOS\SYSTEM32\NTOSKRNL.EXE
Hal=\REACTOS\SYSTEM32\HAL.DLL
; Load ReactOS from floppy (drive A:)
[ReactOSFloppy]
BootType=ReactOS
SystemPath=multi(0)disk(0)fdisk(0)
Options=/DEBUGPORT=SCREEN
Kernel=\reactos\NTOSKRNL.EXE
Hal=\reactos\HAL.DLL
;[ReactOS (Debug)]
;BootType=ReactOS
;SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
;Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=19200
;Kernel=\NTOSKRNL.EXE
;Hal=\HAL.DLL
[Linux]
BootType=Linux
BootDrive=hd1
BootPartition=1
Kernel=/vmlinuz
Initrd=/initrd.img
CommandLine="root=/dev/sdb1"
[Floppy]
BootType=Drive
BootDrive=fd0
[MSWinders]
BootType=Partition
BootDrive=hd0
BootPartition=1
;DriveMap=hd1,hd0
;DriveMap=hd2,hd0
;DriveMap=hd3,hd0
[DriveD]
BootType=Partition
BootDrive=hd1
BootPartition=1

View File

@@ -1,59 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
endif
NASM_CMD = nasm
NFLAGS = -fwin32 -dwin32
BIN2C = ..$(SEP)tools$(SEP)bin2c
TOOLSDIR = ..$(SEP)tools
all:
$(MAKE) -C tools
$(MAKE) -C bootsect
$(MAKE) -C freeldr
$(MAKE) -C install
$(MAKE) -C fdebug
clean:
$(MAKE) -C bootsect clean
$(MAKE) -C freeldr clean
$(MAKE) -C install clean
$(MAKE) -C fdebug clean
$(MAKE) -C tools clean
.PHONY : clean

View File

@@ -1,3 +0,0 @@
*.exe
*.bin
*.h

View File

@@ -1,100 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
endif
NASM_CMD = nasm
NFLAGS = -fwin32 -dwin32
BIN2C = ..$(SEP)tools$(SEP)bin2c
TOOLSDIR = ..$(SEP)tools
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd
.PHONY : clean bootcd
all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin
$(BIN2C) :
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
dosmbr.bin : dosmbr.asm
@echo ===================================================== Assembling dosmbr
@$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm
fat.bin : fat.asm $(BIN2C)
@echo ===================================================== Assembling fat
@$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm
@$(BIN2C) fat.bin fat.h fat_data
fat32.bin : fat32.asm $(BIN2C)
@echo ===================================================== Assembling fat32
@$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm
@$(BIN2C) fat32.bin fat32.h fat32_data
isoboot.bin : isoboot.asm
@echo ===================================================== Assembling isoboot
@$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm
ext2.bin : ext2.asm
@echo ===================================================== Assembling ext2
@$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm
@$(BIN2C) ext2.bin ext2.h ext2_data
.PHONY : bootcd
bootcd: bootcd_dirs isoboot.bin
$(CP) isoboot.bin $(BOOTCD_DIR)
$(CP) dosmbr.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) ext2.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) fat.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) fat32.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) isoboot.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
.PHONY : bootcd_dirs
bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
clean:
@-$(RM) *.bin
@-$(RM) *.h
@echo Clean ALL done.

View File

@@ -1,179 +0,0 @@
;
; normal DOS boot sector
;
; Ported to nasm from FreeDOS fdisk 1.2.0 by:
; Casper Hornstrup (chorns@users.sourceforge.net)
;
align 2, db 0
global _bootnormal_code
_bootnormal_code:
;-----------------------------------------------------------------------
; ENTRY (copied from freedos bootsector)
;
; IN: DL = boot drive
;OUT: DL = boot drive
;
;-----------------------------------------------------------------------
real_start: cli
cld
xor ax, ax
mov ss, ax ; initialize stack
mov ds, ax
mov bp, 0x7c00
lea sp, [bp-0x20]
sti
mov ax, 0x1FE0
mov es, ax
mov si, bp
mov di, bp
mov cx, 0x0100
rep movsw
jmp word 0x1FE0:0x7c00+ cont-real_start
cont: mov ds, ax
mov ss, ax
xor ax,ax
mov es,ax
; search for active partition
lea di, [bp+0x1be] ; start of partition table
test_next_for_active:
test byte [di],0x80
jne active_partition_found
add di,0x10 ; next table
cmp di, 07c00h+0x1fe; scanned beyond end of table ??
jb test_next_for_active
;*****************************************************************
call print
db 'no active partition found',0
WAIT_FOR_REBOOT:
jmp $
;*****************************************************************
trouble_reading_drive:
call print
db 'read error while reading drive',0
jmp WAIT_FOR_REBOOT
;*****************************************************************
invalid_partition_code:
call print
db 'partition signature != 55AA',0
jmp WAIT_FOR_REBOOT
;*****************************************************************
active_partition_found:
; call print
; db 'loading active partition',0
call read_boot_sector
jc trouble_reading_drive
cmp word [es:0x7c00+0x1fe],0xaa55
jne invalid_partition_code
jmp word 0x0:0x7c00 ; and jump to boot sector code
;*****************************
; read_boot_sector
;
; IN: DI--> partition info
;OUT:CARRY
;*****************************
read_boot_sector:
; /* check for LBA support */
mov bx,0x55aa
mov ah,0x41
int 0x13
jc StandardBios ; if (regs.b.x != 0xaa55 || (regs.flags & 0x01))
cmp bx,0xaa55 ; goto StandardBios;
jne StandardBios
; /* if DAP cannot be used, don't use LBA */
; if ((regs.c.x & 1) == 0)
; goto StandardBios;
test cl,1
jz StandardBios
jmp short LBABios
_bios_LBA_address_packet:
db 0x10
db 0
db 4 ; read four sectors - why not
db 0
dw 0x7c00 ; fixed boot address for DOS sector
dw 0x0000
_bios_LBA_low dw 0
_bios_LBA_high dw 0
dw 0,0
LBABios:
; copy start address of partition to DAP
mov ax,[di+8]
mov [0x7c00+ (_bios_LBA_low-real_start)],ax
mov ax,[di+8+2]
mov [0x7c00+ (_bios_LBA_high-real_start)],ax
mov ax,0x4200 ; regs.a.x = LBA_READ;
mov si,0x7c00+ (_bios_LBA_address_packet-real_start); regs.si = FP_OFF(&dap);
int 0x13
ret
;*****************************************************************
; read disk, using standard BIOS
;
StandardBios:
mov ax,0x0204 ; regs.a.x = 0x0201;
mov bx,0x7c00 ; regs.b.x = FP_OFF(buffer);
mov cx,[di+2] ; regs.c.x =
; ((chs.Cylinder & 0xff) << 8) + ((chs.Cylinder & 0x300) >> 2) +
; chs.Sector;
; that was easy ;-)
mov dh,[di+1] ; regs.d.b.h = chs.Head;
; regs.es = FP_SEG(buffer);
int 0x13
ret
;****** PRINT
; prints text after call to this function.
print_1char:
xor bx, bx ; video page 0
mov ah, 0x0E ; else print it
int 0x10 ; via TTY mode
print: pop si ; this is the first character
print1: lodsb ; get token
push si ; stack up potential return address
cmp al, 0 ; end of string?
jne print_1char ; until done
ret ; and jump to it
times 0x1fe-$+$$ db 0
db 0x55,0xaa

View File

@@ -1,663 +0,0 @@
; EXT2.ASM
; EXT2 Boot Sector
; Copyright (c) 2002, 2003 Brian Palmer
; [bp-0x04] Here we will store the number of sectors per track
; [bp-0x08] Here we will store the number of heads
; [bp-0x0c] Here we will store the size of the disk as the BIOS reports in CHS form
; [bp-0x10] Here we will store the number of LBA sectors read
SECTORS_PER_TRACK equ 0x04
NUMBER_OF_HEADS equ 0x08
BIOS_CHS_DRIVE_SIZE equ 0x0C
LBA_SECTORS_READ equ 0x10
EXT2_ROOT_INO equ 2
EXT2_S_IFMT equ 0f0h
EXT2_S_IFREG equ 080h
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
BootDrive db 0x80
;BootPartition db 0 ; Moved to end of boot sector to have a standard format across all boot sectors
;SectorsPerTrack db 63 ; Moved to [bp-SECTORS_PER_TRACK]
;NumberOfHeads dw 16 ; Moved to [bp-NUMBER_OF_HEADS]
;BiosCHSDriveSize dd (1024 * 1024 * 63) ; Moved to [bp-BIOS_CHS_DRIVE_SIZE]
;LBASectorsRead dd 0 ; Moved to [bp-LBA_SECTORS_READ]
Ext2VolumeStartSector dd 263088 ; Start sector of the ext2 volume
Ext2BlockSize dd 2 ; Block size in sectors
Ext2BlockSizeInBytes dd 1024 ; Block size in bytes
Ext2PointersPerBlock dd 256 ; Number of block pointers that can be contained in one block
Ext2GroupDescPerBlock dd 32 ; Number of group descriptors per block
Ext2FirstDataBlock dd 1 ; First data block (1 for 1024-byte blocks, 0 for bigger sizes)
Ext2InodesPerGroup dd 2048 ; Number of inodes per group
Ext2InodesPerBlock dd 8 ; Number of inodes per block
Ext2ReadEntireFileLoadSegment:
dw 0
Ext2InodeIndirectPointer:
dd 0
Ext2InodeDoubleIndirectPointer:
dd 0
Ext2BlocksLeftToRead:
dd 0
main:
xor ax,ax ; Setup segment registers
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
mov ss,ax ; Make SS correct
mov bp,7c00h
mov sp,7b00h ; Setup a stack
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne GetDriveParameters
mov [BYTE bp+BootDrive],dl ; Save the boot drive
GetDriveParameters:
mov ah,08h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
mov [BYTE bp-NUMBER_OF_HEADS],eax ; Save number of heads
mov [BYTE bp-SECTORS_PER_TRACK],ecx ; Save number of sectors per track
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BYTE bp-BIOS_CHS_DRIVE_SIZE],eax
LoadExtraBootCode:
; First we have to load our extra boot code at
; sector 1 into memory at [0000:7e00h]
;mov eax,01h
xor eax,eax
inc eax ; Read logical sector 1, EAX now = 1
mov cx,1 ; Read one sector
mov bx,7e00h ; Read sector to [0000:7e00h]
call ReadSectors
jmp LoadRootDirectory
; Reads ext2 group descriptor into [7000:8000]
; We read it to this arbitrary location so
; it will not cross a 64k boundary
; EAX has group descriptor number to read
Ext2ReadGroupDesc:
shl eax,5 ; Group = (Group * sizeof(GROUP_DESCRIPTOR) /* 32 */)
xor edx,edx
div DWORD [BYTE bp+Ext2GroupDescPerBlock] ; Group = (Group / Ext2GroupDescPerBlock)
add eax,DWORD [BYTE bp+Ext2FirstDataBlock] ; Group = Group + Ext2FirstDataBlock + 1
inc eax ; EAX now has the group descriptor block number
; EDX now has the group descriptor offset in the block
; Adjust the read offset so that the
; group descriptor is read to 7000:8000
mov ebx,78000h
sub ebx,edx
shr ebx,4
mov es,bx
xor bx,bx
; Everything is now setup to call Ext2ReadBlock
; Instead of using the call instruction we will
; just put Ext2ReadBlock right after this routine
; Reads ext2 block into [ES:BX]
; EAX has logical block number to read
Ext2ReadBlock:
mov ecx,DWORD [BYTE bp+Ext2BlockSize]
mul ecx
jmp ReadSectors
; Reads ext2 inode into [6000:8000]
; We read it to this arbitrary location so
; it will not cross a 64k boundary
; EAX has inode number to read
Ext2ReadInode:
dec eax ; Inode = Inode - 1
xor edx,edx
div DWORD [BYTE bp+Ext2InodesPerGroup] ; Inode = (Inode / Ext2InodesPerGroup)
mov ebx,eax ; EBX now has the inode group number
mov eax,edx
xor edx,edx
div DWORD [BYTE bp+Ext2InodesPerBlock] ; Inode = (Inode / Ext2InodesPerBlock)
shl edx,7 ; FIXME: InodeOffset *= 128 (make the array index a byte offset)
; EAX now has the inode offset block number from inode table
; EDX now has the inode offset in the block
; Save the inode values and put the group
; descriptor number in EAX and read it in
push edx
push eax
mov eax,ebx
call Ext2ReadGroupDesc
; Group descriptor has been read, now
; grab the inode table block number from it
push WORD 7000h
pop es
mov di,8008h
pop eax ; Restore inode offset block number from stack
add eax,DWORD [es:di] ; Add the inode table start block
; Adjust the read offset so that the
; inode we want is read to 6000:8000
pop edx ; Restore inode offset in the block from stack
mov ebx,68000h
sub ebx,edx
shr ebx,4
mov es,bx
xor bx,bx
call Ext2ReadBlock
ret
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
add eax,DWORD [BYTE bp+Ext2VolumeStartSector] ; Add the start of the volume
cmp eax,DWORD [BYTE bp-BIOS_CHS_DRIVE_SIZE] ; Check if they are reading a sector outside CHS range
jae ReadSectorsLBA ; Yes - go to the LBA routine
; If at all possible we want to use LBA routines because
; They are optimized to read more than 1 sector per read
pushad ; Save logical sector number & sector count
CheckInt13hExtensions: ; Now check if this computer supports extended reads
mov ah,0x41 ; AH = 41h
mov bx,0x55aa ; BX = 55AAh
mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
jc ReadSectorsCHS ; CF set on error (extensions not supported)
cmp bx,0xaa55 ; BX = AA55h if installed
jne ReadSectorsCHS
test cl,1 ; CX = API subset support bitmap
jz ReadSectorsCHS ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
popad ; Restore sector count & logical sector number
ReadSectorsLBA:
pushad ; Save logical sector number & sector count
cmp cx,byte 64 ; Since the LBA calls only support 0x7F sectors at a time we will limit ourselves to 64
jbe ReadSectorsSetupDiskAddressPacket ; If we are reading less than 65 sectors then just do the read
mov cx,64 ; Otherwise read only 64 sectors on this loop iteration
ReadSectorsSetupDiskAddressPacket:
mov [BYTE bp-LBA_SECTORS_READ],cx
mov WORD [BYTE bp-LBA_SECTORS_READ+2],0
o32 push byte 0
push eax ; Put 64-bit logical block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push cx ; Set transfer count
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc PrintDiskError ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
push bx
mov ebx,DWORD [BYTE bp-LBA_SECTORS_READ]
add eax,ebx ; Increment sector to read
shl ebx,5
mov dx,es
add dx,bx ; Setup read buffer for next sector
mov es,dx
pop bx
sub cx,[BYTE bp-LBA_SECTORS_READ]
jnz ReadSectorsLBA ; Read next sector
ret
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectorsCHS:
popad ; Get logical sector number & sector count off stack
ReadSectorsCHSLoop:
pushad
xor edx,edx
mov ecx,DWORD [BYTE bp-SECTORS_PER_TRACK]
div ecx ; Divide logical by SectorsPerTrack
inc dl ; Sectors numbering starts at 1 not 0
mov cl,dl ; Sector in CL
mov edx,eax
shr edx,16
div WORD [BYTE bp-NUMBER_OF_HEADS] ; Divide logical by number of heads
mov dh,dl ; Head in DH
mov dl,[BYTE bp+BootDrive] ; Drive number in DL
mov ch,al ; Cylinder in CX
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc PrintDiskError ; If the read failed then abort
popad
inc eax ; Increment Sector to Read
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop ReadSectorsCHSLoop ; Read next sector
ret
; Displays a disk error message
; And reboots
PrintDiskError:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
call PutCharsCallBios
jmp short PutChars
PutCharsCallBios:
mov ah,0eh
mov bx,07h
int 10h
retn
Done:
mov al,0dh
call PutCharsCallBios
mov al,0ah
call PutCharsCallBios
retn
msgDiskError db 'Disk error',0
; Sorry, need the space...
;msgAnyKey db 'Press any key to restart',0
msgAnyKey db 'Press any key',0
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition db 0
dw 0aa55h ; BootSector signature
; End of bootsector
;
; Now starts the extra boot code that we will store
; at sector 1 on a EXT2 volume
LoadRootDirectory:
mov eax,EXT2_ROOT_INO ; Put the root directory inode number in EAX
call Ext2ReadInode ; Read in the inode
; Point ES:DI to the inode structure at 6000:8000
push WORD 6000h
pop es
mov di,8000h
push di
push es ; Save these for later
; Get root directory size from inode structure
mov eax,DWORD [es:di+4]
push eax
; Now that the inode has been read in load
; the root directory file data to 0000:8000
call Ext2ReadEntireFile
; Since the root directory was loaded to 0000:8000
; then add 8000h to the root directory's size
pop eax
mov edx,8000h ; Set EDX to the current offset in the root directory
add eax,edx ; Initially add 8000h to the size of the root directory
SearchRootDirectory:
push edx ; Save current offset in root directory
push eax ; Save the size of the root directory
; Now we have to convert the current offset
; in the root directory to a SEGMENT:OFFSET pair
mov eax,edx
xor edx,edx
mov ecx,16
div ecx ; Now AX:DX has segment & offset
mov es,ax
mov di,dx
push di ; Save the start of the directory entry
add di,byte 8 ; Add the offset to the filename
mov si,filename
mov cl,11
rep cmpsb ; Compare the file names
pop di
pop eax
pop edx
jz FoundFile
; Nope, didn't find it in this entry, keep looking
movzx ecx,WORD [es:di+4]
add edx,ecx
; Check to see if we have reached the
; end of the root directory
cmp edx,eax
jb SearchRootDirectory
jmp PrintFileNotFound
FoundFile:
mov eax,[es:di] ; Get inode number from directory entry
call Ext2ReadInode ; Read in the inode
; Point ES:DI to the inode structure at 6000:8000
pop es
pop di ; These were saved earlier
mov cx,[es:di] ; Get the file mode so we can make sure it's a regular file
and ch,EXT2_S_IFMT ; Mask off everything but the file type
cmp ch,EXT2_S_IFREG ; Make sure it's a regular file
je LoadFreeLoader
jmp PrintRegFileError
LoadFreeLoader:
mov si,msgLoading ; "Loading FreeLoader..." message
call PutChars ; Display it
call Ext2ReadEntireFile ; Read freeldr.sys to 0000:8000
mov dl,[BYTE bp+BootDrive]
mov dh,[BYTE bp+BootPartition]
push byte 0 ; We loaded at 0000:8000
push WORD 8000h ; We will do a far return to 0000:8000h
retf ; Transfer control to FreeLoader
; Reads ext2 file data into [0000:8000]
; This function assumes that the file's
; inode has been read in to 6000:8000 *and*
; ES:DI points to 6000:8000
; This will load all the blocks up to
; and including the double-indirect pointers.
; This should be sufficient because it
; allows for ~64MB which is much bigger
; than we need for a boot loader.
Ext2ReadEntireFile:
; Reset the load segment
mov WORD [BYTE bp+Ext2ReadEntireFileLoadSegment],800h
; Now we must calculate how
; many blocks to read in
; We will do this by rounding the
; file size up to the next block
; size and then dividing by the block size
mov eax,DWORD [BYTE bp+Ext2BlockSizeInBytes] ; Get the block size in bytes
push eax
dec eax ; Ext2BlockSizeInBytes -= 1
add eax,DWORD [es:di+4] ; Add the file size
xor edx,edx
pop ecx ; Divide by the block size in bytes
div ecx ; EAX now contains the number of blocks to load
push eax
; Make sure the file size isn't zero
cmp eax,byte 0
jnz Ext2ReadEntireFile2
jmp PrintFileSizeError
Ext2ReadEntireFile2:
; Save the indirect & double indirect pointers
mov edx,DWORD [es:di+0x58] ; Get indirect pointer
mov [BYTE bp+Ext2InodeIndirectPointer],edx ; Save indirect pointer
mov edx,DWORD [es:di+0x5c] ; Get double indirect pointer
mov [BYTE bp+Ext2InodeDoubleIndirectPointer],edx ; Save double indirect pointer
; Now copy the direct pointers to 7000:0000
; so that we can call Ext2ReadDirectBlocks
push ds ; Save DS
push es
push WORD 7000h
pop es
pop ds
mov si,8028h
xor di,di ; DS:SI = 6000:8028 ES:DI = 7000:0000
mov cx,24 ; Moving 24 words of data
rep movsw
pop ds ; Restore DS
; Now we have all the block pointers in the
; right location so read them in
pop eax ; Restore the total number of blocks in this file
xor ecx,ecx ; Set the max count of blocks to read to 12
mov cl,12 ; which is the number of direct block pointers in the inode
call Ext2ReadDirectBlockList
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jz Ext2ReadEntireFileDone
; Now we have read all the direct blocks in
; the inode. So now we have to read the indirect
; block and read all it's direct blocks
push eax ; Save the total block count
mov eax,DWORD [BYTE bp+Ext2InodeIndirectPointer] ; Get the indirect block pointer
push WORD 7000h
pop es
xor bx,bx ; Set the load address to 7000:0000
call Ext2ReadBlock ; Read the block
; Now we have all the block pointers from the
; indirect block in the right location so read them in
pop eax ; Restore the total block count
mov ecx,DWORD [BYTE bp+Ext2PointersPerBlock] ; Get the number of block pointers that one block contains
call Ext2ReadDirectBlockList
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jz Ext2ReadEntireFileDone
; Now we have read all the direct blocks from
; the inode's indirect block pointer. So now
; we have to read the double indirect block
; and read all it's indirect blocks
; (whew, it's a good thing I don't support triple indirect blocks)
mov [BYTE bp+Ext2BlocksLeftToRead],eax ; Save the total block count
mov eax,DWORD [BYTE bp+Ext2InodeDoubleIndirectPointer] ; Get the double indirect block pointer
push WORD 7800h
pop es
push es ; Save an extra copy of this value on the stack
xor bx,bx ; Set the load address to 7000:8000
call Ext2ReadBlock ; Read the block
pop es ; Put 7800h into ES (saved on the stack already)
xor di,di
Ext2ReadIndirectBlock:
mov eax,DWORD [es:di] ; Get indirect block pointer
add di,BYTE 4 ; Update DI for next array index
push es
push di
push WORD 7000h
pop es
xor bx,bx ; Set the load address to 7000:0000
call Ext2ReadBlock ; Read the indirect block
; Now we have all the block pointers from the
; indirect block in the right location so read them in
mov eax,DWORD [BYTE bp+Ext2BlocksLeftToRead] ; Restore the total block count
mov ecx,DWORD [BYTE bp+Ext2PointersPerBlock] ; Get the number of block pointers that one block contains
call Ext2ReadDirectBlockList
mov [BYTE bp+Ext2BlocksLeftToRead],eax ; Save the total block count
pop di
pop es
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jnz Ext2ReadIndirectBlock
Ext2ReadEntireFileDone:
ret
; Reads a maximum number of blocks
; from an array at 7000:0000
; and updates the total count
; ECX contains the max number of blocks to read
; EAX contains the number of blocks left to read
; On return:
; EAX contians the new number of blocks left to read
Ext2ReadDirectBlockList:
cmp eax,ecx ; Compare it to the maximum number of blocks to read
ja CallExt2ReadDirectBlocks ; If it will take more blocks then just read all of the blocks
mov cx,ax ; Otherwise adjust the block count accordingly
CallExt2ReadDirectBlocks:
sub eax,ecx ; Subtract the number of blocks being read from the total count
push eax ; Save the new total count
call Ext2ReadDirectBlocks
pop eax ; Restore the total count
ret
; Reads a specified number of blocks
; from an array at 7000:0000
; CX contains the number of blocks to read
Ext2ReadDirectBlocks:
push WORD 7000h
pop es
xor di,di ; Set ES:DI = 7000:0000
Ext2ReadDirectBlocksLoop:
mov eax,[es:di] ; Get direct block pointer from array
add di,BYTE 4 ; Update DI for next array index
push cx ; Save number of direct blocks left
push es ; Save array segment
push di ; Save array offset
mov es,[BYTE bp+Ext2ReadEntireFileLoadSegment]
xor bx,bx ; Setup load address for next read
call Ext2ReadBlock ; Read the block (this updates ES for the next read)
mov [BYTE bp+Ext2ReadEntireFileLoadSegment],es ; Save updated ES
pop di ; Restore the array offset
pop es ; Restore the array segment
pop cx ; Restore the number of blocks left
loop Ext2ReadDirectBlocksLoop
; At this point all the direct blocks should
; be loaded and ES (Ext2ReadEntireFileLoadSegment)
; should be ready for the next read.
ret
; Displays a file not found error message
; And reboots
PrintFileNotFound:
mov si,msgFreeLdr ; FreeLdr not found message
jmp short DisplayItAndReboot
; Displays a file size is 0 error
; And reboots
PrintFileSizeError:
mov si,msgFileSize ; Error message
jmp short DisplayItAndReboot
; Displays a file is not a regular file error
; And reboots
PrintRegFileError:
mov si,msgRegFile ; Error message
DisplayItAndReboot:
call PutChars ; Display it
jmp Reboot
msgFreeLdr db 'freeldr.sys not found',0
msgFileSize db 'File size is 0',0
msgRegFile db 'freeldr.sys isnt a regular file',0
filename db 'freeldr.sys'
msgLoading db 'Loading FreeLoader...',0
times 1022-($-$$) db 0 ; Pad to 1022 bytes
dw 0aa55h ; BootSector signature

View File

@@ -1,402 +0,0 @@
; FAT.ASM
; FAT12/16 Boot Sector
; Copyright (c) 1998, 2001, 2002 Brian Palmer
; This is a FAT12/16 file system boot sector
; that searches the entire root directory
; for the file freeldr.sys and loads it into
; memory.
;
; The stack is set to 0000:7BF2 so that the first
; WORD pushed will be placed at 0000:7BF0
;
; The DWORD at 0000:7BFC or BP-04h is the logical
; sector number of the start of the data area.
;
; The DWORD at 0000:7BF8 or BP-08h is the total
; sector count of the boot drive as reported by
; the computers bios.
;
; The WORD at 0000:7BF6 or BP-0ah is the offset
; of the ReadSectors function in the boot sector.
;
; The WORD at 0000:7BF4 or BP-0ch is the offset
; of the ReadCluster function in the boot sector.
;
; The WORD at 0000:7BF2 or BP-0eh is the offset
; of the PutChars function in the boot sector.
;
; When it locates freeldr.sys on the disk it will
; load the first sector of the file to 0000:8000
; With the help of this sector we should be able
; to load the entire file off the disk, no matter
; how fragmented it is.
;
; We load the entire FAT table into memory at
; 7000:0000. This improves the speed of floppy disk
; boots dramatically.
BootSectorStackTop equ 0x7bf2
DataAreaStartHigh equ 0x2
DataAreaStartLow equ 0x4
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow equ 0x8
BiosCHSDriveSize equ 0x8
ReadSectorsOffset equ 0xa
ReadClusterOffset equ 0xc
PutCharsOffset equ 0xe
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'FrLdr1.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 224
TotalSectors dw 2880
MediaDescriptor db 0f0h
SectorsPerFat dw 9
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
BootDrive db 0
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT12 '
main:
xor ax,ax
mov ss,ax
mov bp,7c00h
mov sp,BootSectorStackTop ; Setup a stack
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne GetDriveParameters
mov [BYTE bp+BootDrive],dl ; Save the boot drive
GetDriveParameters:
mov ah,08h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BYTE bp-BiosCHSDriveSize],eax
; Now we must find our way to the first sector of the root directory
xor ax,ax
xor cx,cx
mov al,[BYTE bp+NumberOfFats] ; Number of fats
mul WORD [BYTE bp+SectorsPerFat] ; Times sectors per fat
add ax,WORD [BYTE bp+HiddenSectors]
adc dx,WORD [BYTE bp+HiddenSectors+2] ; Add the number of hidden sectors
add ax,WORD [BYTE bp+ReservedSectors] ; Add the number of reserved sectors
adc dx,cx ; Add carry bit
mov WORD [BYTE bp-DataAreaStartLow],ax ; Save the starting sector of the root directory
mov WORD [BYTE bp-DataAreaStartHigh],dx ; Save it in the first 4 bytes before the boot sector
mov si,WORD [BYTE bp+MaxRootEntries] ; Get number of root dir entries in SI
pusha ; Save 32-bit logical start sector of root dir
; DX:AX now has the number of the starting sector of the root directory
; Now calculate the size of the root directory
xor dx,dx
mov ax,0020h ; Size of dir entry
mul si ; Times the number of entries
mov bx,[BYTE bp+BytesPerSector]
add ax,bx
dec ax
div bx ; Divided by the size of a sector
; AX now has the number of root directory sectors
add [BYTE bp-DataAreaStartLow],ax ; Add the number of sectors of the root directory to our other value
adc [BYTE bp-DataAreaStartHigh],cx ; Now the first 4 bytes before the boot sector contain the starting sector of the data area
popa ; Restore root dir logical sector start to DX:AX
LoadRootDirSector:
mov bx,7e0h ; We will load the root directory sector
mov es,bx ; Right after the boot sector in memory
xor bx,bx ; We will load it to [0000:7e00h]
xor cx,cx ; Zero out CX
inc cx ; Now increment it to 1, we are reading one sector
xor di,di ; Zero out di
push es ; Save ES because it will get incremented by 20h
call ReadSectors ; Read the first sector of the root directory
pop es ; Restore ES (ES:DI = 07E0:0000)
SearchRootDirSector:
cmp [es:di],ch ; If the first byte of the directory entry is zero then we have
jz ErrBoot ; reached the end of the directory and FREELDR.SYS is not here so reboot
pusha ; Save all registers
mov cl,0xb ; Put 11 in cl (length of filename in directory entry)
mov si,filename ; Put offset of filename string in DS:SI
repe cmpsb ; Compare this directory entry against 'FREELDR SYS'
popa ; Restore all the registers
jz FoundFreeLoader ; If we found it then jump
dec si ; SI holds MaxRootEntries, subtract one
jz ErrBoot ; If we are out of root dir entries then reboot
add di,BYTE +0x20 ; Increment DI by the size of a directory entry
cmp di,0200h ; Compare DI to 512 (DI has offset to next dir entry, make sure we haven't gone over one sector)
jc SearchRootDirSector ; If DI is less than 512 loop again
jmp short LoadRootDirSector ; Didn't find FREELDR.SYS in this directory sector, try again
FoundFreeLoader:
; We found freeldr.sys on the disk
; so we need to load the first 512
; bytes of it to 0000:8000
; ES:DI has dir entry (ES:DI == 07E0:XXXX)
mov ax,WORD [es:di+1ah] ; Get start cluster
push ax ; Save start cluster
push WORD 800h ; Put 800h on the stack and load it
pop es ; Into ES so that we load the cluster at 0000:8000
call ReadCluster ; Read the cluster
pop ax ; Restore start cluster of FreeLoader
; Save the addresses of needed functions so
; the helper code will know where to call them.
mov WORD [BYTE bp-ReadSectorsOffset],ReadSectors ; Save the address of ReadSectors
mov WORD [BYTE bp-ReadClusterOffset],ReadCluster ; Save the address of ReadCluster
mov WORD [BYTE bp-PutCharsOffset],PutChars ; Save the address of PutChars
; Now AX has start cluster of FreeLoader and we
; have loaded the helper code in the first 512 bytes
; of FreeLoader to 0000:8000. Now transfer control
; to the helper code. Skip the first three bytes
; because they contain a jump instruction to skip
; over the helper code in the FreeLoader image.
;jmp 0000:8003h
jmp 8003h
; Displays an error message
; And reboots
ErrBoot:
mov si,msgFreeLdr ; FreeLdr not found message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
mov ah,0eh
mov bx,07h
int 10h
jmp short PutChars
Done:
retn
; Displays a bad boot message
; And reboots
BadBoot:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
jmp short Reboot
; Reads cluster number in AX into [ES:0000]
ReadCluster:
; StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors;
dec ax ; Adjust start cluster by 2
dec ax ; Because the data area starts on cluster 2
xor ch,ch
mov cl,BYTE [BYTE bp+SectsPerCluster]
mul cx ; Times sectors per cluster
add ax,[BYTE bp-DataAreaStartLow] ; Add start of data area
adc dx,[BYTE bp-DataAreaStartHigh] ; Now we have DX:AX with the logical start sector of OSLOADER.SYS
xor bx,bx ; We will load it to [ES:0000], ES loaded before function call
;mov cl,BYTE [BYTE bp+SectsPerCluster]; Sectors per cluster still in CX
;call ReadSectors
;ret
; Reads logical sectors into [ES:BX]
; DX:AX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
; We can't just check if the start sector is
; in the BIOS CHS range. We have to check if
; the start sector + length is in that range.
pusha
dec cx
add ax,cx
adc dx,byte 0
cmp dx,WORD [BYTE bp-BiosCHSDriveSizeHigh] ; Check if they are reading a sector within CHS range
ja ReadSectorsLBA ; No - go to the LBA routine
jb ReadSectorsCHS ; Yes - go to the old CHS routine
cmp ax,WORD [BYTE bp-BiosCHSDriveSizeLow] ; Check if they are reading a sector within CHS range
jbe ReadSectorsCHS ; Yes - go to the old CHS routine
ReadSectorsLBA:
popa
ReadSectorsLBALoop:
pusha ; Save logical sector number & sector count
o32 push byte 0
push dx ; Put 64-bit logical
push ax ; block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push byte 1 ; Set transfer count to 1 sector
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
; We are so totally out of space here that I am forced to
; comment out this very beautifully written piece of code
; It would have been nice to have had this check...
;CheckInt13hExtensions: ; Now make sure this computer supports extended reads
; mov ah,0x41 ; AH = 41h
; mov bx,0x55aa ; BX = 55AAh
; mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
; int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
; jc PrintDiskError ; CF set on error (extensions not supported)
; cmp bx,0xaa55 ; BX = AA55h if installed
; jne PrintDiskError
; test cl,1 ; CX = API subset support bitmap
; jz PrintDiskError ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
; Good, we're here so the computer supports LBA disk access
; So finish the extended read
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc BadBoot ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popa ; Restore sector count & logical sector number
inc ax ; Increment Sector to Read
adc dx,byte 0
push bx
mov bx,es
add bx,byte 20h ; Increment read buffer for next sector
mov es,bx
pop bx
loop ReadSectorsLBALoop ; Read next sector
ret
; Reads logical sectors into [ES:BX]
; DX:AX has logical sector number to read
; CX has number of sectors to read
; CarryFlag set on error
ReadSectorsCHS:
popa
ReadSectorsCHSLoop:
pusha
xchg ax,cx
xchg ax,dx
xor dx,dx
div WORD [BYTE bp+SectorsPerTrack]
xchg ax,cx
div WORD [BYTE bp+SectorsPerTrack] ; Divide logical by SectorsPerTrack
inc dx ; Sectors numbering starts at 1 not 0
xchg cx,dx
div WORD [BYTE bp+NumberOfHeads] ; Number of heads
mov dh,dl ; Head to DH, drive to DL
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ch,al ; Cylinder in CX
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc BadBoot
popa
inc ax ;Increment Sector to Read
jnz NoCarryCHS
inc dx
NoCarryCHS:
push bx
mov bx,es
add bx,byte 20h
mov es,bx
pop bx
; Increment read buffer for next sector
loop ReadSectorsCHSLoop ; Read next sector
ret
msgDiskError db 'Disk error',0dh,0ah,0
msgFreeLdr db 'freeldr.sys not found',0dh,0ah,0
; Sorry, need the space...
;msgAnyKey db 'Press any key to restart',0dh,0ah,0
msgAnyKey db 'Press any key',0dh,0ah,0
filename db 'FREELDR SYS'
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition:
db 0
BootSignature:
dw 0aa55h ; BootSector signature

View File

@@ -1,505 +0,0 @@
; FAT32.ASM
; FAT32 Boot Sector
; Copyright (c) 1998, 2000, 2001, 2002 Brian Palmer
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'FrLdr1.0'
BytesPerSector dw 512
SectsPerCluster db 0
ReservedSectors dw 32
NumberOfFats db 2
MaxRootEntries dw 0 ; Always zero for FAT32 volumes
TotalSectors dw 0 ; Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ; Always zero for FAT32 volumes
SectorsPerTrack dw 0
NumberOfHeads dw 0
HiddenSectors dd 0
TotalSectorsBig dd 0
; FAT32 Inserted Info
SectorsPerFatBig dd 0
ExtendedFlags dw 0
FSVersion dw 0
RootDirStartCluster dd 0
FSInfoSector dw 0
BackupBootSector dw 6
Reserved1 times 12 db 0
; End FAT32 Inserted Info
BootDrive db 0
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT32 '
main:
xor ax,ax ; Setup segment registers
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
mov ss,ax ; Make SS correct
mov bp,7c00h
mov sp,7c00h ; Setup a stack
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne CheckSectorsPerFat
mov [BYTE bp+BootDrive],dl ; Save the boot drive
CheckSectorsPerFat:
cmp WORD [BYTE bp+SectorsPerFat],byte 0x00 ; Check the old 16-bit value of SectorsPerFat
jnz CheckFailed ; If it is non-zero then exit with an error
CheckTotalSectors: ; Check the old 16-bit value of TotalSectors & MaxRootEntries
cmp DWORD [BYTE bp+MaxRootEntries],byte 0x00; by comparing the DWORD at offset MaxRootEntries to zero
jnz CheckFailed ; If it is non-zero then exit with an error
CheckFileSystemVersion:
cmp WORD [BYTE bp+FSVersion],byte 0x00 ; Check the file system version word
jna GetDriveParameters ; It is zero, so continue
CheckFailed:
jmp PrintFileSystemError ; If it is not zero then exit with an error
GetDriveParameters:
mov ax,0800h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BiosCHSDriveSize],eax
LoadExtraBootCode:
; First we have to load our extra boot code at
; sector 14 into memory at [0000:7e00h]
mov eax,0eh
add eax,DWORD [BYTE bp+HiddenSectors] ; Add the number of hidden sectors
mov cx,1
xor bx,bx
mov es,bx ; Read sector to [0000:7e00h]
mov bx,7e00h
call ReadSectors
jmp StartSearch
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
cmp eax,DWORD [BiosCHSDriveSize] ; Check if they are reading a sector outside CHS range
jae ReadSectorsLBA ; Yes - go to the LBA routine
; If at all possible we want to use LBA routines because
; They are optimized to read more than 1 sector per read
pushad ; Save logical sector number & sector count
CheckInt13hExtensions: ; Now check if this computer supports extended reads
mov ah,0x41 ; AH = 41h
mov bx,0x55aa ; BX = 55AAh
mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
jc ReadSectorsCHS ; CF set on error (extensions not supported)
cmp bx,0xaa55 ; BX = AA55h if installed
jne ReadSectorsCHS
test cl,1 ; CX = API subset support bitmap
jz ReadSectorsCHS ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
popad ; Restore sector count & logical sector number
ReadSectorsLBA:
pushad ; Save logical sector number & sector count
cmp cx,64 ; Since the LBA calls only support 0x7F sectors at a time we will limit ourselves to 64
jbe ReadSectorsSetupDiskAddressPacket ; If we are reading less than 65 sectors then just do the read
mov cx,64 ; Otherwise read only 64 sectors on this loop iteration
ReadSectorsSetupDiskAddressPacket:
mov [LBASectorsRead],cx
o32 push byte 0
push eax ; Put 64-bit logical block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push cx ; Set transfer count
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc PrintDiskError ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
push bx
mov ebx,DWORD [LBASectorsRead]
add eax,ebx ; Increment sector to read
shl ebx,5
mov dx,es
add dx,bx ; Setup read buffer for next sector
mov es,dx
pop bx
sub cx,[LBASectorsRead]
jnz ReadSectorsLBA ; Read next sector
ret
LBASectorsRead:
dd 0
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectorsCHS:
popad ; Get logical sector number & sector count off stack
ReadSectorsCHSLoop:
pushad
xor edx,edx
movzx ecx,WORD [BYTE bp+SectorsPerTrack]
div ecx ; Divide logical by SectorsPerTrack
inc dl ; Sectors numbering starts at 1 not 0
mov cl,dl ; Sector in CL
mov edx,eax
shr edx,16
div WORD [BYTE bp+NumberOfHeads] ; Divide logical by number of heads
mov dh,dl ; Head in DH
mov dl,[BYTE bp+BootDrive] ; Drive number in DL
mov ch,al ; Cylinder in CX
ror ah,1 ; Low 8 bits of cylinder in CH, high 2 bits
ror ah,1 ; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc PrintDiskError ; If the read failed then abort
popad
inc eax ; Increment Sector to Read
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop ReadSectorsCHSLoop ; Read next sector
ret
; Displays a disk error message
; And reboots
PrintDiskError:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
jmp Reboot
; Displays a file system error message
; And reboots
PrintFileSystemError:
mov si,msgFileSystemError ; FreeLdr not found message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
mov ah,0eh
mov bx,07h
int 10h
jmp short PutChars
Done:
retn
BiosCHSDriveSize dd 0
msgDiskError db 'Disk error',0dh,0ah,0
msgFileSystemError db 'File system error',0dh,0ah,0
msgAnyKey db 'Press any key to restart',0dh,0ah,0
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition:
db 0
BootSignature:
dw 0aa55h ; BootSector signature
; End of bootsector
;
; Now starts the extra boot code that we will store
; at sector 14 on a FAT32 volume
;
; To remain multi-boot compatible with other operating
; systems we must not overwrite anything other than
; the bootsector which means we will have to use
; a different sector like 14 to store our extra boot code
StartSearch:
; Now we must get the first cluster of the root directory
mov eax,DWORD [BYTE bp+RootDirStartCluster]
cmp eax,0ffffff8h ; Check to see if this is the last cluster in the chain
jb ContinueSearch ; If not continue, if so then we didn't find freeldr.sys
jmp PrintFileNotFound
ContinueSearch:
mov bx,2000h
mov es,bx ; Read cluster to [2000:0000h]
call ReadCluster ; Read the cluster
; Now we have to find our way through the root directory to
; The OSLOADER.SYS file
xor bx,bx
mov bl,[BYTE bp+SectsPerCluster]
shl bx,4 ; BX = BX * 512 / 32
mov ax,2000h ; We loaded at 2000:0000
mov es,ax
xor di,di
mov si,filename
mov cx,11
rep cmpsb ; Compare filenames
jz FoundFile ; If same we found it
dec bx
jnz FindFile
jmp PrintFileNotFound
FindFile:
mov ax,es ; We didn't find it in the previous dir entry
add ax,2 ; So lets move to the next one
mov es,ax ; And search again
xor di,di
mov si,filename
mov cx,11
rep cmpsb ; Compare filenames
jz FoundFile ; If same we found it
dec bx ; Keep searching till we run out of dir entries
jnz FindFile ; Last entry?
; Get the next root dir cluster and try again until we run out of clusters
mov eax,DWORD [BYTE bp+RootDirStartCluster]
call GetFatEntry
mov [BYTE bp+RootDirStartCluster],eax
jmp StartSearch
FoundFile:
; Display "Loading FreeLoader..." message
mov si,msgLoading ; Loading message
call PutChars ; Display it
xor di,di ; ES:DI has dir entry
xor dx,dx
mov ax,WORD [es:di+14h] ; Get start cluster high word
shl eax,16
mov ax,WORD [es:di+1ah] ; Get start cluster low word
CheckStartCluster:
cmp eax,2 ; Check and see if the start cluster starts at cluster 2 or above
jnb CheckEndCluster ; If so then continue
jmp PrintFileSystemError ; If not exit with error
CheckEndCluster:
cmp eax,0ffffff8h ; Check and see if the start cluster is and end of cluster chain indicator
jb InitializeLoadSegment ; If not then continue
jmp PrintFileSystemError ; If so exit with error
InitializeLoadSegment:
mov bx,800h
mov es,bx
LoadFile:
cmp eax,0ffffff8h ; Check to see if this is the last cluster in the chain
jae LoadFileDone ; If so continue, if not then read the next one
push eax
xor bx,bx ; Load ROSLDR starting at 0000:8000h
push es
call ReadCluster
pop es
xor bx,bx
mov bl,[BYTE bp+SectsPerCluster]
shl bx,5 ; BX = BX * 512 / 16
mov ax,es ; Increment the load address by
add ax,bx ; The size of a cluster
mov es,ax
pop eax
push es
call GetFatEntry ; Get the next entry
pop es
jmp LoadFile ; Load the next cluster (if any)
LoadFileDone:
mov dl,[BYTE bp+BootDrive] ; Load boot drive into DL
mov dh,[BootPartition] ; Load boot partition into DH
xor ax,ax
push ax ; We loaded at 0000:8000
push WORD 8000h ; We will do a far return to 0000:8000h
retf ; Transfer control to ROSLDR
; Returns the FAT entry for a given cluster number
; On entry EAX has cluster number
; On return EAX has FAT entry for that cluster
GetFatEntry:
shl eax,2 ; EAX = EAX * 4 (since FAT32 entries are 4 bytes)
mov ecx,eax ; Save this for later in ECX
xor edx,edx
movzx ebx,WORD [BYTE bp+BytesPerSector]
push ebx
div ebx ; FAT Sector Number = EAX / BytesPerSector
movzx ebx,WORD [BYTE bp+ReservedSectors]
add eax,ebx ; FAT Sector Number += ReservedSectors
mov ebx,DWORD [BYTE bp+HiddenSectors]
add eax,ebx ; FAT Sector Number += HiddenSectors
pop ebx
dec ebx
and ecx,ebx ; FAT Offset Within Sector = ECX % BytesPerSector
; EAX holds logical FAT sector number
; ECX holds FAT entry offset
; Now we have to check the extended flags
; to see which FAT is the active one
; and use it, or if they are mirrored then
; no worries
movzx ebx,WORD [BYTE bp+ExtendedFlags] ; Get extended flags and put into ebx
and bx,0x0f ; Mask off upper 8 bits, now we have active fat in bl
jz LoadFatSector ; If fat is mirrored then skip fat calcs
cmp bl,[BYTE bp+NumberOfFats] ; Compare bl to number of fats
jb GetActiveFatOffset
jmp PrintFileSystemError ; If bl is bigger than numfats exit with error
GetActiveFatOffset:
push eax ; Save logical FAT sector number
mov eax,[BYTE bp+SectorsPerFatBig] ; Get the number of sectors occupied by one fat in eax
mul ebx ; Multiplied by the active FAT index we have in ebx
pop edx ; Get logical FAT sector number
add eax,edx ; Add the current FAT sector offset
LoadFatSector:
push ecx
; EAX holds logical FAT sector number
; Check if we have already loaded it
cmp eax,DWORD [FatSectorInCache]
je LoadFatSectorAlreadyLoaded
mov DWORD [FatSectorInCache],eax
mov bx,7000h
mov es,bx
xor bx,bx ; We will load it to [7000:0000h]
mov cx,1
call ReadSectors
LoadFatSectorAlreadyLoaded:
mov bx,7000h
mov es,bx
pop ecx
mov eax,DWORD [es:ecx] ; Get FAT entry
and eax,0fffffffh ; Mask off reserved bits
ret
FatSectorInCache: ; This variable tells us which sector we currently have in memory
dd 0ffffffffh ; There is no need to re-read the same sector if we don't have to
; Reads cluster number in EAX into [ES:0000]
ReadCluster:
; StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors;
dec eax
dec eax
xor edx,edx
movzx ebx,BYTE [BYTE bp+SectsPerCluster]
mul ebx
push eax
xor edx,edx
movzx eax,BYTE [BYTE bp+NumberOfFats]
mul DWORD [BYTE bp+SectorsPerFatBig]
movzx ebx,WORD [BYTE bp+ReservedSectors]
add eax,ebx
add eax,DWORD [BYTE bp+HiddenSectors]
pop ebx
add eax,ebx ; EAX now contains the logical sector number of the cluster
xor bx,bx ; We will load it to [ES:0000], ES loaded before function call
movzx cx,BYTE [BYTE bp+SectsPerCluster]
call ReadSectors
ret
; Displays a file not found error message
; And reboots
PrintFileNotFound:
mov si,msgFreeLdr ; FreeLdr not found message
call PutChars ; Display it
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
jmp Reboot
msgFreeLdr db 'freeldr.sys not found',0dh,0ah,0
filename db 'FREELDR SYS'
msgLoading db 'Loading FreeLoader...',0dh,0ah,0
times 1022-($-$$) db 0 ; Pad to 1022 bytes
dw 0aa55h ; BootSector signature

File diff suppressed because it is too large Load Diff

View File

@@ -1,466 +0,0 @@
;
; Win2k FAT32 Boot Sector
;
; Brian Palmer <brianp@sginet.com>
;
;
; The BP register is initialized to 0x7c00, the start of
; the boot sector. The SP register is initialized to
; 0x7bf4, leaving 12 bytes of data storage space above
; the stack.
;
; The DWORD that gets stored at 0x7bf4 is 0xffffffff ??
;
; The DWORD that gets stored at 0x7bf8 is the count of
; total sectors of the volume, calculated from the BPB.
;
; The DWORD that gets stored at 0x7bfc is the logical
; sector number of the start of the data area.
;
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'MSWIN4.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 0 ;512 - Always zero for FAT32 volumes
TotalSectors dw 0 ;2880 - Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ;9 - Always zero for FAT32 volumes
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
; FAT32 Inserted Info
SectorsPerFatBig dd 0
ExtendedFlags dw 0
FSVersion dw 0
RootDirStartCluster dd 0
FSInfoSector dw 0
BackupBootSector dw 6
Reserved1 times 12 db 0
; End FAT32 Inserted Info
BootDrive db 80h
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT32 '
main:
00007C5A 33C9 xor cx,cx
00007C5C 8ED1 mov ss,cx ; Setup the stack
00007C5E BCF47B mov sp,0x7bf4 ; Give us 12 bytes of space above the stack
00007C61 8EC1 mov es,cx
00007C63 8ED9 mov ds,cx
00007C65 BD007C mov bp,0x7c00
00007C68 884E02 mov [bp+0x2],cl ; Zero out the nop instruction?? (3rd byte of the boot sector)
00007C6B 8A5640 mov dl,[bp+BootDrive]
00007C6E B408 mov ah,0x8
00007C70 CD13 int 0x13 ; Int 13, func 8 - Get Drive Parameters
00007C72 7305 jnc drive_param_ok ; If no error jmp
drive_param_error:
00007C74 B9FFFF mov cx,0xffff ; We couldn't determine the drive parameters
00007C77 8AF1 mov dh,cl ; So just set the CHS to 0xff
drive_param_ok:
00007C79 660FB6C6 movzx eax,dh ; Store the number of heads in eax
00007C7D 40 inc ax ; Make it one-based because the bios returns it zero-based
00007C7E 660FB6D1 movzx edx,cl ; Store the sectors per track in edx
00007C82 80E23F and dl,0x3f ; Mask off the cylinder bits
00007C85 F7E2 mul dx ; Multiply the sectors per track with the heads, result in dx:ax
00007C87 86CD xchg cl,ch ; Switch the cylinder with the sectors
00007C89 C0ED06 shr ch,0x6 ; Move the top two cylinder bits down where they should be
00007C8C 41 inc cx ; Make it one-based because the bios returns it zero-based
00007C8D 660FB7C9 movzx ecx,cx
00007C91 66F7E1 mul ecx ; Multiply the cylinders with (heads * sectors) [stored in dx:ax already]
00007C94 668946F8 mov [bp-0x8],eax ; This value is the number of total sectors on the disk, so save it for later
00007C98 837E1600 cmp word [bp+TotalSectors],byte +0x0 ; Check the old 16-bit value of TotalSectors
00007C9C 7538 jnz print_ntldr_error_message ; If it is non-zero then exit with an error
00007C9E 837E2A00 cmp word [bp+FSVersion],byte +0x0 ; Check the file system version word
00007CA2 7732 ja print_ntldr_error_message ; If it is not zero then exit with an error
;
; We are now ready to load our second sector of boot code
; But first, a bit of undocumented information about how
; Win2k stores it's second sector of boot code.
;
; The FAT32 filesystem was designed so that you can store
; multiple sectors of boot code. The boot sector of a FAT32
; volume is actually three sectors long. Microsoft extended
; the BPB so much that you can't fit enough code in the
; boot sector to make it work. So they extended it. Sector 0
; is the traditional boot sector, sector 1 is the FSInfo sector,
; and sector 2 is used to store extra boot code to make up
; for the lost space the BPB takes.
;
; Now this creates an interesting problem. Suppose for example
; that the user has Win98 and Win2k installed. The Win2k
; boot sector is stored at sector 0 and the Win98 boot sector is
; stored as BOOTSECT.DOS on the file system. Now if Win2k were
; to store it's second sector of boot code in sector 2 like
; the fat spec says to do then when you try to dual boot back
; to Win98 the Win98 boot sector will load Win2k's second
; sector of boot code. Understand? ;-)
;
; To get around this problem Win2k stores it's second sector
; of boot code elsewhere. This sector is always stored at sector 13
; on the file system. Now don't ask me what happens when you don't
; have enough reserved sectors to store it, but I've never seen a
; FAT32 volume that didn't have at least 32 reserved sectors.
;
00007CA4 668B461C mov eax,[bp+HiddenSectors] ; Get the count of hidden sectors
00007CA8 6683C00C add eax,byte +0xc ; Add 12 to that value so that we are loading the 13th sector of the volume
00007CAC BB0080 mov bx,0x8000 ; Read the sector to address 0x8000
00007CAF B90100 mov cx,0x1 ; Read just one sector
00007CB2 E82B00 call read_sectors ; Read it
00007CB5 E94803 jmp 0x8000 ; Jump to the next sector of boot code
print_disk_error_message:
00007CB8 A0FA7D mov al,[DISK_ERR_offset_from_0x7d00]
putchars:
00007CBB B47D mov ah,0x7d
00007CBD 8BF0 mov si,ax
get_another_char:
00007CBF AC lodsb
00007CC0 84C0 test al,al
00007CC2 7417 jz reboot
00007CC4 3CFF cmp al,0xff
00007CC6 7409 jz print_reboot_message
00007CC8 B40E mov ah,0xe
00007CCA BB0700 mov bx,0x7
00007CCD CD10 int 0x10
00007CCF EBEE jmp short get_another_char
print_reboot_message:
00007CD1 A0FB7D mov al,[RESTART_ERR_offset_from_0x7d00]
00007CD4 EBE5 jmp short putchars
print_ntldr_error_message:
00007CD6 A0F97D mov al,[NTLDR_ERR_offset_from_0x7d00]
00007CD9 EBE0 jmp short putchars
reboot:
00007CDB 98 cbw
00007CDC CD16 int 0x16
00007CDE CD19 int 0x19
read_sectors:
00007CE0 6660 pushad
00007CE2 663B46F8 cmp eax,[bp-0x8]
00007CE6 0F824A00 jc near 0x7d34
00007CEA 666A00 o32 push byte +0x0
00007CED 6650 push eax
00007CEF 06 push es
00007CF0 53 push bx
00007CF1 666810000100 push dword 0x10010
00007CF7 807E0200 cmp byte [bp+0x2],0x0
00007CFB 0F852000 jnz near 0x7d1f
00007CFF B441 mov ah,0x41
00007D01 BBAA55 mov bx,0x55aa
00007D04 8A5640 mov dl,[bp+BootDrive]
00007D07 CD13 int 0x13
00007D09 0F821C00 jc near 0x7d29
00007D0D 81FB55AA cmp bx,0xaa55
00007D11 0F851400 jnz near 0x7d29
00007D15 F6C101 test cl,0x1
00007D18 0F840D00 jz near 0x7d29
00007D1C FE4602 inc byte [bp+0x2]
00007D1F B442 mov ah,0x42
00007D21 8A5640 mov dl,[bp+BootDrive]
00007D24 8BF4 mov si,sp
00007D26 CD13 int 0x13
00007D28 B0F9 mov al,0xf9
00007D2A 6658 pop eax
00007D2C 6658 pop eax
00007D2E 6658 pop eax
00007D30 6658 pop eax
00007D32 EB2A jmp short 0x7d5e
00007D34 6633D2 xor edx,edx
00007D37 660FB74E18 movzx ecx,word [bp+SectorsPerTrack]
00007D3C 66F7F1 div ecx
00007D3F FEC2 inc dl
00007D41 8ACA mov cl,dl
00007D43 668BD0 mov edx,eax
00007D46 66C1EA10 shr edx,0x10
00007D4A F7761A div word [bp+NumberOfHeads]
00007D4D 86D6 xchg dl,dh
00007D4F 8A5640 mov dl,[bp+BootDrive]
00007D52 8AE8 mov ch,al
00007D54 C0E406 shl ah,0x6
00007D57 0ACC or cl,ah
00007D59 B80102 mov ax,0x201
00007D5C CD13 int 0x13
00007D5E 6661 popad
00007D60 0F8254FF jc near print_disk_error_message
00007D64 81C30002 add bx,0x200
00007D68 6640 inc eax
00007D6A 49 dec cx
00007D6B 0F8571FF jnz near read_sectors
00007D6F C3 ret
NTLDR db 'NTLDR '
filler times 49 db 0
NTLDR_ERR db 0dh,0ah,'NTLDR is missing',0ffh
DISK_ERR db 0dh,0ah,'Disk error',0ffh
RESTART_ERR db 0dh,0ah,'Press any key to restart',0dh,0ah
more_filler times 16 db 0
NTLDR_offset_from_0x7d00 db 0
NTLDR_ERR_offset_from_0x7d00 db 0ach
DISK_ERR_offset_from_0x7d00 db 0bfh
RESTART_ERR_offset_from_0x7d00 db 0cch
dw 0
dw 0aa55h
;
; And that ends the code that makes up the traditional boot sector
; From here on out is a disassembly of the extra sector of boot
; code required for a FAT32 volume. Win2k stores this code at
; sector 13 on the file system.
;
00008000 660FB64610 movzx eax,byte [bp+NumberOfFats] ; Put the number of fats into eax
00008005 668B4E24 mov ecx,[bp+SectorsPerFatBig] ; Put the count of sectors per fat into ecx
00008009 66F7E1 mul ecx ; Multiply them, edx:eax = (eax * ecx)
0000800C 6603461C add eax,[bp+HiddenSectors] ; Add the hidden sectors to eax
00008010 660FB7560E movzx edx,word [bp+ReservedSectors] ; Put the count of reserved sectors into edx
00008015 6603C2 add eax,edx ; Add it to eax
00008018 668946FC mov [bp-0x4],eax ; eax now contains the start of the data area, so save it for later
0000801C 66C746F4FFFFFFFF mov dword [bp-0xc],0xffffffff ; Save 0xffffffff for later??
00008024 668B462C mov eax,[bp+RootDirStartCluster] ; Put the starting cluster of the root directory into eax
00008028 6683F802 cmp eax,byte +0x2 ; Check and see if the root directory starts at cluster 2 or above
0000802C 0F82A6FC jc near print_ntldr_error_message ; If not exit with error
00008030 663DF8FFFF0F cmp eax,0xffffff8 ; Check and see if the root directory start cluster is and end of cluster chain indicator
00008036 0F839CFC jnc near print_ntldr_error_message ; If so exit with error
search_root_directory_cluster:
0000803A 6650 push eax ; Save root directory start cluster on stack
0000803C 6683E802 sub eax,byte +0x2 ; Adjust it because the first two fat entries are unused so the third entry marks the first data area cluster
00008040 660FB65E0D movzx ebx,byte [bp+SectsPerCluster] ; Put the number of sectors per cluster in ebx
00008045 8BF3 mov si,bx ; Now store it also in si register
00008047 66F7E3 mul ebx ; Multiply sectors per cluster with root directory start cluster
0000804A 660346FC add eax,[bp-0x4] ; Add the start sector of the data area
read_directory_sector:
0000804E BB0082 mov bx,0x8200 ; We now have the start sector of the root directory, so load it to 0x8200
00008051 8BFB mov di,bx ; Put the address of the root directory sector in di also
00008053 B90100 mov cx,0x1 ; Read one sector
00008056 E887FC call read_sectors ; Perform the read
check_entry_for_ntldr:
00008059 382D cmp [di],ch ; Check the first byte of the root directory entry for zero
0000805B 741E jz ntldr_not_found ; If so then NTLDR is missing so exit with error
0000805D B10B mov cl,0xb ; Put the value 11 in cl so we can compare an 11-byte filename
0000805F 56 push si ; Save si (which contains the number of sectors per cluster)
00008060 BE707D mov si,NTLDR ;0x7d70 ; Check and see if "NTLDR" is the first file entry
00008063 F3A6 repe cmpsb ; Do the compare
00008065 5E pop si ; Restore sectors per cluster into si
00008066 741B jz ntldr_found ; If we found it then continue, else check next entry
00008068 03F9 add di,cx ; Add 0 to di? the next entry is 0x15 bytes away
0000806A 83C715 add di,byte +0x15 ; Add 0x15 to di
0000806D 3BFB cmp di,bx ; Check to see if we have reached the end of our sector we loaded, read_sectors sets bx = end address of data loaded
0000806F 72E8 jc check_entry_for_ntldr ; If we haven't reached the end then check the next entry
00008071 4E dec si ; decrement si, si holds the number of sectors per cluster
00008072 75DA jnz read_directory_sector ; If it's not zero then search the next sector for NTLDR
00008074 6658 pop eax ; If we got here that means we didn't find NTLDR in the previous root directory cluster, so restore eax with the start cluster
00008076 E86500 call get_fat_entry ; Get the next cluster in the fat chain
00008079 72BF jc search_root_directory_cluster ; If we reached end-of-file marker then don't jump, otherwise continue search
ntldr_not_found:
0000807B 83C404 add sp,byte +0x4
0000807E E955FC jmp print_ntldr_error_message
ntldr_load_segment_address dw 0x2000
ntldr_found:
00008083 83C404 add sp,byte +0x4 ; Adjust stack to remove root directory start cluster
00008086 8B7509 mov si,[di+0x9] ; Put start cluster high word in si
00008089 8B7D0F mov di,[di+0xf] ; Put start cluster low word in di
0000808C 8BC6 mov ax,si ; Put high word in ax
0000808E 66C1E010 shl eax,0x10 ; Shift it into position
00008092 8BC7 mov ax,di ; Put low word in ax, now eax contains start cluster of NTLDR
00008094 6683F802 cmp eax,byte +0x2 ; Check and see if the start cluster of NTLDR starts at cluster 2 or above
00008098 0F823AFC jc near print_ntldr_error_message ; If not exit with error
0000809C 663DF8FFFF0F cmp eax,0xffffff8 ; Check and see if the start cluster of NTLDR is and end of cluster chain indicator
000080A2 0F8330FC jnc near print_ntldr_error_message ; If so exit with error
load_next_ntldr_cluster:
000080A6 6650 push eax ; Save NTLDR start cluster for later
000080A8 6683E802 sub eax,byte +0x2 ; Adjust it because the first two fat entries are unused so the third entry marks the first data area cluster
000080AC 660FB64E0D movzx ecx,byte [bp+SectsPerCluster] ; Put the sectors per cluster into ecx
000080B1 66F7E1 mul ecx ; Multiply sectors per cluster by the start cluster, we now have the logical start sector
000080B4 660346FC add eax,[bp-0x4] ; Add the start of the data area logical sector
000080B8 BB0000 mov bx,0x0 ; Load NTLDR to offset zero
000080BB 06 push es ; Save es
000080BC 8E068180 mov es,[ntldr_load_segment_address] ; Get the segment address to load NTLDR to
000080C0 E81DFC call read_sectors ; Load the first cluster
000080C3 07 pop es ; Restore es
000080C4 6658 pop eax ; Restore eax to NTLDR start cluster
000080C6 C1EB04 shr bx,0x4 ; bx contains the amount of data we transferred, so divide it by 16
000080C9 011E8180 add [ntldr_load_segment_address],bx ; Add that value to the segment
000080CD E80E00 call get_fat_entry ; Get the next cluster in eax
000080D0 0F830200 jnc near jump_to_ntldr ; If we have reached the end of file then lets get to NTLDR
000080D4 72D0 jc load_next_ntldr_cluster ; If not, then load another cluster
jump_to_ntldr:
000080D6 8A5640 mov dl,[bp+BootDrive] ; Put the boot drive in dl
000080D9 EA00000020 jmp 0x2000:0x0 ; Jump to NTLDR
get_fat_entry:
000080DE 66C1E002 shl eax,0x2 ; Multiply cluster by 4
000080E2 E81100 call load_fat_sector ; Load the fat sector
000080E5 26668B01 mov eax,[es:bx+di] ; Get the fat entry
000080E9 6625FFFFFF0F and eax,0xfffffff ; Mask off the most significant 4 bits
000080EF 663DF8FFFF0F cmp eax,0xffffff8 ; Compare it to end of file marker to set the flags correctly
000080F5 C3 ret ; Return to caller
load_fat_sector:
000080F6 BF007E mov di,0x7e00 ; We will load the fat sector to 0x7e00
000080F9 660FB74E0B movzx ecx,word [bp+SectsPerCluster] ; Get the sectors per cluster
000080FE 6633D2 xor edx,edx ; We will divide (cluster * 4) / sectorspercluster
00008101 66F7F1 div ecx ; eax is already set before we get to this routine
00008104 663B46F4 cmp eax,[bp-0xc] ; Compare eax to 0xffffffff (initially, we set this value later)
00008108 743A jz load_fat_sector_end ; If it is the same return
0000810A 668946F4 mov [bp-0xc],eax ; Update that value
0000810E 6603461C add eax,[bp+HiddenSectors] ; Add the hidden sectors
00008112 660FB74E0E movzx ecx,word [bp+ReservedSectors] ; Add the reserved sectors
00008117 6603C1 add eax,ecx ; To the hidden sectors + the value we computed earlier
0000811A 660FB75E28 movzx ebx,word [bp+ExtendedFlags] ; Get extended flags and put into ebx
0000811F 83E30F and bx,byte +0xf ; Mask off upper 8 bits
00008122 7416 jz load_fat_sector_into_memory ; If fat is mirrored then skip fat calcs
00008124 3A5E10 cmp bl,[bp+NumberOfFats] ; Compare bl to number of fats
00008127 0F83ABFB jnc near print_ntldr_error_message ; If bl is bigger than numfats exit with error
0000812B 52 push dx ; Save dx
0000812C 668BC8 mov ecx,eax ; Put the current fat sector offset into ecx
0000812F 668B4624 mov eax,[bp+SectorsPerFatBig] ; Get the number of sectors occupied by one fat
00008133 66F7E3 mul ebx ; Multiplied by the active fat index
00008136 6603C1 add eax,ecx ; Add the current fat sector offset
00008139 5A pop dx ; Restore dx
load_fat_sector_into_memory:
0000813A 52 push dx ; Save dx, what is so important in dx??
0000813B 8BDF mov bx,di ; Put 0x7e00 in bx
0000813D B90100 mov cx,0x1 ; Load one sector
00008140 E89DFB call read_sectors ; Perform the read
00008143 5A pop dx ; Restore dx
load_fat_sector_end:
00008144 8BDA mov bx,dx ; Put it into bx, what is this value??
00008146 C3 ret ; Return
00008147 0000 add [bx+si],al
00008149 0000 add [bx+si],al
0000814B 0000 add [bx+si],al
0000814D 0000 add [bx+si],al
0000814F 0000 add [bx+si],al
00008151 0000 add [bx+si],al
00008153 0000 add [bx+si],al
00008155 0000 add [bx+si],al
00008157 0000 add [bx+si],al
00008159 0000 add [bx+si],al
0000815B 0000 add [bx+si],al
0000815D 0000 add [bx+si],al
0000815F 0000 add [bx+si],al
00008161 0000 add [bx+si],al
00008163 0000 add [bx+si],al
00008165 0000 add [bx+si],al
00008167 0000 add [bx+si],al
00008169 0000 add [bx+si],al
0000816B 0000 add [bx+si],al
0000816D 0000 add [bx+si],al
0000816F 0000 add [bx+si],al
00008171 0000 add [bx+si],al
00008173 0000 add [bx+si],al
00008175 0000 add [bx+si],al
00008177 0000 add [bx+si],al
00008179 0000 add [bx+si],al
0000817B 0000 add [bx+si],al
0000817D 0000 add [bx+si],al
0000817F 0000 add [bx+si],al
00008181 0000 add [bx+si],al
00008183 0000 add [bx+si],al
00008185 0000 add [bx+si],al
00008187 0000 add [bx+si],al
00008189 0000 add [bx+si],al
0000818B 0000 add [bx+si],al
0000818D 0000 add [bx+si],al
0000818F 0000 add [bx+si],al
00008191 0000 add [bx+si],al
00008193 0000 add [bx+si],al
00008195 0000 add [bx+si],al
00008197 0000 add [bx+si],al
00008199 0000 add [bx+si],al
0000819B 0000 add [bx+si],al
0000819D 0000 add [bx+si],al
0000819F 0000 add [bx+si],al
000081A1 0000 add [bx+si],al
000081A3 0000 add [bx+si],al
000081A5 0000 add [bx+si],al
000081A7 0000 add [bx+si],al
000081A9 0000 add [bx+si],al
000081AB 0000 add [bx+si],al
000081AD 0000 add [bx+si],al
000081AF 0000 add [bx+si],al
000081B1 0000 add [bx+si],al
000081B3 0000 add [bx+si],al
000081B5 0000 add [bx+si],al
000081B7 0000 add [bx+si],al
000081B9 0000 add [bx+si],al
000081BB 0000 add [bx+si],al
000081BD 0000 add [bx+si],al
000081BF 0000 add [bx+si],al
000081C1 0000 add [bx+si],al
000081C3 0000 add [bx+si],al
000081C5 0000 add [bx+si],al
000081C7 0000 add [bx+si],al
000081C9 0000 add [bx+si],al
000081CB 0000 add [bx+si],al
000081CD 0000 add [bx+si],al
000081CF 0000 add [bx+si],al
000081D1 0000 add [bx+si],al
000081D3 0000 add [bx+si],al
000081D5 0000 add [bx+si],al
000081D7 0000 add [bx+si],al
000081D9 0000 add [bx+si],al
000081DB 0000 add [bx+si],al
000081DD 0000 add [bx+si],al
000081DF 0000 add [bx+si],al
000081E1 0000 add [bx+si],al
000081E3 0000 add [bx+si],al
000081E5 0000 add [bx+si],al
000081E7 0000 add [bx+si],al
000081E9 0000 add [bx+si],al
000081EB 0000 add [bx+si],al
000081ED 0000 add [bx+si],al
000081EF 0000 add [bx+si],al
000081F1 0000 add [bx+si],al
000081F3 0000 add [bx+si],al
000081F5 0000 add [bx+si],al
000081F7 0000 add [bx+si],al
000081F9 0000 add [bx+si],al
000081FB 0000 add [bx+si],al
000081FD 0055AA add [di-0x56],dl ; We can't forget the infamous boot signature

View File

@@ -1,249 +0,0 @@
;
; The BP register is initialized to 0x7c00, the start of
; the boot sector. The SP register is initialized to
; 0x7bf0, leaving 16 bytes of data storage space above
; the stack.
;
; The DWORD that gets stored at 0x7bfc is the logical
; sector number of the start of the data area.
;
; The DWORD that gets stored at 0x7bf8 is ????????
;
; The DWORD that gets stored at 0x7bf4 is ????????
;
; The DWORD that gets stored at 0x7bf0 is ????????
;
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'MSWIN4.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 0 ;512 - Always zero for FAT32 volumes
TotalSectors dw 0 ;2880 - Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ;9 - Always zero for FAT32 volumes
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
BootDrive db 80h
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT16 '
main:
00007C3E 33C9 xor cx,cx
00007C40 8ED1 mov ss,cx ; Setup stack
00007C42 BCF07B mov sp,0x7bf0 ; Give us 16 bytes (4 dwords) of space above stack
00007C45 8ED9 mov ds,cx
00007C47 B80020 mov ax,0x2000
00007C4A 8EC0 mov es,ax ; Setup ES:0000 == 2000:0000
00007C4C FC cld
00007C4D BD007C mov bp,0x7c00
00007C50 384E24 cmp [bp+BootDrive],cl ; Compare the boot drive to zero (I think they are testing for a hard disk drive number)
00007C53 7D24 jnl floppy_boot ; Nope, it's a floppy, skip partition table tests
00007C55 8BC1 mov ax,cx ; Move zero to AX
00007C57 99 cwd ; DX:AX now contains zero
00007C58 E83C01 call read_one_sector ; Try to read in the MBR sector
00007C5B 721C jc floppy_boot ; Read failed, continue
00007C5D 83EB3A sub bx,byte +0x3a ; BX comes back with 512, make it equal to 454 (offset of partition table in MBR)
00007C60 66A11C7C mov eax,[HiddenSectors] ; Put HiddenSectors in EAX
find_our_partition:
00007C64 26663B07 cmp eax,[es:bx] ; Compare partition table entry's start sector to HiddenSectors
00007C68 268A57FC mov dl,[es:bx-0x4] ; Get partition type byte for this entry
00007C6C 7506 jnz next_partition_entry ; If partition start sector != HiddenSectors then skip this entry
00007C6E 80CA02 or dl,0x2 ; Set the second bit in partition type?? I guess this makes types 4 & 6 identical
00007C71 885602 mov [bp+0x2],dl ; Save it on top of nop instruction (3rd byte of boot sector)
next_partition_entry:
00007C74 80C310 add bl,0x10 ; Add 16 to bl (offset of next entry in partition table)
00007C77 73EB jnc find_our_partition ; Jump back until we hit the end of the partition table
; We now have our partition type at 0000:7C02
; If the type was 4 or 6 then that byte is 6
; I can't imagine why the boot sector needs to store
; this information, but hopefully I will uncover it
; as I further disassemble this boot sector.
floppy_boot:
00007C79 33C9 xor cx,cx ; Zero out CX
00007C7B 8A4610 mov al,[bp+NumberOfFats] ; Get the number of FATs in AL (usually 2)
00007C7E 98 cbw ; Sign extend it into AX (AX == 2)
00007C7F F76616 mul word [bp+NumberOfFats] ; Multiply it with NumberOfFats PLUS the low byte of MaxRootEntries!!??
00007C82 03461C add ax,[bp+HiddenSectors] ; Result is in DX:AX
00007C85 13561E adc dx,[bp+HiddenSectors+2] ; Add HiddenSectors to DX:AX
00007C88 03460E add ax,[bp+ReservedSectors] ; Add ReservedSectors to DX:AX
00007C8B 13D1 adc dx,cx ; CX still contains zero
00007C8D 8B7611 mov si,[bp+MaxRootEntries] ; Get MaxRootEntries in SI
00007C90 60 pusha ; Save all registers (right now DX:AX has starting sector of root dir)
00007C91 8946FC mov [bp-0x4],ax ; Save the starting sector of the root directory
00007C94 8956FE mov [bp-0x2],dx ; Save it in the first 4 bytes before the boot sector
00007C97 B82000 mov ax,0x20 ; AX == 32 (size of a directory entry)
00007C9A F7E6 mul si ; Multiply it with MaxRootEntries (DX:AX == length in bytes of root directory)
00007C9C 8B5E0B mov bx,[bp+BytesPerSector] ; Get the BytesPerSector in BX
00007C9F 03C3 add ax,bx ; Add it to AX (what if this addition carries? MS should 'adc dx,0' shouldn't they?)
00007CA1 48 dec ax ; Subtract one (basically rounding up)
00007CA2 F7F3 div bx ; Divide DX:AX (length of root dir in bytes) by the size of a sector
00007CA4 0146FC add [bp-0x4],ax ; Add the number of sectors of the root directory to our other value
00007CA7 114EFE adc [bp-0x2],cx ; Now the first 4 bytes before the boot sector contain the starting sector of the data area
00007CAA 61 popa ; Restore all registers (DX:AX has start sector of root dir)
load_root_dir_sector:
00007CAB BF0000 mov di,0x0 ; Zero out di
00007CAE E8E600 call read_one_sector ; Read the first sector of the root directory
00007CB1 7239 jc print_disk_error_message ; Read failed, print disk error and reboot
search_directory:
00007CB3 26382D cmp [es:di],ch ; If the first byte of the directory entry is zero then we have reached the end
00007CB6 7417 jz print_ntldr_error_message; of the directory and NTLDR is not here so reboot
00007CB8 60 pusha ; Save all registers
00007CB9 B10B mov cl,0xb ; Put 11 in cl (length of filename in directory entry)
00007CBB BEA17D mov si,NTLDR ; Put offset of filename string in DS:SI
00007CBE F3A6 repe cmpsb ; Compare this directory entry against 'NTLDR '
00007CC0 61 popa ; Restore all the registers
00007CC1 7432 jz found_ntldr ; If we found NTLDR then jump
00007CC3 4E dec si ; SI holds MaxRootEntries, subtract one
00007CC4 7409 jz print_ntldr_error_message; If we are out of root dir entries then reboot
00007CC6 83C720 add di,byte +0x20 ; Increment DI by the size of a directory entry
00007CC9 3BFB cmp di,bx ; Compare DI to BX (DI has offset to next dir entry, BX has address of end of directory sector in memory)
00007CCB 72E6 jc search_directory ; If DI is less than BX loop again
00007CCD EBDC jmp short load_root_dir_sector ; Didn't find NTLDR in this directory sector, try again
print_ntldr_error_message:
00007CCF A0FB7D mov al,[NTLDR_ERR_offset_from_0x7d00]
putchars:
00007CD2 B47D mov ah,0x7d
00007CD4 8BF0 mov si,ax
get_another_char:
00007CD6 AC lodsb
00007CD7 98 cbw
00007CD8 40 inc ax
00007CD9 740C jz print_reboot_message
00007CDB 48 dec ax
00007CDC 7413 jz reboot
00007CDE B40E mov ah,0xe
00007CE0 BB0700 mov bx,0x7
00007CE3 CD10 int 0x10
00007CE5 EBEF jmp short get_another_char
print_reboot_message:
00007CE7 A0FD7D mov al,[RESTART_ERR_offset_from_0x7d00]
00007CEA EBE6 jmp short putchars
print_disk_error_message:
00007CEC A0FC7D mov al,[DISK_ERR_offset_from_0x7d00]
00007CEF EBE1 jmp short putchars
reboot:
00007CF1 CD16 int 0x16
00007CF3 CD19 int 0x19
found_ntldr:
00007CF5 268B551A mov dx,[es:di+0x1a] ; Get NTLDR start cluster in DX
00007CF9 52 push dx ; Save it on the stack
00007CFA B001 mov al,0x1 ; Read 1 cluster? Or is this one sector?
00007CFC BB0000 mov bx,0x0 ; ES:BX is the load address (2000:0000)
00007CFF E83B00 call read_cluster ; Do the read
00007D02 72E8 jc print_disk_error_message ; If it failed then reboot
00007D04 5B pop bx ; Get the start cluster of NTLDR in BX
00007D05 8A5624 mov dl,[bp+BootDrive] ; Get boot drive in DL
00007D08 BE0B7C mov si,0x7c0b
00007D0B 8BFC mov di,sp
00007D0D C746F03D7D mov word [bp-0x10],read_cluster
00007D12 C746F4297D mov word [bp-0xc],0x7d29
00007D17 8CD9 mov cx,ds
00007D19 894EF2 mov [bp-0xe],cx
00007D1C 894EF6 mov [bp-0xa],cx
00007D1F C606967DCB mov byte [0x7d96],0xcb
00007D24 EA03000020 jmp 0x2000:0x3
00007D29 0FB6C8 movzx cx,al
00007D2C 668B46F8 mov eax,[bp-0x8]
00007D30 6603461C add eax,[bp+HiddenSectors]
00007D34 668BD0 mov edx,eax
00007D37 66C1EA10 shr edx,0x10
00007D3B EB5E jmp short 0x7d9b
read_cluster:
00007D3D 0FB6C8 movzx cx,al
00007D40 4A dec dx
00007D41 4A dec dx
00007D42 8A460D mov al,[bp+SectsPerCluster]
00007D45 32E4 xor ah,ah
00007D47 F7E2 mul dx
00007D49 0346FC add ax,[bp-0x4]
00007D4C 1356FE adc dx,[bp-0x2]
00007D4F EB4A jmp short 0x7d9b
read_sectors:
00007D51 52 push dx
00007D52 50 push ax
00007D53 06 push es
00007D54 53 push bx
00007D55 6A01 push byte +0x1
00007D57 6A10 push byte +0x10
00007D59 91 xchg ax,cx
00007D5A 8B4618 mov ax,[bp+SectorsPerTrack]
00007D5D 96 xchg ax,si
00007D5E 92 xchg ax,dx
00007D5F 33D2 xor dx,dx
00007D61 F7F6 div si
00007D63 91 xchg ax,cx
00007D64 F7F6 div si
00007D66 42 inc dx
00007D67 87CA xchg cx,dx
00007D69 F7761A div word [bp+NumberOfHeads]
00007D6C 8AF2 mov dh,dl
00007D6E 8AE8 mov ch,al
00007D70 C0CC02 ror ah,0x2
00007D73 0ACC or cl,ah
00007D75 B80102 mov ax,0x201
00007D78 807E020E cmp byte [bp+0x2],0xe
00007D7C 7504 jnz 0x7d82
00007D7E B442 mov ah,0x42
00007D80 8BF4 mov si,sp
00007D82 8A5624 mov dl,[bp+BootDrive]
00007D85 CD13 int 0x13
00007D87 61 popa
00007D88 61 popa
00007D89 720B jc 0x7d96
00007D8B 40 inc ax
00007D8C 7501 jnz 0x7d8f
00007D8E 42 inc dx
00007D8F 035E0B add bx,[bp+BytesPerSector]
00007D92 49 dec cx
00007D93 7506 jnz 0x7d9b
00007D95 F8 clc
00007D96 C3 ret
read_one_sector:
00007D97 41 inc cx
00007D98 BB0000 mov bx,0x0
00007D9B 60 pusha
00007D9C 666A00 o32 push byte +0x0
00007D9F EBB0 jmp short 0x7d51
NTLDR db 'NTLDR '
NTLDR_ERR db 0dh,0ah,'NTLDR is missing',0ffh
DISK_ERR db 0dh,0ah,'Disk error',0ffh
RESTART_ERR db 0dh,0ah,'Press any key to restart',0dh,0ah
filler times 18 db 0
NTLDR_offset_from_0x7d00 db 0
NTLDR_ERR_offset_from_0x7d00 db 0ach
DISK_ERR_offset_from_0x7d00 db 0bfh
RESTART_ERR_offset_from_0x7d00 db 0cch
dw 0
dw 0aa55h

View File

@@ -1 +0,0 @@
*.res

View File

@@ -1,76 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999 - 2003 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
CC = mingw32-gcc
LD = mingw32-ld
WINDRES = mingw32-windres
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
CC = gcc
LD = ld
RM = cmd /C del
WINDRES = windres
endif
FLAGS = -Wall
OBJS = rs232.o fdebug.o fdebug.res
.PHONY : clean
all: fdebug.exe
fdebug.exe: $(OBJS)
@echo ===================================================== LINKING fdebug
$(CC) $(FLAGS) -o fdebug.exe $(OBJS) -lgdi32 -lcomdlg32 -Wl,--subsystem,windows
fdebug.res: fdebug.rc resource.h
@echo ===================================================== Compiling $*
$(WINDRES) -o fdebug.res fdebug.rc -O coff
fdebug.o: fdebug.c rs232.h
@echo ===================================================== Compiling $*
$(CC) $(FLAGS) -o fdebug.o -c fdebug.c
rs232.o: rs232.c rs232.h
@echo ===================================================== Compiling $*
$(CC) $(FLAGS) -o rs232.o -c rs232.c
clean:
@-$(RM) *.o
@-$(RM) *.res
@-$(RM) *.exe
@echo Clean ALL done.

View File

@@ -1,554 +0,0 @@
// fdebug.cpp : Defines the entry point for the application.
//
#include <windows.h>
#include <commdlg.h>
#include <process.h>
#include <stdio.h>
#include <tchar.h>
#include "resource.h"
#include "rs232.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
HWND hMainWnd; // The main window handle
HWND hDisplayWnd; // The window to display the incoming data
HWND hEditWnd; // The edit window to get input from the user
TCHAR strComPort[MAX_PATH] = TEXT("COM1"); // The COM port to use
TCHAR strBaudRate[MAX_PATH] = TEXT("115200"); // The baud rate to use
TCHAR strCaptureFileName[MAX_PATH] = TEXT(""); // The file name to capture to
BOOL bConnected = FALSE; // Tells us if we are currently connected
BOOL bCapturing = FALSE; // Tells us if we are currently capturing data
BOOL bLocalEcho = FALSE; // Tells us if local echo is currently enabled
HANDLE hCaptureFile; // Handle to the capture file
DWORD dwThreadId = 0; // Thread id of RS232 communication thread
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConnectionDialogProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK CaptureDialogProc(HWND, UINT, WPARAM, LPARAM);
VOID EnableConnectMenuItem(BOOL Enable);
VOID EnableDisconnectMenuItem(BOOL Enable);
VOID EnableStartCaptureMenuItem(BOOL Enable);
VOID EnableStopCaptureMenuItem(BOOL Enable);
VOID CheckLocalEchoMenuItem(BOOL Checked);
VOID Rs232Thread(VOID* Parameter);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_FDEBUG, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_FDEBUG);
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_FDEBUG);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = NULL;//(HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_FDEBUG;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
hMainWnd = hWnd;
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
RECT rc;
TCHAR WndText[MAX_PATH];
DWORD Index;
NONCLIENTMETRICS ncm;
HFONT hFont;
switch (message)
{
case WM_CREATE:
hEditWnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("EDIT"), "", WS_CHILD|WS_VISIBLE|WS_VSCROLL|ES_AUTOHSCROLL|ES_LEFT|ES_MULTILINE, 0, 0, 0, 0, hWnd, NULL, hInst, NULL);
hDisplayWnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("EDIT"), "", WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL|ES_MULTILINE, 0, 0, 0, 0, hWnd, NULL, hInst, NULL);
memset(&ncm, 0, sizeof(NONCLIENTMETRICS));
ncm.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0);
hFont = CreateFontIndirect(&ncm.lfMessageFont);
SendMessage(hEditWnd, WM_SETFONT, (WPARAM)hFont, TRUE);
SendMessage(hDisplayWnd, WM_SETFONT, (WPARAM)hFont, TRUE);
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if (lParam == (LPARAM)hEditWnd && wmEvent == EN_CHANGE)
{
GetWindowText(hEditWnd, WndText, MAX_PATH);
if (_tcslen(WndText) > 0)
{
SetWindowText(hEditWnd, TEXT(""));
if (!bConnected)
{
MessageBox(hWnd, TEXT("You are not currently connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
break;
}
for (Index=0; Index<_tcslen(WndText); Index++)
{
if (dwThreadId != 0)
{
PostThreadMessage(dwThreadId, WM_CHAR, (WPARAM)WndText[Index], (LPARAM)0);
}
}
}
}
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case ID_FILE_CONNECT:
if (bConnected)
{
MessageBox(hWnd, TEXT("You are already connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
}
else
{
if (DialogBox(hInst, (LPCTSTR)IDD_CONNECTION, hWnd, (DLGPROC)ConnectionDialogProc) == IDOK)
{
bConnected = TRUE;
EnableDisconnectMenuItem(TRUE);
EnableConnectMenuItem(FALSE);
_beginthread(Rs232Thread, 0, NULL);
}
}
break;
case ID_FILE_DISCONNECT:
if (bConnected)
{
bConnected = FALSE;
EnableDisconnectMenuItem(FALSE);
EnableConnectMenuItem(TRUE);
}
else
{
MessageBox(hWnd, TEXT("You are not currently connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
}
break;
case ID_FILE_STARTCAPTURE:
if (DialogBox(hInst, (LPCTSTR)IDD_CAPTURE, hWnd, (DLGPROC)CaptureDialogProc) == IDOK)
{
bCapturing = TRUE;
EnableStopCaptureMenuItem(TRUE);
EnableStartCaptureMenuItem(FALSE);
hCaptureFile = CreateFile(strCaptureFileName, FILE_APPEND_DATA, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
break;
case ID_FILE_STOPCAPTURE:
if (bCapturing)
{
bCapturing = FALSE;
EnableStopCaptureMenuItem(FALSE);
EnableStartCaptureMenuItem(TRUE);
CloseHandle(hCaptureFile);
hCaptureFile = NULL;
}
break;
case ID_FILE_LOCALECHO:
if (bLocalEcho)
{
bLocalEcho = FALSE;
CheckLocalEchoMenuItem(bLocalEcho);
}
else
{
bLocalEcho = TRUE;
CheckLocalEchoMenuItem(bLocalEcho);
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
break;
case WM_SIZE:
GetClientRect(hWnd, &rc);
MoveWindow(hDisplayWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top - 20, TRUE);
MoveWindow(hEditWnd, rc.left, rc.bottom - 20, rc.right - rc.left, 20, TRUE);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hLicenseEditWnd;
TCHAR strLicense[0x1000];
switch (message)
{
case WM_INITDIALOG:
hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT);
LoadString(hInst, IDS_LICENSE, strLicense, 0x1000);
SetWindowText(hLicenseEditWnd, strLicense);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
LRESULT CALLBACK ConnectionDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hDlg, IDC_COMPORT), strComPort);
SetWindowText(GetDlgItem(hDlg, IDC_BAUTRATE), strBaudRate);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
GetWindowText(GetDlgItem(hDlg, IDC_COMPORT), strComPort, MAX_PATH);
GetWindowText(GetDlgItem(hDlg, IDC_BAUTRATE), strBaudRate, MAX_PATH);
}
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
LRESULT CALLBACK CaptureDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
OPENFILENAME ofn;
switch (message)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_BROWSE)
{
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
ofn.hInstance = hInst;
ofn.lpstrFilter = NULL;
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 0;
ofn.nFilterIndex = 0;
ofn.lpstrFile = strCaptureFileName;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = NULL;
ofn.Flags = OFN_HIDEREADONLY|OFN_NOREADONLYRETURN;
if (GetOpenFileName(&ofn))
{
SetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName);
}
}
if (LOWORD(wParam) == IDOK)
{
GetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName, MAX_PATH);
}
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
VOID EnableConnectMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_CONNECT, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_CONNECT, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableDisconnectMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_DISCONNECT, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_DISCONNECT, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableStartCaptureMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_STARTCAPTURE, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_STARTCAPTURE, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableStopCaptureMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_STOPCAPTURE, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_STOPCAPTURE, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID CheckLocalEchoMenuItem(BOOL Checked)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Checked)
{
CheckMenuItem(hFileMenu, ID_FILE_LOCALECHO, MF_BYCOMMAND|MF_CHECKED);
}
else
{
CheckMenuItem(hFileMenu, ID_FILE_LOCALECHO, MF_BYCOMMAND|MF_UNCHECKED);
}
}
VOID Rs232Thread(VOID* Parameter)
{
BYTE Byte;
TCHAR String[MAX_PATH];
MSG msg;
DWORD dwNumberOfBytesWritten;
dwThreadId = GetCurrentThreadId();
if (!Rs232OpenPortWin32(strComPort))
{
MessageBox(hMainWnd, TEXT("Error opening port!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
bConnected = FALSE;
return;
}
_stprintf(String, TEXT("%s,n,8,1"), strBaudRate);
if (!Rs232ConfigurePortWin32(String))
{
MessageBox(hMainWnd, TEXT("Error configuring port!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
bConnected = FALSE;
return;
}
while (bConnected)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_CHAR)
{
Rs232WriteByteWin32((BYTE)msg.wParam);
if (bLocalEcho && msg.wParam != (WPARAM)TEXT('\r'))
{
PostMessage(hDisplayWnd, WM_CHAR, (WPARAM)msg.wParam, (LPARAM)0);
if (hCaptureFile)
{
WriteFile(hCaptureFile, &msg.wParam, sizeof(TCHAR), &dwNumberOfBytesWritten, NULL);
}
}
}
}
if (Rs232ReadByteWin32(&Byte))
{
_stprintf(String, TEXT("%c"), Byte);
PostMessage(hDisplayWnd, WM_CHAR, (WPARAM)String[0], (LPARAM)0);
if (hCaptureFile)
{
WriteFile(hCaptureFile, &String[0], sizeof(TCHAR), &dwNumberOfBytesWritten, NULL);
}
}
}
dwThreadId = 0;
Rs232ClosePortWin32();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,215 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_FDEBUG ICON DISCARDABLE "fdebug.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDC_FDEBUG MENU DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Connect", ID_FILE_CONNECT
MENUITEM "&Disconnect", ID_FILE_DISCONNECT, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Start Capture", ID_FILE_STARTCAPTURE
MENUITEM "S&top Capture", ID_FILE_STOPCAPTURE, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Local Echo", ID_FILE_LOCALECHO
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 252
TOPMARGIN, 7
BOTTOMMARGIN, 203
END
IDD_CONNECTION, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 189
TOPMARGIN, 7
BOTTOMMARGIN, 93
END
IDD_CAPTURE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 244
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 259, 210
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About FreeLoader Debugger"
FONT 8, "Tahoma"
BEGIN
CONTROL "FreeLoader Debugger v1.0\nCopyright (C) 2003\nby Brian Palmer (brianp@reactos.org)",
IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,53,28,
122,26
DEFPUSHBUTTON "OK",IDOK,183,189,44,14,WS_GROUP
ICON IDI_FDEBUG,IDC_STATIC,19,30,20,20
EDITTEXT IDC_LICENSE_EDIT,53,63,174,107,ES_MULTILINE |
ES_READONLY | WS_VSCROLL
END
IDD_CONNECTION DIALOG DISCARDABLE 0, 0, 196, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Connection Options"
FONT 8, "Tahoma"
BEGIN
LTEXT "Enter the COM port (e.g. COM1):",IDC_STATIC,7,7,108,8
EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL
LTEXT "Enter the baud rate (e.g. 115200):",IDC_STATIC,7,38,114,
8
EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,45,79,50,14
PUSHBUTTON "Cancel",IDCANCEL,100,79,50,14
END
IDD_CAPTURE DIALOG DISCARDABLE 0, 0, 251, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Capture File"
FONT 8, "Tahoma"
BEGIN
LTEXT "Capture File Name:",IDC_STATIC,7,17,62,8
EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL
PUSHBUTTON "&Browse",IDC_BROWSE,194,26,50,14
DEFPUSHBUTTON "OK",IDOK,139,74,50,14
PUSHBUTTON "Cancel",IDCANCEL,194,74,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_TITLE "fdebug"
IDS_HELLO "Hello World!"
IDC_FDEBUG "FDEBUG"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,40 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by fdebug.rc
//
#define IDC_MYICON 2
#define IDD_FDEBUG_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDS_HELLO 106
#define IDI_FDEBUG 107
#define IDI_SMALL 108
#define IDC_FDEBUG 109
#define IDR_MAINFRAME 128
#define IDD_CONNECTION 130
#define IDD_CAPTURE 131
#define IDC_COMPORT 1000
#define IDC_BAUTRATE 1001
#define IDC_CAPTUREFILENAME 1002
#define IDC_BROWSE 1003
#define IDC_LICENSE_EDIT 1029
#define ID_FILE_CONNECT 32771
#define ID_FILE_DISCONNECT 32772
#define ID_FILE_STARTCAPTURE 32773
#define ID_FILE_STOPCAPTURE 32774
#define ID_FILE_LOCALECHO 32775
#define IDS_LICENSE 32815
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 132
#define _APS_NEXT_COMMAND_VALUE 32776
#define _APS_NEXT_CONTROL_VALUE 1004
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif

View File

@@ -1,257 +0,0 @@
/*
* FreeLoader - rs232.c
*
* Copyright (C) 2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <windows.h>
#include <winioctl.h>
#include <tchar.h>
#include <stdio.h>
#include "rs232.h"
HANDLE hPortHandle = NULL;
BOOL Rs232OpenPortWin32(TCHAR* CommPort)
{
TCHAR PortName[MAX_PATH];
DWORD ErrorCode;
// First check and make sure they don't already have the
// OBD2 connection open. We don't want to open things twice.
if (hPortHandle != NULL)
{
_tprintf(TEXT("Port handle not NULL. Must be already open. Returning FALSE...\n"));
return FALSE;
}
_stprintf(PortName, TEXT("\\\\.\\%s"), CommPort);
hPortHandle = CreateFile(PortName,
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
0);
if (hPortHandle == INVALID_HANDLE_VALUE)
{
hPortHandle = NULL;
ErrorCode = GetLastError();
_tprintf(TEXT("CreateFile(\"%s\") failed. GetLastError() = %lu.\n"), PortName, ErrorCode);
return FALSE;
}
return TRUE;
}
BOOL Rs232ClosePortWin32(VOID)
{
HANDLE hTempPortHandle = hPortHandle;
hPortHandle = NULL;
if (hTempPortHandle == NULL)
{
return FALSE;
}
return CloseHandle(hTempPortHandle);
}
// DeviceControlString
// [in] Pointer to a null-terminated string that specifies device-control information.
// The string must have the same form as the mode command's command-line arguments.
//
// For example, the following string specifies a baud rate of 1200, no parity, 8 data bits, and 1 stop bit:
// "baud=1200 parity=N data=8 stop=1"
//
// The following string specifies a baud rate of 115200, no parity, 8 data bits, and 1 stop bit:
// "115200,n,8,1"
//
// The device name is ignored if it is included in the string, but it must specify a valid device, as follows:
// "COM1: baud=1200 parity=N data=8 stop=1"
//
// For further information on mode command syntax, refer to the end-user documentation for your operating system.
BOOL Rs232ConfigurePortWin32(TCHAR* DeviceControlString)
{
DCB dcb;
DWORD ErrorCode;
/*if (!GetCommState(hPortHandle, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("GetCommState() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
dcb.BaudRate = BaudRate;
dcb.ByteSize = DataBits;
dcb.Parity = Parity;
dcb.StopBits = StopBits;
dcb.fBinary = TRUE;
dcb.fDsrSensitivity = FALSE;
dcb.fParity = (Parity == NOPARITY) ? FALSE : TRUE;
dcb.fOutX = FALSE;
dcb.fInX = FALSE;
dcb.fNull = FALSE;
dcb.fAbortOnError = TRUE;
dcb.fOutxCtsFlow = FALSE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
dcb.fDsrSensitivity = FALSE;
dcb.fRtsControl = RTS_CONTROL_DISABLE;
dcb.fOutxCtsFlow = FALSE;
dcb.fOutxCtsFlow = FALSE;*/
memset(&dcb, 0, sizeof(DCB));
dcb.DCBlength = sizeof(dcb);
if (!BuildCommDCB(DeviceControlString, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("BuildCommDCB() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
if (!SetCommState(hPortHandle, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("SetCommState() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
// Set the timeouts
if (!Rs232SetCommunicationTimeoutsWin32(MAXDWORD, 0, 0, 0, 0))
{
return FALSE;
}
return TRUE;
}
// Members
// ReadIntervalTimeout
// Specifies the maximum time, in milliseconds, allowed to elapse between the arrival of two characters on the communications line. During a ReadFile operation, the time period begins when the first character is received. If the interval between the arrival of any two characters exceeds this amount, the ReadFile operation is completed and any buffered data is returned. A value of zero indicates that interval time-outs are not used.
// A value of MAXDWORD, combined with zero values for both the ReadTotalTimeoutConstant and ReadTotalTimeoutMultiplier members, specifies that the read operation is to return immediately with the characters that have already been received, even if no characters have been received.
//
// ReadTotalTimeoutMultiplier
// Specifies the multiplier, in milliseconds, used to calculate the total time-out period for read operations. For each read operation, this value is multiplied by the requested number of bytes to be read.
// ReadTotalTimeoutConstant
// Specifies the constant, in milliseconds, used to calculate the total time-out period for read operations. For each read operation, this value is added to the product of the ReadTotalTimeoutMultiplier member and the requested number of bytes.
// A value of zero for both the ReadTotalTimeoutMultiplier and ReadTotalTimeoutConstant members indicates that total time-outs are not used for read operations.
//
// WriteTotalTimeoutMultiplier
// Specifies the multiplier, in milliseconds, used to calculate the total time-out period for write operations. For each write operation, this value is multiplied by the number of bytes to be written.
// WriteTotalTimeoutConstant
// Specifies the constant, in milliseconds, used to calculate the total time-out period for write operations. For each write operation, this value is added to the product of the WriteTotalTimeoutMultiplier member and the number of bytes to be written.
// A value of zero for both the WriteTotalTimeoutMultiplier and WriteTotalTimeoutConstant members indicates that total time-outs are not used for write operations.
//
// Remarks
// If an application sets ReadIntervalTimeout and ReadTotalTimeoutMultiplier to MAXDWORD and sets ReadTotalTimeoutConstant to a value greater than zero and less than MAXDWORD, one of the following occurs when the ReadFile function is called:
//
// If there are any characters in the input buffer, ReadFile returns immediately with the characters in the buffer.
// If there are no characters in the input buffer, ReadFile waits until a character arrives and then returns immediately.
// If no character arrives within the time specified by ReadTotalTimeoutConstant, ReadFile times out.
BOOL Rs232SetCommunicationTimeoutsWin32(DWORD ReadIntervalTimeout, DWORD ReadTotalTimeoutMultiplier, DWORD ReadTotalTimeoutConstant, DWORD WriteTotalTimeoutMultiplier, DWORD WriteTotalTimeoutConstant)
{
COMMTIMEOUTS ct;
DWORD ErrorCode;
if (!GetCommTimeouts(hPortHandle, &ct))
{
ErrorCode = GetLastError();
_tprintf(TEXT("GetCommTimeouts() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
ct.ReadIntervalTimeout = ReadIntervalTimeout;
ct.ReadTotalTimeoutConstant = ReadTotalTimeoutConstant;
ct.ReadTotalTimeoutMultiplier = ReadTotalTimeoutMultiplier;
ct.WriteTotalTimeoutConstant = WriteTotalTimeoutConstant;
ct.WriteTotalTimeoutMultiplier = WriteTotalTimeoutMultiplier;
if (!SetCommTimeouts(hPortHandle, &ct))
{
ErrorCode = GetLastError();
_tprintf(TEXT("SetCommTimeouts() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
return TRUE;
}
BOOL Rs232ReadByteWin32(BYTE* DataByte)
{
DWORD BytesRead = 0;
DWORD ErrorCode;
// If ReadFile() fails then report error
if (!ReadFile(hPortHandle, DataByte, 1, &BytesRead, NULL))
{
ErrorCode = GetLastError();
_tprintf(TEXT("ReadFile() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
// If ReadFile() succeeds, but BytesRead isn't 1
// then a timeout occurred.
if (BytesRead != 1)
{
return FALSE;
}
return TRUE;
}
BOOL Rs232WriteByteWin32(BYTE DataByte)
{
DWORD BytesWritten = 0;
BOOL Success;
DWORD ErrorCode;
Success = WriteFile(hPortHandle, &DataByte, 1, &BytesWritten, NULL);
if (!Success || BytesWritten != 1)
{
ErrorCode = GetLastError();
_tprintf(TEXT("WriteFile() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
return TRUE;
}

View File

@@ -1,46 +0,0 @@
/*
* FreeLoader - rs232.h
*
* Copyright (C) 2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __RS232_H
#define __RS232_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
//////////////////////////////////////////////////////////////////////////////////////////
//
// Function prototypes for RS232 communication under Win32
//
//////////////////////////////////////////////////////////////////////////////////////////
BOOL Rs232OpenPortWin32(TCHAR* CommPort);
BOOL Rs232ClosePortWin32(VOID);
BOOL Rs232ConfigurePortWin32(TCHAR* DeviceControlString);
BOOL Rs232SetCommunicationTimeoutsWin32(DWORD ReadIntervalTimeout, DWORD ReadTotalTimeoutMultiplier, DWORD ReadTotalTimeoutConstant, DWORD WriteTotalTimeoutMultiplier, DWORD WriteTotalTimeoutConstant);
BOOL Rs232ReadByteWin32(BYTE* DataByte);
BOOL Rs232WriteByteWin32(BYTE DataByte);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif // !defined(__RS232_H)

View File

@@ -1 +0,0 @@
obj

View File

@@ -1,282 +0,0 @@
Changes in v1.8.17 (10/19/2003) (ekohl)
- Ignore case of registry key and value names
Changes in v1.8.16 (10/12/2003) (ekohl)
- Renamed a lot of variables and functions in the registry
- Fixed buggy cell size calculation
Changes in v1.8.15 (8/29/2003) (chorns)
- Add top-level makefile
- Add fdebug/.cvsignore
- Don't use rdel to remove files in tools/Makefile
- Remove warning in freeldr/mm/meminit.c
Changes in v1.8.14 (8/10/2003) (chorns)
- Clear screen to black when booting ReactOS
Changes in v1.8.13 (6/05/2003) (brianp)
- Added support for booting Linux 2.4.x kernels
- i386 exception handler now reports FreeLoader version number
Changes in v1.8.12 (5/25/2003) (ekohl)
- Added .inf-file parser
- SetupLdr loads and uses txtsetup.sif
- Removed .hiv (text-hive) parser
Changes in v1.8.11 (4/30/2003) (ekohl)
- Added DiskGetExtendedDriveParameters()
- Moved hardware detection into the arch directory
- Rewrote/completed harddisk detection
- Removed PCI and IDE detection
- Added basic CPU detection
Changes in v1.8.10 (4/27/2003) (chorns)
- Query BIOS for supported disk drives
Changes in v1.8.9 (4/25/2003) (chorns)
- Detect PCI busses
- Detect IDE controllers and devices
- Improved RegEnumValue()
Changes in v1.8.8 (4/25/2003) (ekohl)
- Added memmove().
- Added hardware hive export.
Changes in v1.8.7 (4/22/2003) (brianp)
- Added a file system recognizer to get around problems where
the partition id did not match the file system type.
Changes in v1.8.6 (4/14/2003) (brianp)
- Fixed a bug in fathelp.asm where is wasn't adding the hidden sector
count before performing a subtraction.
Changes in v1.8.5 (4/10/2003) (ekohl)
- Added support for binary system hive.
Changes in v1.8.4 (4/5/2003) (chorns)
- Added DOS compatible Master Boot Record (MBR)
Changes in v1.8.3 (3/18/2003) (brianp)
- Added _alloca() function because Mingw32 generates code that needs it
- Defined _mainCRTStartup in fathelp.asm because Mingw32 looks for that symbol
Changes in v1.8.2 (1/24/2003) (ekohl)
- Relaxed check for Int13-Extension support.
Some BIOSes have a strange opinion about what is supported. :-/
Changes in v1.8.1 (1/20/2003) (ekohl)
- Fixed the ISO filesystem detection code.
- Removed IsSetupLdr.
Changes in v1.8 (1/18/2003) (brianp)
- Added F8 options menu
- Added custom Boot functionality
- Moved all OS= settings from [FreeLoader] section to [Operating Systems] section.
- Removed MessageLine= setting. MessageBox= now accepts "\n" as an escape character for newlines.
- Added descriptions for disk error codes returned by the BIOS.
- Device names like "fd0" and "hd0" and "hd1" as well as BIOS drive numbers can now be used as BootDrive= settings.
Changes in v1.7.12 (12/05/2002) (brianp)
- Minor tweak to UI code to allow description
text to be displayed along with the progress
bar.
Changes in v1.7.11 (12/05/2002) (brianp)
- Added memory map count to GetBiosMemoryMap() so that
it doesn't just assume the size of the array.
- Fix so that we use the continuation value that
the BIOS returns.
Changes in v1.7.10 (11/24/2002) (brianp)
- Added assembler versions of memcmp() memcpy() memset()
- Implemented Int386() so that real-mode interrupts can be called from C-code
- Removed unnecessary call in DbgPrint() macro (freeldr.sys is ~16k smaller now)
- 64-bit lba sector addressing for disk calls
- Re-coded biosdisk.S as i386disk.c
- Re-coded mem.S as i386mem.c
- Re-coded rtlcode.S as i386rtl.c
- Cleaned up i386trap.S so that it only saves the registers once.
- Re-coded biosvid.S as i386vid.c
- Video fade in/out
- VESA text modes supported now
- Offscreen buffering to remove flicker
- Standardized format of boot sector so that BootPartition is stored right before 0xaa55
- Prefixed all file system functions with 'Fs'
Changes in v1.7.9 (9/30/2002) (brianp)
- Fix for bug in BiosInt13ReadExtended() (biosdisk.S)
by Christophe Bothamy & Mike Lerwill
Changes in v1.7.8 (9/7/2002) (ekohl)
- Added new 'bootcd' target.
- Removed/disabled debugging code.
- SetupLdr must not call BiosInt13ExtensionsSupported to check
extended int13 capabilities because they are already used to
boot a CD and some BIOSes return incorrect results when a CD-ROM
drive is checked.
Changes in v1.7.7 (9/5/2002) (ekohl)
- fs/iso.c: Got iso-fs working again.
- reactos/setupldr.c: Implemented very simple setup loader.
Changes in v1.7.6 (8/31/2002) (ekohl)
- bootsect/isoboot.asm: Reduced read transfer size to ensure that
the read buffer for an int13/ah=42h (exended read) does not
cross a segment boundary.
- freeldr.c, bootmgr.c, setupldr.c, makefile: Renamed
LoadBootManager() and ReactOSRunSetupLoader() to RunLoader().
Either bootmgr.o or setupldr.o is used to build freeldr.sys or
setupldr.sys
Changes in v1.7.5 (8/21/2002) (brianp)
- biosvid.S (BiosVideoDisableBlinkBit): Added code to
disable the blink bit in the text mode character
attribute byte so that the full range of
background colors can be used.
Changes in v1.7.4 (8/20/2002) (brianp)
- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
Changes in v1.7.2 (8/7/2002) (brianp)
- Fragment size must be equal to the block size
Changes in v1.7.1 (8/7/2002) (brianp)
- Symbolic links on EXT2/3 are now supported
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
Changes in v1.6.2 (7/28/2002) (brianp)
- Fix for GetFatEntry16 bug (fathelp.asm) by Mike Lerwill
Changes in v1.6.1 (7/22/2002) (brianp)
- Fix for disk caching while doing drive remapping
Changes in v1.6 (7/21/2002) (brianp)
- Added BIOS drive mapping functionality
Changes in v1.5 (7/13/2002)
- If symbols are available then pass them to the OS as multiboot modules
Changes in v1.4 (6/27/2002)
- Added separate configuration for a SETUPLDR version
Changes in v1.3.1 (6/8/2002)
- Implemented MmAllocateMemoryAtAddress()
- Fixed Linux boot code to go through the memory manager to allocate memory at 1MB
Changes in v1.3 (6/5/2002)
- Added protected mode exception handling in case FreeLoader crashes
- Reworked memory manager to use all of extended memory
- Reworked UI code, now supports multiple text-mode resolutions
Changes in v1.2.2 (5/4/2002)
- Fixed memory leak in menu.c
Changes in v1.2.1 (5/3/2002)
- Makefile updates
- Optimized the Makefile
- Removed recursive make functionality (builds much faster now)
- Places all output into one single directory
- Added automagically generated dependencies
Changes in v1.2 (4/30/2002)
- All Linux kernels are supported (zImage & bzImage, loaded high & low)
- Initrd support
- FreeLoader now compiles under Mingw32 instead of just DJGPP, but
the Mingw32 linker seems to output a corrupt binary.
Changes in v1.01 (4/28/2002)
- Fixed FAT short file name buffer overflow that was causing
some long filenames not to work correctly.
Changes in v1.0 (4/24/2002)
- FreeLoader version 1.0!
- Supports booting ReactOS
- Supports booting Linux bzImage kernels
- No initrd support (yet)
- No zImage support (yet)
- No ext2 file system support (yet)
- Supports FAT & ISO-9660 file systems
- Forward slashes '/' as well as backslashes '\' can be used
for path names in FAT & ISO-9600
- Fixed bug in LBA code where it was only reading one sector
even if you asked for more
- Fixed bug in FAT code, was also present in ISO-9660 code where
it wasn't incrementing the buffer address correctly

View File

@@ -1,413 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
CC = mingw32-gcc
LD = mingw32-ld
AR = mingw32-ar
NM = mingw32-nm
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
CC = gcc
LD = ld
AR = ar
NM = nm
MKDIR = md
SEP = /
endif
#############################################
# CHANGE THESE FOR YOUR OUTPUT
#
TARGET = i386
# Debugging information on (bigger binary)
#DEBUG = yes
# Debugging information off (smaller binary)
DEBUG = no
OBJDIR = obj
OUTPUT_DIR = $(OBJDIR)$(SEP)$(TARGET)
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd
#############################################
# COMPILER AND LINKER PROGRAMS
#
TOOLSDIR = $(SRCDIR)$(SEP)..$(SEP)tools
RM = $(TOOLSDIR)$(SEP)rdel
CP = $(TOOLSDIR)$(SEP)rcopy
MKDIR = $(TOOLSDIR)$(SEP)rmkdir
RMDIR = $(TOOLSDIR)$(SEP)rrmdir
NASM_CMD = nasm
OBJCOPY = objcopy
DEPTOOL = $(TOOLSDIR)$(SEP)deptool
HOSTTOOL = $(TOOLSDIR)$(SEP)hosttype
TOOLS = $(DEPTOOL) $(HOSTTOOL)
HOSTTYPE = $(shell $(HOSTTOOL))
#-----------------------------------------------------------------------------------------------------
# TEST IF WE ARE IN THE TARGET DIRECTORY
# IF NOT WE WILL CHANGE TO THE TARGET DIRECTORY AND RUN MAKE FROM THERE
#-----------------------------------------------------------------------------------------------------
#ifeq (,$(filter $(CURDIR)$(SEP)$(OUTPUT_DIR),$(notdir $(CURDIR))))
ifneq ($(CURDIR), $(SRCDIR)$(SEP)$(OUTPUT_DIR))
SRCDIR = $(CURDIR)
.SUFFIXES:
#############################################
# VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE
#
MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \
-f ..$(SEP)..$(SEP)Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS)
.PHONY: CHANGE_TO_TARGET
CHANGE_TO_TARGET setupldr : BUILD_TOOLS $(OBJDIR) $(OBJDIR)$(SEP)$(TARGET)
@echo Calculating source file dependencies...
+@$(MAKETARGET)
.PHONY: BUILD_TOOLS
BUILD_TOOLS:
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
$(OBJDIR):
@echo Creating directory: $(OBJDIR)
@$(MKDIR) $(OBJDIR)
$(OBJDIR)$(SEP)$(TARGET): $(OBJDIR)
@echo Creating directory: $(OBJDIR)$(SEP)$(TARGET)
@$(MKDIR) $(OBJDIR)$(SEP)$(TARGET)
Makefile : ;
% :: CHANGE_TO_TARGET
#############################################
.PHONY : clean
clean:
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
@echo Cleaning directory $(OBJDIR)$(SEP)$(TARGET)
@-$(RM) $(OBJDIR)$(SEP)$(TARGET)$(SEP)*
@echo Removing directory $(OBJDIR)$(SEP)$(TARGET)
@-$(RMDIR) $(OBJDIR)$(SEP)$(TARGET)
@-$(RMDIR) $(OBJDIR)
@echo Clean ALL done.
#############################################
.PHONY : bootcd
bootcd : bootcd_dirs setup_loader boot_loader
.PHONY : bootcd_dirs
bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
.PHONY : boot_loader
boot_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.sys
$(CP) ..$(SEP)freeldr.ini $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.ini
.PHONY : setup_loader
setup_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)setupldr.sys
#############################################
#-----------------------------------------------------------------------------------------------------
# END MAGIC TARGET DIRECTORY CHANGE STUFF
#-----------------------------------------------------------------------------------------------------
else
#############################################
# COMPILER COMMAND LINE OPTIONS
#
COMPILER_OPTIONS = -Wall -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-inline -O1 -MD
# FreeLoader does not use any of the standard libraries, includes, or built-in functions
#############################################
# COMPILER DEFINES
#
ifeq ($(DEBUG),yes)
COMPILER_DEBUG_DEFINES = -DDEBUG
else
COMPILER_DEBUG_DEFINES =
endif
COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES)
#############################################
# INCLUDE DIRECTORY OPTIONS
#
COMPILER_INCLUDES = -I$(SRCDIR)$(SEP)include
#############################################
# COMPILER FLAGS
#
CFLAGS = $(COMPILER_OPTIONS) \
$(COMPILER_DEFINES) \
$(COMPILER_INCLUDES)
#############################################
# LINKER COMMAND LINE OPTIONS
#
#LINKER_OPTIONS = -N -Ttext=0x8000 --oformat=binary -s
LINKER_OPTIONS = -N -Ttext=0x8000
#############################################
# LINKER FLAGS
#
LFLAGS = $(LINKER_OPTIONS)
#############################################
# NASM FLAGS
#
ifeq ($(HOSTTYPE), dos)
NASMFLAGS = -f coff
else
ifeq ($(HOSTTYPE), win32)
NASMFLAGS = -f win32
else
NASMFLAGS = -f elf
endif
endif
#############################################
# LIST ALL THE OBJECT FILE GROUPS
#
# fathelp.o must come first in the link line because it contains bootsector helper code
# arch.o must come second in the link line because it contains the startup code
ARCH_OBJS = fathelp.o \
arch.o \
i386idt.o \
i386trap.o \
i386cpu.o \
i386pnp.o \
boot.o \
linux.o \
mb.o \
i386mem.o \
i386rtl.o \
i386vid.o \
drvmap.o \
int386.o \
i386disk.o \
portio.o \
hardware.o \
hwcpu.o \
_alloca.o # For Mingw32 builds
RTL_OBJS = print.o \
stdlib.o \
string.o \
list.o \
memcmp.o \
memcpy.o \
memmove.o \
memset.o
FS_OBJS = fs.o \
fat.o \
iso.o \
ext2.o \
fsrec.o
UI_OBJS = tui.o \
tuimenu.o \
ui.o \
gui.o
REACTOS_OBJS= arcname.o \
binhive.o \
registry.o
COMM_OBJS = rs232.o
DISK_OBJS = disk.o \
geometry.o \
partition.o
MM_OBJS = mm.o \
meminit.o
CACHE_OBJS = cache.o \
blocklist.o
INIFILE_OBJS= inifile.o \
ini_init.o \
parse.o
INFFILE_OBJS= inffile.o
VIDEO_OBJS = video.o \
vidmode.o \
fade.o \
palette.o \
pixel.o \
bank.o
# libgcc2.o contains code (__udivdi3, __umoddi3) necessary to do
# 64-bit division on the i386 (and other 32-bit) architectures
# This code was taken from the GCC v3.1 source
MATH_OBJS = libgcc2.o
BASE_OBJS = freeldr.o \
debug.o \
multiboot.o \
version.o
FREELDR_OBJS= bootmgr.o \
drivemap.o \
miscboot.o \
options.o \
linuxboot.o \
oslist.o \
custom.o
ROSLDR_OBJS = reactos.o
SETUPLDR_OBJS= setupldr.o
COMMON_OBJS = $(ARCH_OBJS) \
$(RTL_OBJS) \
$(FS_OBJS) \
$(UI_OBJS) \
$(REACTOS_OBJS) \
$(COMM_OBJS) \
$(DISK_OBJS) \
$(MM_OBJS) \
$(CACHE_OBJS) \
$(VIDEO_OBJS) \
$(MATH_OBJS) \
$(BASE_OBJS)
SPECIAL_OBJS = $(INIFILE_OBJS) \
$(INFFILE_OBJS) \
$(FREELDR_OBJS) \
$(ROSLDR_OBJS) \
$(SETUPLDR_OBJS)
F_OBJS = $(COMMON_OBJS) \
$(INIFILE_OBJS) \
$(ROSLDR_OBJS) \
$(FREELDR_OBJS)
S_OBJS = $(COMMON_OBJS) \
$(INIFILE_OBJS) \
$(INFFILE_OBJS) \
$(SETUPLDR_OBJS)
#############################################
# ALL THE OBJECTS
#
ALL_OBJS = $(COMMON_OBJS) \
$(SPECIAL_OBJS)
#############################################
# SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
#
VPATH = $(SRCDIR)$(SEP) \
$(SRCDIR)$(SEP)arch$(SEP)$(TARGET) \
$(SRCDIR)$(SEP)rtl \
$(SRCDIR)$(SEP)fs \
$(SRCDIR)$(SEP)ui \
$(SRCDIR)$(SEP)reactos \
$(SRCDIR)$(SEP)comm \
$(SRCDIR)$(SEP)disk \
$(SRCDIR)$(SEP)mm \
$(SRCDIR)$(SEP)cache \
$(SRCDIR)$(SEP)inifile \
$(SRCDIR)$(SEP)inffile \
$(SRCDIR)$(SEP)video \
$(SRCDIR)$(SEP)math \
$(SRCDIR)$(SEP)include
#############################################
all : freeldr.sys setupldr.sys
@echo Make ALL done.
#############################################
freeldr.sys : $(ALL_OBJS)
@echo ===================================================== LINKING $@
# @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(F_OBJS)
@$(LD) $(LFLAGS) -Map freeldr.map -o freeldr.exe $(F_OBJS)
# @$(CC) -Wl,-Ttext=0x8000,-N,-Map,freeldr.map -o freeldr.exe $(F_OBJS)
@$(NM) --numeric-sort freeldr.exe > freeldr.sym
@$(OBJCOPY) -O binary freeldr.exe freeldr.sys
#############################################
setupldr.sys : $(ALL_OBJS)
@echo ===================================================== LINKING $@
@$(LD) $(LFLAGS) -Map setupldr.map -o setupldr.exe $(S_OBJS)
@$(NM) --numeric-sort setupldr.exe > setupldr.sym
@$(OBJCOPY) -O binary setupldr.exe setupldr.sys
#############################################
%.o :: %.c
@echo ===================================================== Compiling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(DEPTOOL) $*.d
%.o :: %.S
@echo ===================================================== Assembling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(DEPTOOL) $*.d
%.o :: %.asm
@echo ===================================================== Assembling $*
@$(NASM_CMD) $(NASMFLAGS) -o $@ $<
#############################################
# Include the automagically generated dependencies
-include $(ALL_OBJS:%.o=%.d)
#############################################
endif

View File

@@ -1,33 +0,0 @@
/* stuff needed for libgcc on win32. */
/*#ifdef L_chkstk*/
#ifdef WIN32
.global ___chkstk
.global __alloca
___chkstk:
__alloca:
pushl %ecx /* save temp */
movl %esp,%ecx /* get sp */
addl $0x8,%ecx /* and point to return addr */
probe: cmpl $0x1000,%eax /* > 4k ?*/
jb done
subl $0x1000,%ecx /* yes, move pointer down 4k*/
orl $0x0,(%ecx) /* probe there */
subl $0x1000,%eax /* decrement count */
jmp probe /* and do it again */
done: subl %eax,%ecx
orl $0x0,(%ecx) /* less that 4k, just peek here */
movl %esp,%eax
movl %ecx,%esp /* decrement stack */
movl (%eax),%ecx /* recover saved temp */
movl 4(%eax),%eax /* get return address */
jmp *%eax
#endif

View File

@@ -1,335 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(RealEntryPoint)
cli
/* Setup segment registers */
xorw %ax,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Setup a stack */
movw stack16,%sp
sti
/* Init pmode */
call switch_to_prot
.code32
/* Store the boot drive */
movb %dl,(_BootDrive)
/* Store the boot partition */
movb %dh,(_BootPartition)
/* GO! */
call _BootMain
call switch_to_real
.code16
int $0x19
/* We should never get here */
stop:
jmp stop
nop
nop
/*
* Switches the processor to protected mode
* it destroys eax
*/
EXTERN(switch_to_prot)
.code16
cli /* None of these */
/* We don't know what values are currently */
/* in the segment registers. So we are */
/* going to reload them with sane values. */
/* Of course CS has to already be valid. */
/* We are currently in real-mode so we */
/* need real-mode segment values. */
movw $0x0000,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Get the return address off the stack */
popw (code32ret)
/* Save 16-bit stack pointer */
movw %sp,stack16
/* Load the GDT */
lgdt gdtptr
/* Load the IDT */
lidt i386idtptr
/* Enable Protected Mode */
mov %cr0,%eax
orl $CR0_PE_SET,%eax
mov %eax,%cr0
/* Clear prefetch queue & correct CS */
ljmp $PMODE_CS, $inpmode
.code32
inpmode:
/* Setup segment selectors */
movw $PMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
movl stack32,%esp
/* Put the return address back onto the stack */
pushl (code32ret)
/* Now return in p-mode! */
ret
/*
* Switches the processor back to real mode
* it destroys eax
*/
EXTERN(switch_to_real)
.code32
/* We don't know what values are currently */
/* in the segment registers. So we are */
/* going to reload them with sane values. */
/* Of course CS has to already be valid. */
/* We are currently in protected-mode so we */
/* need protected-mode segment values. */
movw $PMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Get the return address off the stack */
popl (code16ret)
/* Save 32-bit stack pointer */
movl %esp,stack32
/* jmp to 16-bit segment to set the limit correctly */
ljmp $RMODE_CS, $switch_to_real16
switch_to_real16:
.code16
/* Restore segment registers to correct limit */
movw $RMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Disable Protected Mode */
mov %cr0,%eax
andl $CR0_PE_CLR,%eax
mov %eax,%cr0
/* Clear prefetch queue & correct CS */
ljmp $0, $inrmode
inrmode:
movw %cs,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Clear out the high 16-bits of ESP */
/* This is needed because I have one */
/* machine that hangs when booted to dos if */
/* anything other than 0x0000 is in the high */
/* 16-bits of ESP. Even though real-mode */
/* code should only use SP and not ESP. */
xorl %esp,%esp
movw stack16,%sp
/* Put the return address back onto the stack */
pushw (code16ret)
/* Load IDTR with real mode value */
lidt rmode_idtptr
sti /* These are ok now */
/* Now return in r-mode! */
ret
/*
* Needed for enabling the a20 address line
*/
.code16
empty_8042:
.word 0x00eb,0x00eb // jmp $+2, jmp $+2
inb $0x64,%al
testb $0x02,%al
jnz empty_8042
ret
/*
* Enable the A20 address line (to allow access to over 1mb)
*/
EXTERN(_EnableA20)
.code32
pushal
call switch_to_real
.code16
call empty_8042
movb $0xD1,%al // command write
outb %al,$0x64
call empty_8042
mov $0xDF,%al // A20 on
out %al,$0x60
call empty_8042
call switch_to_prot
.code32
popal
ret
/*
* Disable the A20 address line
*/
EXTERN(_DisableA20)
.code32
pushal
call switch_to_real
.code16
call empty_8042
movb $0xD1,%al // command write
outb %al,$0x64
call empty_8042
mov $0xDD,%al // A20 off
out %al,$0x60
call empty_8042
call switch_to_prot
.code32
popal
ret
/* 16-bit stack pointer */
stack16:
.word STACK16ADDR
/* 32-bit stack pointer */
stack32:
.long STACK32ADDR
/* 16-bit return address */
code16ret:
.long 0
/* 32-bit return address */
code32ret:
.long 0
.p2align 2 /* force 4-byte alignment */
gdt:
/* NULL Descriptor */
.word 0x0000
.word 0x0000
.word 0x0000
.word 0x0000
/* 32-bit flat CS */
.word 0xFFFF
.word 0x0000
.word 0x9A00
.word 0x00CF
/* 32-bit flat DS */
.word 0xFFFF
.word 0x0000
.word 0x9200
.word 0x00CF
/* 16-bit real mode CS */
.word 0xFFFF
.word 0x0000
.word 0x9E00
.word 0x0000
/* 16-bit real mode DS */
.word 0xFFFF
.word 0x0000
.word 0x9200
.word 0x0000
/* GDT table pointer */
gdtptr:
.word 0x27 /* Limit */
.long gdt /* Base Address */
/* Real-mode IDT pointer */
rmode_idtptr:
.word 0x3ff /* Limit */
.long 0 /* Base Address */
EXTERN(_BootDrive)
.long 0
EXTERN(_BootPartition)
.long 0

View File

@@ -1,62 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(_ChainLoadBiosBootSectorCode)
.code32
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x0000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x7C00,%sp
ljmpl $0x0000,$0x7C00
EXTERN(_SoftReboot)
.code32
call switch_to_real
.code16
movw $0x40,%ax
movw %ax,%ds
movw $0x72,%si
// Set the word at location 40:72 to 1234h
movw $0x1234,(%si)
// and jump to location FFFF:0 in ROM
ljmpl $0xFFFF,$0x0000

View File

@@ -1,132 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(_DriveMapInt13HandlerStart)
Int13Handler:
pushw %bp
movw %sp,%bp
pushw %ax
pushw %cx
pushw %si
cld
/* Get callers flags from stack */
movw 0x06(%bp),%ax
movw %ax,%cs:(CallersFlags - Int13Handler)
/* Save the drive number they passed in */
movb %dl,%cs:(PassedInDriveNumber - Int13Handler)
/* Now we need to perform the mapping */
xorw %cx,%cx
movw $(Int13HandlerMapCount - Int13Handler),%si
/* Get the count of drives in the map list */
movb %cs:(%si),%cl
incw %si
/* If the map list is empty then just call the old int 13h handler */
cmpb $0,%cl
jz CallOldInt13Handler
GetMappedDriveNumberLoop:
/* Get the next drive number in the list */
lodsw %cs:(%si),%ax
/* Check to see if it's the one they are calling int 13h for */
cmpb %al,%dl
/* If not get the next one */
jne GetMappedDriveNumberLoopNext
/* If we get here then we have found a mapped drive */
/* Send new drive number on to the old int 13h handler */
movb %ah,%dl
/* Call BIOS Int 13 Handler */
jmp CallOldInt13Handler
GetMappedDriveNumberLoopNext:
loop GetMappedDriveNumberLoop
CallOldInt13Handler:
/* Restore the registers we changed off the stack */
popw %si
popw %cx
popw %ax
/* Put flags onto stack */
pushw %cs:(CallersFlags - Int13Handler)
/* Call old int 13h handler with new drive number */
.byte 0x9a /* lcall */
EXTERN(_DriveMapOldInt13HandlerAddress)
.word 0
.word 0
/* Update the callers flags with the values the BIOS returned */
pushw %ax
pushf
popw %ax
movw %ax,0x06(%bp)
popw %ax
/* Restore the callers drive number */
movb %cs:(PassedInDriveNumber - Int13Handler),%dl
popw %bp
iret
CallersFlags:
.word 0
PassedInDriveNumber:
.byte 0
EXTERN(_DriveMapInt13HandlerMapList)
Int13HandlerMapCount:
.byte 0
Int13HandlerDrive1:
.byte 0
Int13HandlerDriveNew1:
.byte 0
Int13HandlerDrive2:
.byte 0
Int13HandlerDriveNew2:
.byte 0
Int13HandlerDrive3:
.byte 0
Int13HandlerDriveNew3:
.byte 0
Int13HandlerDrive4:
.byte 0
Int13HandlerDriveNew4:
.byte 0
EXTERN(_DriveMapInt13HandlerEnd)

View File

@@ -1,233 +0,0 @@
; FATHELP.ASM
; FAT12/16 Boot Sector Helper Code
; Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer
;org 8000h
segment .text
bits 16
BootSectorStackTop equ 0x7bf2
DataAreaStartHigh equ 0x2
DataAreaStartLow equ 0x4
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow equ 0x8
BiosCHSDriveSize equ 0x8
ReadSectorsOffset equ 0xa
ReadClusterOffset equ 0xc
PutCharsOffset equ 0xe
OEMName equ 3
BytesPerSector equ 11
SectsPerCluster equ 13
ReservedSectors equ 14
NumberOfFats equ 16
MaxRootEntries equ 17
TotalSectors equ 19
MediaDescriptor equ 21
SectorsPerFat equ 22
SectorsPerTrack equ 24
NumberOfHeads equ 26
HiddenSectors equ 28
TotalSectorsBig equ 32
BootDrive equ 36
Reserved equ 37
ExtendSig equ 38
SerialNumber equ 39
VolumeLabel equ 43
FileSystem equ 54
BootPartition equ 0x7dfd
; This code will be stored in the first 512 bytes
; of freeldr.sys. The first 3 bytes will be a jmp
; instruction to skip past the FAT helper code
; that is stored in the rest of the 512 bytes.
;
; This code is loaded at 0000:8000 so we have to
; encode a jmp instruction to jump to 0000:8200
global _mainCRTStartup ; For Mingw32 builds where the linker looks for this symbol
_mainCRTStartup:
global start
start:
db 0xe9
db 0xfd
db 0x01
; Now starts the extra boot code that we will store
; in the first 512 bytes of freeldr.sys. This code
; allows the FAT12/16 bootsector to navigate the
; FAT table so that we can still load freeldr.sys
; even if it is fragmented.
FatHelperEntryPoint:
push ax ; First save AX - the start cluster of freeldr.sys
; Display "Loading FreeLoader..." message
mov esi,msgLoading ; Loading message
call [bp-PutCharsOffset] ; Display it
call ReadFatIntoMemory
pop ax ; Restore AX (start cluster)
; AX has start cluster of freeldr.sys
mov bx,800h
mov es,bx
LoadFile:
push ax
call IsFat12
pop ax
jnc LoadFile2
cmp ax,0ff8h ; Check to see if this is the last cluster in the chain
jmp LoadFile3
LoadFile2:
cmp ax,0fff8h
LoadFile3:
jae LoadFile_Done ; If so continue, if not then read then next one
push ax
xor bx,bx ; Load ROSLDR starting at 0000:8000h
push es
call [bp-ReadClusterOffset]
pop es
xor bx,bx
mov bl,BYTE [BYTE bp+SectsPerCluster]
shl bx,5 ; BX = BX * 512 / 16
mov ax,es ; Increment the load address by
add ax,bx ; The size of a cluster
mov es,ax
call IsFat12
pop ax
push es
jnc LoadFile4
call GetFatEntry12 ; Get the next entry
jmp LoadFile5
LoadFile4:
call GetFatEntry16
LoadFile5:
pop es
jmp LoadFile ; Load the next cluster (if any)
LoadFile_Done:
mov dl,BYTE [BYTE bp+BootDrive] ; Load the boot drive into DL
mov dh,[BootPartition] ; Load the boot partition into DH
push WORD 0x0000
push WORD 0x8000 ; We will do a far return to 0000:8000h
retf ; Transfer control to ROSLDR
; Reads the entire FAT into memory at 7000:0000
ReadFatIntoMemory:
mov ax,WORD [BYTE bp+HiddenSectors]
mov dx,WORD [BYTE bp+HiddenSectors+2]
add ax,WORD [BYTE bp+ReservedSectors]
adc dx,byte 0
mov cx,WORD [BYTE bp+SectorsPerFat]
mov bx,7000h
mov es,bx
xor bx,bx
call [bp-ReadSectorsOffset]
ret
; Returns the FAT entry for a given cluster number for 16-bit FAT
; On entry AX has cluster number
; On return AX has FAT entry for that cluster
GetFatEntry16:
mov cx,2 ; AX = AX * 2 (since FAT16 entries are 2 bytes)
mul cx
shl dx,12
mov bx,7000h
add bx,dx
mov es,bx
mov bx,ax ; Restore FAT entry offset
mov ax,WORD [es:bx] ; Get FAT entry
ret
; Returns the FAT entry for a given cluster number for 12-bit FAT
; On entry AX has cluster number
; On return AX has FAT entry for that cluster
GetFatEntry12:
push ax
mov cx,ax
shr ax,1
add ax,cx ; AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits)
mov bx,7000h
mov es,bx
mov bx,ax ; Put FAT entry offset into BX
mov ax,WORD [es:bx] ; Get FAT entry
pop cx ; Get cluster number from stack
and cx,1
jz UseLow12Bits
and ax,0fff0h
shr ax,4
jmp GetFatEntry12_Done
UseLow12Bits:
and ax,0fffh
GetFatEntry12_Done:
ret
; Returns CF = 1 if this is a FAT12 file system
; Otherwise CF = 0 for FAT16
IsFat12:
mov ebx,DWORD [BYTE bp-DataAreaStartLow]
; EBX now has the number of the starting sector of the data area
; starting from the beginning of the disk, so subtrace hidden sectors
sub ebx,DWORD [BYTE bp+HiddenSectors]
xor eax,eax
mov ax,WORD [BYTE bp+TotalSectors]
cmp ax,byte 0
jnz IsFat12_2
mov eax,DWORD [BYTE bp+TotalSectorsBig]
; EAX now contains the number of sectors on the volume
IsFat12_2:
sub eax,ebx ; Subtract data area start sector
xor edx,edx ; from total sectors of volume
; EDX:EAX now contains the number of data sectors on the volume
movzx ebx,BYTE [BYTE bp+SectsPerCluster]
div ebx
; EAX now has the number of clusters on the volume
stc
cmp eax,4085
jb IsFat12_Done
clc
IsFat12_Done:
ret
msgLoading db 'Loading FreeLoader...',0dh,0ah,0
times 510-($-$$) db 0 ; Pad to 510 bytes
dw 0aa55h ; BootSector signature

View File

@@ -1,780 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2003 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <rtl.h>
#include <debug.h>
#include <disk.h>
#include <mm.h>
#include <portio.h>
#include "../../reactos/registry.h"
#include "hardware.h"
#define MILLISEC (10)
#define PRECISION (8)
#define HZ (100)
#define CLOCK_TICK_RATE (1193182)
#define LATCH (CLOCK_TICK_RATE / HZ)
typedef struct _CM_INT13_DRIVE_PARAMETER
{
U16 DriveSelect;
U32 MaxCylinders;
U16 SectorsPerTrack;
U16 MaxHeads;
U16 NumberDrives;
} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
{
U32 BytesPerSector;
U32 NumberOfCylinders;
U32 SectorsPerTrack;
U32 NumberOfHeads;
} CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA;
typedef struct _CM_PNP_BIOS_DEVICE_NODE
{
U16 Size;
U8 Node;
U32 ProductId;
U8 DeviceType[3];
U16 DeviceAttributes;
} __attribute__((packed)) CM_PNP_BIOS_DEVICE_NODE, *PCM_PNP_BIOS_DEVICE_NODE;
typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK
{
U8 Signature[4];
U8 Revision;
U8 Length;
U16 ControlField;
U8 Checksum;
U32 EventFlagAddress;
U16 RealModeEntryOffset;
U16 RealModeEntrySegment;
U16 ProtectedModeEntryOffset;
U32 ProtectedModeCodeBaseAddress;
U32 OemDeviceId;
U16 RealModeDataBaseAddress;
U32 ProtectedModeDataBaseAddress;
} __attribute__((packed)) CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK;
static char Hex[] = "0123456789ABCDEF";
static unsigned int delay_count = 1;
/* FUNCTIONS ****************************************************************/
static VOID
__KeStallExecutionProcessor(U32 Loops)
{
register unsigned int i;
for (i = 0; i < Loops; i++);
}
VOID KeStallExecutionProcessor(U32 Microseconds)
{
__KeStallExecutionProcessor((delay_count * Microseconds) / 1000);
}
static U32
Read8254Timer(VOID)
{
U32 Count;
WRITE_PORT_UCHAR((PU8)0x43, 0x00);
Count = READ_PORT_UCHAR((PU8)0x40);
Count |= READ_PORT_UCHAR((PU8)0x40) << 8;
return Count;
}
static VOID
WaitFor8254Wraparound(VOID)
{
U32 CurCount;
U32 PrevCount = ~0;
S32 Delta;
CurCount = Read8254Timer();
do
{
PrevCount = CurCount;
CurCount = Read8254Timer();
Delta = CurCount - PrevCount;
/*
* This limit for delta seems arbitrary, but it isn't, it's
* slightly above the level of error a buggy Mercury/Neptune
* chipset timer can cause.
*/
}
while (Delta < 300);
}
VOID
HalpCalibrateStallExecution(VOID)
{
U32 i;
U32 calib_bit;
U32 CurCount;
/* Initialise timer interrupt with MILLISECOND ms interval */
WRITE_PORT_UCHAR((PU8)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */
WRITE_PORT_UCHAR((PU8)0x40, LATCH & 0xff); /* LSB */
WRITE_PORT_UCHAR((PU8)0x40, LATCH >> 8); /* MSB */
/* Stage 1: Coarse calibration */
WaitFor8254Wraparound();
delay_count = 1;
do {
delay_count <<= 1; /* Next delay count to try */
WaitFor8254Wraparound();
__KeStallExecutionProcessor(delay_count); /* Do the delay */
CurCount = Read8254Timer();
} while (CurCount > LATCH / 2);
delay_count >>= 1; /* Get bottom value for delay */
/* Stage 2: Fine calibration */
calib_bit = delay_count; /* Which bit are we going to test */
for(i=0;i<PRECISION;i++) {
calib_bit >>= 1; /* Next bit to calibrate */
if(!calib_bit) break; /* If we have done all bits, stop */
delay_count |= calib_bit; /* Set the bit in delay_count */
WaitFor8254Wraparound();
__KeStallExecutionProcessor(delay_count); /* Do the delay */
CurCount = Read8254Timer();
if (CurCount <= LATCH / 2) /* If a tick has passed, turn the */
delay_count &= ~calib_bit; /* calibrated bit back off */
}
/* We're finished: Do the finishing touches */
delay_count /= (MILLISEC / 2); /* Calculate delay_count for 1ms */
}
VOID
SetComponentInformation(HKEY ComponentKey,
U32 Flags,
U32 Key,
U32 Affinity)
{
CM_COMPONENT_INFORMATION CompInfo;
S32 Error;
CompInfo.Flags = Flags;
CompInfo.Version = 0;
CompInfo.Key = Key;
CompInfo.Affinity = Affinity;
/* Set 'Component Information' value */
Error = RegSetValue(ComponentKey,
"Component Information",
REG_BINARY,
(PU8)&CompInfo,
sizeof(CM_COMPONENT_INFORMATION));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
}
static VOID
DetectPnpBios(HKEY SystemKey, U32 *BusNumber)
{
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
PCM_PNP_BIOS_DEVICE_NODE DeviceNode;
PCM_PNP_BIOS_INSTALLATION_CHECK InstData;
char Buffer[80];
HKEY BusKey;
U32 x;
U32 NodeSize = 0;
U32 NodeCount = 0;
U8 NodeNumber;
U32 FoundNodeCount;
int i;
U32 PnpBufferSize;
U32 Size;
char *Ptr;
S32 Error;
InstData = (PCM_PNP_BIOS_INSTALLATION_CHECK)PnpBiosSupported();
if (InstData == NULL || strncmp(InstData->Signature, "$PnP", 4))
{
DbgPrint((DPRINT_HWDETECT, "PnP-BIOS not supported\n"));
return;
}
DbgPrint((DPRINT_HWDETECT, "Signature '%c%c%c%c'\n",
InstData->Signature[0], InstData->Signature[1],
InstData->Signature[2], InstData->Signature[3]));
x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount);
if (x != 0 || NodeSize == 0 || NodeCount == 0)
{
DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n"));
return;
}
DbgPrint((DPRINT_HWDETECT, "PnP-BIOS supported\n"));
DbgPrint((DPRINT_HWDETECT, "MaxNodeSize %u NodeCount %u\n", NodeSize, NodeCount));
DbgPrint((DPRINT_HWDETECT, "Estimated buffer size %u\n", NodeSize * NodeCount));
/* Create new bus key */
sprintf(Buffer,
"MultifunctionAdapter\\%u", *BusNumber);
Error = RegCreateKey(SystemKey,
Buffer,
&BusKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Increment bus number */
(*BusNumber)++;
/* Set 'Identifier' value */
Error = RegSetValue(BusKey,
"Identifier",
REG_SZ,
(PU8)"PNP BIOS",
9);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
return;
}
/* Set 'Configuration Data' value */
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) + (NodeSize * NodeCount);
FullResourceDescriptor = MmAllocateMemory(Size);
if (FullResourceDescriptor == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to allocate resource descriptor\n"));
return;
}
memset(FullResourceDescriptor, 0, Size);
/* Initialize resource descriptor */
FullResourceDescriptor->InterfaceType = Internal;
FullResourceDescriptor->BusNumber = 0;
FullResourceDescriptor->PartialResourceList.Count = 1;
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type =
CmResourceTypeDeviceSpecific;
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition =
CmResourceShareUndetermined;
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Flags =
Ptr = (char *)(((PVOID)&FullResourceDescriptor->PartialResourceList.PartialDescriptors[0]) +
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
/* Set instalation check data */
memcpy (Ptr, InstData, sizeof(CM_PNP_BIOS_INSTALLATION_CHECK));
Ptr += sizeof(CM_PNP_BIOS_INSTALLATION_CHECK);
/* Copy device nodes */
FoundNodeCount = 0;
PnpBufferSize = sizeof(CM_PNP_BIOS_INSTALLATION_CHECK);
for (i = 0; i < 0xFF; i++)
{
NodeNumber = (U8)i;
x = PnpBiosGetDeviceNode(&NodeNumber, (PVOID)DISKREADBUFFER);
if (x == 0)
{
DeviceNode = (PCM_PNP_BIOS_DEVICE_NODE)DISKREADBUFFER;
DbgPrint((DPRINT_HWDETECT,
"Node: %u Size %u (0x%x)\n",
DeviceNode->Node,
DeviceNode->Size,
DeviceNode->Size));
// printf("Node: %u Size %u (0x%x)\n",
// DeviceNode->Node,
// DeviceNode->Size,
// DeviceNode->Size);
memcpy (Ptr,
DeviceNode,
DeviceNode->Size);
Ptr += DeviceNode->Size;
PnpBufferSize += DeviceNode->Size;
FoundNodeCount++;
if (FoundNodeCount >= NodeCount)
break;
}
}
/* Set real data size */
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.DeviceSpecificData.DataSize =
PnpBufferSize;
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) + PnpBufferSize;
DbgPrint((DPRINT_HWDETECT, "Real buffer size: %u\n", PnpBufferSize));
DbgPrint((DPRINT_HWDETECT, "Resource size: %u\n", Size));
/* Set 'Configuration Data' value */
Error = RegSetValue(BusKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PU8) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT,
"RegSetValue(Configuration Data) failed (Error %u)\n",
(int)Error));
}
}
static VOID
SetHarddiskConfigurationData(HKEY DiskKey,
U32 DriveNumber)
{
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry;
EXTENDED_GEOMETRY ExtGeometry;
GEOMETRY Geometry;
U32 Size;
S32 Error;
/* Set 'Configuration Data' value */
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
sizeof(CM_DISK_GEOMETRY_DEVICE_DATA);
FullResourceDescriptor = MmAllocateMemory(Size);
if (FullResourceDescriptor == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to allocate a full resource descriptor\n"));
return;
}
memset(FullResourceDescriptor, 0, Size);
FullResourceDescriptor->InterfaceType = InterfaceTypeUndefined;
FullResourceDescriptor->BusNumber = 0;
FullResourceDescriptor->PartialResourceList.Count = 1;
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type =
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition =
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Flags =
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.DeviceSpecificData.DataSize =
sizeof(CM_DISK_GEOMETRY_DEVICE_DATA);
/* Get pointer to geometry data */
DiskGeometry = ((PVOID)FullResourceDescriptor) + sizeof(CM_FULL_RESOURCE_DESCRIPTOR);
/* Get the disk geometry */
ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY);
if (DiskGetExtendedDriveParameters(DriveNumber, &ExtGeometry, ExtGeometry.Size))
{
DiskGeometry->BytesPerSector = ExtGeometry.BytesPerSector;
DiskGeometry->NumberOfCylinders = ExtGeometry.Cylinders;
DiskGeometry->SectorsPerTrack = ExtGeometry.SectorsPerTrack;
DiskGeometry->NumberOfHeads = ExtGeometry.Heads;
}
else if(DiskGetDriveParameters(DriveNumber, &Geometry))
{
DiskGeometry->BytesPerSector = Geometry.BytesPerSector;
DiskGeometry->NumberOfCylinders = Geometry.Cylinders;
DiskGeometry->SectorsPerTrack = Geometry.Sectors;
DiskGeometry->NumberOfHeads = Geometry.Heads;
}
else
{
DbgPrint((DPRINT_HWDETECT, "Reading disk geometry failed\n"));
MmFreeMemory(FullResourceDescriptor);
return;
}
DbgPrint((DPRINT_HWDETECT,
"Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
DriveNumber,
DiskGeometry->NumberOfCylinders,
DiskGeometry->NumberOfHeads,
DiskGeometry->SectorsPerTrack,
DiskGeometry->BytesPerSector));
Error = RegSetValue(DiskKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PU8) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT,
"RegSetValue(Configuration Data) failed (Error %u)\n",
(int)Error));
}
}
static VOID
SetHarddiskIdentifier(HKEY DiskKey,
U32 DriveNumber)
{
PMASTER_BOOT_RECORD Mbr;
U32 *Buffer;
U32 i;
U32 Checksum;
U32 Signature;
char Identifier[20];
S32 Error;
/* Read the MBR */
if (!DiskReadLogicalSectors(DriveNumber, 0ULL, 1, (PVOID)DISKREADBUFFER))
{
DbgPrint((DPRINT_HWDETECT, "Reading MBR failed\n"));
return;
}
Buffer = (U32*)DISKREADBUFFER;
Mbr = (PMASTER_BOOT_RECORD)DISKREADBUFFER;
Signature = Mbr->Signature;
DbgPrint((DPRINT_HWDETECT, "Signature: %x\n", Signature));
/* Calculate the MBR checksum */
Checksum = 0;
for (i = 0; i < 128; i++)
{
Checksum += Buffer[i];
}
Checksum = ~Checksum + 1;
DbgPrint((DPRINT_HWDETECT, "Checksum: %x\n", Checksum));
/* Convert checksum and signature to identifier string */
Identifier[0] = Hex[(Checksum >> 28) & 0x0F];
Identifier[1] = Hex[(Checksum >> 24) & 0x0F];
Identifier[2] = Hex[(Checksum >> 20) & 0x0F];
Identifier[3] = Hex[(Checksum >> 16) & 0x0F];
Identifier[4] = Hex[(Checksum >> 12) & 0x0F];
Identifier[5] = Hex[(Checksum >> 8) & 0x0F];
Identifier[6] = Hex[(Checksum >> 4) & 0x0F];
Identifier[7] = Hex[Checksum & 0x0F];
Identifier[8] = '-';
Identifier[9] = Hex[(Signature >> 28) & 0x0F];
Identifier[10] = Hex[(Signature >> 24) & 0x0F];
Identifier[11] = Hex[(Signature >> 20) & 0x0F];
Identifier[12] = Hex[(Signature >> 16) & 0x0F];
Identifier[13] = Hex[(Signature >> 12) & 0x0F];
Identifier[14] = Hex[(Signature >> 8) & 0x0F];
Identifier[15] = Hex[(Signature >> 4) & 0x0F];
Identifier[16] = Hex[Signature & 0x0F];
Identifier[17] = '-';
Identifier[18] = 'A';
Identifier[19] = 0;
DbgPrint((DPRINT_HWDETECT, "Identifier: %xsn", Identifier));
/* Set identifier */
Error = RegSetValue(DiskKey,
"Identifier",
REG_SZ,
(PU8) Identifier,
20);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT,
"RegSetValue(Identifier) failed (Error %u)\n",
(int)Error));
}
}
static VOID
DetectBiosDisks(HKEY SystemKey,
HKEY BusKey)
{
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
PCM_INT13_DRIVE_PARAMETER Int13Drives;
GEOMETRY Geometry;
char Buffer[80];
HKEY DiskKey;
U32 DiskCount;
U32 Size;
U32 i;
S32 Error;
/* Count the number of visible drives */
DiskReportError(FALSE);
DiskCount = 0;
while (DiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER))
{
DiskCount++;
}
DiskReportError(TRUE);
DbgPrint((DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n",
(int)DiskCount, (DiskCount == 1) ? "": "s"));
/* Allocate resource descriptor */
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
FullResourceDescriptor = MmAllocateMemory(Size);
if (FullResourceDescriptor == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to allocate resource descriptor\n"));
return;
}
/* Initialize resource descriptor */
memset(FullResourceDescriptor, 0, Size);
FullResourceDescriptor->InterfaceType = InterfaceTypeUndefined;
FullResourceDescriptor->BusNumber = -1;
FullResourceDescriptor->PartialResourceList.Count = 1;
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type =
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition =
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Flags =
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.DeviceSpecificData.DataSize =
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
/* Get harddisk Int13 geometry data */
Int13Drives = ((PVOID)FullResourceDescriptor) + sizeof(CM_FULL_RESOURCE_DESCRIPTOR);
for (i = 0; i < DiskCount; i++)
{
if (DiskGetDriveParameters(0x80 + i, &Geometry))
{
Int13Drives[i].DriveSelect = 0x80 + i;
Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
Int13Drives[i].MaxHeads = Geometry.Heads - 1;
Int13Drives[i].NumberDrives = DiskCount;
DbgPrint((DPRINT_HWDETECT,
"Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
0x80 + i,
Geometry.Cylinders - 1,
Geometry.Heads -1,
Geometry.Sectors,
Geometry.BytesPerSector));
}
}
/* Set 'Configuration Data' value */
Error = RegSetValue(SystemKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PU8) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT,
"RegSetValue(Configuration Data) failed (Error %u)\n",
(int)Error));
return;
}
/* Create and fill subkey for each harddisk */
for (i = 0; i < DiskCount; i++)
{
/* Create disk key */
sprintf (Buffer,
"DiskController\\0\\DiskPeripheral\\%u",
i);
Error = RegCreateKey(BusKey,
Buffer,
&DiskKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "Failed to create drive key\n"));
continue;
}
DbgPrint((DPRINT_HWDETECT, "Created key: %s\n", Buffer));
/* Set disk values */
SetHarddiskConfigurationData(DiskKey, 0x80 + i);
SetHarddiskIdentifier(DiskKey, 0x80 + i);
}
}
static VOID
DetectIsaBios(HKEY SystemKey, U32 *BusNumber)
{
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
char Buffer[80];
HKEY BusKey;
U32 Size;
S32 Error;
/* Create new bus key */
sprintf(Buffer,
"MultifunctionAdapter\\%u", *BusNumber);
Error = RegCreateKey(SystemKey,
Buffer,
&BusKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Increment bus number */
(*BusNumber)++;
/* Set 'Identifier' value */
Error = RegSetValue(BusKey,
"Identifier",
REG_SZ,
(PU8)"ISA",
4);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
return;
}
/* Set 'Configuration Data' value */
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) -
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
FullResourceDescriptor = MmAllocateMemory(Size);
if (FullResourceDescriptor == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to allocate resource descriptor\n"));
return;
}
/* Initialize resource descriptor */
memset(FullResourceDescriptor, 0, Size);
FullResourceDescriptor->InterfaceType = Isa;
FullResourceDescriptor->BusNumber = 0;
FullResourceDescriptor->PartialResourceList.Count = 0;
/* Set 'Configuration Data' value */
Error = RegSetValue(SystemKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PU8) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT,
"RegSetValue(Configuration Data) failed (Error %u)\n",
(int)Error));
return;
}
/* Detect ISA/BIOS devices */
DetectBiosDisks(SystemKey, BusKey);
#if 0
DetectBiosFloppyDisks(SystemKey, BusKey);
DetectBiosSerialPorts();
DetectBiosParallelPorts();
DetectBiosKeyboard();
DetectBiosMouse();
#endif
/* FIXME: Detect more ISA devices */
}
VOID
DetectHardware(VOID)
{
HKEY SystemKey;
U32 BusNumber = 0;
S32 Error;
DbgPrint((DPRINT_HWDETECT, "DetectHardware()\n"));
HalpCalibrateStallExecution ();
/* Create the 'System' key */
Error = RegCreateKey(NULL,
"\\Registry\\Machine\\HARDWARE\\DESCRIPTION\\System",
&SystemKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
#if 0
DetectSystemData();
#endif
DetectCPUs(SystemKey);
/* Detect buses */
#if 0
DetectPciBios(&BusNumber);
DetectApmBios(&BusNumber);
#endif
DetectPnpBios(SystemKey, &BusNumber);
DetectIsaBios(SystemKey, &BusNumber);
#if 0
DetectAcpiBios(&BusNumber);
#endif
DbgPrint((DPRINT_HWDETECT, "DetectHardware() Done\n"));
#if 0
printf("*** System stopped ***\n");
for (;;);
#endif
}
/* EOF */

View File

@@ -1,172 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2003 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __I386_HARDWARE_H_
#define __I386_HARDWARE_H_
typedef enum
{
InterfaceTypeUndefined = -1,
Internal,
Isa,
Eisa,
MicroChannel,
TurboChannel,
PCIBus,
VMEBus,
NuBus,
PCMCIABus,
CBus,
MPIBus,
MPSABus,
ProcessorInternal,
InternalPowerBus,
PNPISABus,
MaximumInterfaceType
} INTERFACE_TYPE, *PINTERFACE_TYPE;
typedef enum _CM_RESOURCE_TYPE
{
CmResourceTypeNull = 0,
CmResourceTypePort,
CmResourceTypeInterrupt,
CmResourceTypeMemory,
CmResourceTypeDma,
CmResourceTypeDeviceSpecific,
CmResourceTypeMaximum
} CM_RESOURCE_TYPE;
typedef enum _CM_SHARE_DISPOSITION
{
CmResourceShareUndetermined = 0,
CmResourceShareDeviceExclusive,
CmResourceShareDriverExclusive,
CmResourceShareShared
} CM_SHARE_DISPOSITION;
typedef U64 PHYSICAL_ADDRESS;
typedef struct
{
U8 Type;
U8 ShareDisposition;
U16 Flags;
union
{
struct
{
PHYSICAL_ADDRESS Start;
U32 Length;
} __attribute__((packed)) Port;
struct
{
U32 Level;
U32 Vector;
U32 Affinity;
} __attribute__((packed)) Interrupt;
struct
{
PHYSICAL_ADDRESS Start;
U32 Length;
} __attribute__((packed)) Memory;
struct
{
U32 Channel;
U32 Port;
U32 Reserved1;
} __attribute__((packed)) Dma;
struct
{
U32 DataSize;
U32 Reserved1;
U32 Reserved2;
} __attribute__((packed)) DeviceSpecificData;
} __attribute__((packed)) u;
} __attribute__((packed)) CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
typedef struct
{
U16 Version;
U16 Revision;
U32 Count;
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
} __attribute__((packed))CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
typedef struct
{
INTERFACE_TYPE InterfaceType;
U32 BusNumber;
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
} __attribute__((packed)) CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
typedef struct _CM_COMPONENT_INFORMATION
{
U32 Flags;
U32 Version;
U32 Key;
U32 Affinity;
} __attribute__((packed)) CM_COMPONENT_INFORMATION, *PCM_COMPONENT_INFORMATION;
/* CM_COMPONENT_INFORMATION.Flags */
#define Failed 0x00000001
#define ReadOnly 0x00000002
#define Removable 0x00000004
#define ConsoleIn 0x00000008
#define ConsoleOut 0x00000010
#define Input 0x00000020
#define Output 0x00000040
/* PROTOTYPES ***************************************************************/
/* hardware.c */
VOID SetComponentInformation(HKEY ComponentKey,
U32 Flags,
U32 Key,
U32 Affinity);
/* hwcpu.c */
VOID DetectCPUs(HKEY SystemKey);
/* i386cpu.S */
U32 CpuidSupported(VOID);
VOID GetCpuid(U32 Level,
U32 *eax,
U32 *ebx,
U32 *ecx,
U32 *edx);
/* i386pnp.S */
U32 PnpBiosSupported(VOID);
U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize,
U32 *NodeCount);
U32 PnpBiosGetDeviceNode(U8 *NodeId,
U8 *NodeBuffer);
#endif /* __I386_HARDWARE_H_ */
/* EOF */

View File

@@ -1,571 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2003 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <rtl.h>
#include <debug.h>
#include <mm.h>
#include <portio.h>
#include "../../reactos/registry.h"
#include "hardware.h"
#define MP_FP_SIGNATURE 0x5F504D5F /* "_MP_" */
#define MP_CT_SIGNATURE 0x504D4350 /* "_MP_" */
typedef struct _MP_FLOATING_POINT_TABLE
{
U32 Signature; /* "_MP_" */
U32 PhysicalAddressPointer;
U8 Length;
U8 SpecRev;
U8 Checksum;
U8 FeatureByte[5];
} PACKED MP_FLOATING_POINT_TABLE, *PMP_FLOATING_POINT_TABLE;
typedef struct _MPS_CONFIG_TABLE_HEADER
{
U32 Signature; /* "PCMP" */
U16 BaseTableLength;
U8 SpecRev;
U8 Checksum;
U8 OemIdString[8];
U8 ProductIdString[12];
U32 OemTablePointer;
U16 OemTableLength;
U16 EntryCount;
U32 AddressOfLocalAPIC;
U16 ExtendedTableLength;
U8 ExtendedTableChecksum;
U8 Reserved;
} PACKED MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE;
typedef struct _MP_PROCESSOR_ENTRY
{
U8 EntryType;
U8 LocalApicId;
U8 LocalApicVersion;
U8 CpuFlags;
U32 CpuSignature;
U32 FeatureFlags;
U32 Reserved1;
U32 Reserved2;
} PACKED MP_PROCESSOR_ENTRY, *PMP_PROCESSOR_ENTRY;
/* FUNCTIONS ****************************************************************/
static VOID
DetectCPU(HKEY CpuKey,
HKEY FpuKey)
{
char VendorIdentifier[13];
char Identifier[64];
U32 FeatureSet;
HKEY CpuInstKey;
HKEY FpuInstKey;
U32 eax = 0;
U32 ebx = 0;
U32 ecx = 0;
U32 edx = 0;
U32 *Ptr;
S32 Error;
/* Create the CPU instance key */
Error = RegCreateKey(CpuKey,
"0",
&CpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the FPU instance key */
Error = RegCreateKey(FpuKey,
"0",
&FpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
eax = CpuidSupported();
if (eax & 1)
{
DbgPrint((DPRINT_HWDETECT, "CPUID supported\n"));
/* Get vendor identifier */
GetCpuid(0, &eax, &ebx, &ecx, &edx);
VendorIdentifier[12] = 0;
Ptr = (U32*)&VendorIdentifier[0];
*Ptr = ebx;
Ptr++;
*Ptr = edx;
Ptr++;
*Ptr = ecx;
/* Get Identifier */
GetCpuid(1, &eax, &ebx, &ecx, &edx);
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(unsigned int)((eax >> 8) & 0x0F),
(unsigned int)((eax >> 4) & 0x0F),
(unsigned int)(eax & 0x0F));
FeatureSet = edx;
}
else
{
DbgPrint((DPRINT_HWDETECT, "CPUID not supported\n"));
strcpy(VendorIdentifier, "Unknown");
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(unsigned int)((eax >> 8) & 0x0F),
(unsigned int)((eax >> 4) & 0x0F),
(unsigned int)(eax & 0x0F));
FeatureSet = 0;
}
/* Set 'Conmponent Information' value (CPU and FPU) */
SetComponentInformation(CpuInstKey, 0, 0, 1);
SetComponentInformation(FpuInstKey, 0, 0, 1);
/* Set 'FeatureSet' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "FeatureSet: %x\n", FeatureSet));
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PU8)&FeatureSet,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'Identifier' value (CPU and FPU) */
DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier));
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'VendorIdentifier' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "Vendor Identifier: %s\n", VendorIdentifier));
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PU8)VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* FIXME: Set 'Update Signature' value (CPU only) */
/* FIXME: Set 'Update Status' value (CPU only) */
/* FIXME: Set '~MHz' value (CPU only) */
}
static VOID
SetMpsProcessor(HKEY CpuKey,
HKEY FpuKey,
PMP_PROCESSOR_ENTRY CpuEntry)
{
char VendorIdentifier[13];
char Identifier[64];
char Buffer[8];
U32 FeatureSet;
HKEY CpuInstKey;
HKEY FpuInstKey;
U32 eax = 0;
U32 ebx = 0;
U32 ecx = 0;
U32 edx = 0;
U32 *Ptr;
S32 Error;
/* Get processor instance number */
sprintf(Buffer, "%u", CpuEntry->LocalApicId);
/* Create the CPU instance key */
Error = RegCreateKey(CpuKey,
Buffer,
&CpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the FPU instance key */
Error = RegCreateKey(FpuKey,
Buffer,
&FpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Get 'VendorIdentifier' */
GetCpuid(0, &eax, &ebx, &ecx, &edx);
VendorIdentifier[12] = 0;
Ptr = (U32*)&VendorIdentifier[0];
*Ptr = ebx;
Ptr++;
*Ptr = edx;
Ptr++;
*Ptr = ecx;
/* Get 'Identifier' */
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(U32)((CpuEntry->CpuSignature >> 8) & 0x0F),
(U32)((CpuEntry->CpuSignature >> 4) & 0x0F),
(U32)(CpuEntry->CpuSignature & 0x0F));
/* Get FeatureSet */
FeatureSet = CpuEntry->FeatureFlags;
/* Set 'Configuration Data' value (CPU and FPU) */
SetComponentInformation(CpuInstKey,
0,
CpuEntry->LocalApicId,
1 << CpuEntry->LocalApicId);
SetComponentInformation(FpuInstKey,
0,
CpuEntry->LocalApicId,
1 << CpuEntry->LocalApicId);
/* Set 'FeatureSet' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "FeatureSet: %x\n", FeatureSet));
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PU8)&FeatureSet,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'Identifier' value (CPU and FPU) */
DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier));
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'VendorIdentifier' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "Vendor Identifier: %s\n", VendorIdentifier));
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PU8)VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* FIXME: Set 'Update Signature' value (CPU only) */
/* FIXME: Set 'Update Status' value (CPU only) */
/* FIXME: Set '~MHz' value (CPU only) */
}
static PMP_FLOATING_POINT_TABLE
GetMpFloatingPointTable(VOID)
{
PMP_FLOATING_POINT_TABLE FpTable;
char *Ptr;
U8 Sum;
U32 Length;
U32 i;
FpTable = (PMP_FLOATING_POINT_TABLE)0xF0000;
while ((U32)FpTable < 0x100000)
{
if (FpTable->Signature == MP_FP_SIGNATURE)
{
Length = FpTable->Length * 0x10;
Ptr = (char *)FpTable;
Sum = 0;
for (i = 0; i < Length; i++)
{
Sum += Ptr[i];
}
DbgPrint((DPRINT_HWDETECT,
"Checksum: %u\n",
Sum));
if (Sum != 0)
{
DbgPrint((DPRINT_HWDETECT,
"Invalid MP floating point checksum: %u\n",
Sum));
return NULL;
}
return FpTable;
}
FpTable = (PMP_FLOATING_POINT_TABLE)((U32)FpTable + 0x10);
}
return NULL;
}
static PMP_CONFIGURATION_TABLE
GetMpConfigurationTable(PMP_FLOATING_POINT_TABLE FpTable)
{
PMP_CONFIGURATION_TABLE ConfigTable;
char *Ptr;
U8 Sum;
U32 Length;
U32 i;
if (FpTable->FeatureByte[0] != 0 ||
FpTable->PhysicalAddressPointer == 0)
return NULL;
ConfigTable = (PMP_CONFIGURATION_TABLE)FpTable->PhysicalAddressPointer;
if (ConfigTable->Signature != MP_CT_SIGNATURE)
return NULL;
DbgPrint((DPRINT_HWDETECT,
"MP Configuration Table at: %x\n",
(U32)ConfigTable));
/* Calculate base table checksum */
Length = ConfigTable->BaseTableLength;
Ptr = (char *)ConfigTable;
Sum = 0;
for (i = 0; i < Length; i++)
{
Sum += Ptr[i];
}
DbgPrint((DPRINT_HWDETECT,
"MP Configuration Table base checksum: %u\n",
Sum));
if (Sum != 0)
{
DbgPrint((DPRINT_HWDETECT,
"Invalid MP Configuration Table base checksum: %u\n",
Sum));
return NULL;
}
if (ConfigTable->ExtendedTableLength != 0)
{
/* FIXME: Check extended table */
}
return ConfigTable;
}
static BOOL
DetectMps(HKEY CpuKey,
HKEY FpuKey)
{
PMP_FLOATING_POINT_TABLE FpTable;
PMP_CONFIGURATION_TABLE ConfigTable;
PMP_PROCESSOR_ENTRY CpuEntry;
char *Ptr;
U32 Offset;
/* Get floating point table */
FpTable = GetMpFloatingPointTable();
if (FpTable == NULL)
return FALSE;
DbgPrint((DPRINT_HWDETECT,
"MP Floating Point Table at: %x\n",
(U32)FpTable));
if (FpTable->FeatureByte[0] == 0)
{
/* Get configuration table */
ConfigTable = GetMpConfigurationTable(FpTable);
if (ConfigTable == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to find the MP Configuration Table\n"));
return FALSE;
}
Offset = sizeof(MP_CONFIGURATION_TABLE);
while (Offset < ConfigTable->BaseTableLength)
{
Ptr = (char*)((U32)ConfigTable + Offset);
switch (*Ptr)
{
case 0:
CpuEntry = (PMP_PROCESSOR_ENTRY)Ptr;
DbgPrint((DPRINT_HWDETECT, "Processor Entry\n"));
DbgPrint((DPRINT_HWDETECT,
"APIC Id %u APIC Version %u Flags %x Signature %x Feature %x\n",
CpuEntry->LocalApicId,
CpuEntry->LocalApicVersion,
CpuEntry->CpuFlags,
CpuEntry->CpuSignature,
CpuEntry->FeatureFlags));
DbgPrint((DPRINT_HWDETECT,
"Processor %u: x86 Family %u Model %u Stepping %u\n",
CpuEntry->LocalApicId,
(U32)((CpuEntry->CpuSignature >> 8) & 0x0F),
(U32)((CpuEntry->CpuSignature >> 4) & 0x0F),
(U32)(CpuEntry->CpuSignature & 0x0F)));
SetMpsProcessor(CpuKey, FpuKey, CpuEntry);
Offset += 0x14;
break;
case 1:
DbgPrint((DPRINT_HWDETECT, "Bus Entry\n"));
Offset += 0x08;
break;
case 2:
DbgPrint((DPRINT_HWDETECT, "I/0 APIC Entry\n"));
Offset += 0x08;
break;
case 3:
DbgPrint((DPRINT_HWDETECT, "I/0 Interrupt Assignment Entry\n"));
Offset += 0x08;
break;
case 4:
DbgPrint((DPRINT_HWDETECT, "Local Interrupt Assignment Entry\n"));
Offset += 0x08;
break;
default:
DbgPrint((DPRINT_HWDETECT, "Unknown Entry %u\n",(U32)*Ptr));
return FALSE;
}
}
}
else
{
DbgPrint((DPRINT_HWDETECT,
"Unsupported MPS configuration: %x\n",
FpTable->FeatureByte[0]));
/* FIXME: Identify default configurations */
return FALSE;
}
return TRUE;
}
VOID
DetectCPUs(HKEY SystemKey)
{
HKEY CpuKey;
HKEY FpuKey;
S32 Error;
/* Create the 'CentralProcessor' key */
Error = RegCreateKey(SystemKey,
"CentralProcessor",
&CpuKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the 'FloatingPointProcessor' key */
Error = RegCreateKey(SystemKey,
"FloatingPointProcessor",
&FpuKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Detect CPUs */
if (!DetectMps(CpuKey, FpuKey))
{
DetectCPU(CpuKey, FpuKey);
}
}
/* EOF */

View File

@@ -1,121 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2003 Eric Kohl <ekohl@rz-online.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
/*
* U32 CpuidSupported(VOID);
*
* RETURNS:
* 0x00000001: CPU supports the CPUID instruction
* 0x00000300: Found 80386 CPU
* 0x00000400: Found 80486 CPU without CPUID support
*/
EXTERN(_CpuidSupported)
.code32
pushl %ecx /* save ECX */
pushfl /* push original EFLAGS */
popl %eax /* get original EFLAGS */
movl %eax,%ecx /* save original EFLAGS */
xorl $0x40000,%eax /* flip AC bit in EFLAGS */
pushl %eax /* save new EFLAGS value on stack */
popfl /* replace current EFLAGS value */
pushfl /* get new EFLAGS */
popl %eax /* store new EFLAGS in EAX */
xorl %ecx, %eax /* can't toggle AC bit, processor=80386 */
movl $0x300,%eax /* return processor id */
jz NoCpuid /* jump if 80386 processor */
pushl %ecx
popfl /* restore AC bit in EFLAGS first */
movl %ecx,%eax /* get original EFLAGS */
xorl $0x200000,%eax /* flip ID bit in EFLAGS */
pushl %eax /* save new EFLAGS value on stack */
popfl /* replace current EFLAGS value */
pushfl /* get new EFLAGS */
popl %eax /* store new EFLAGS in EAX */
xorl %ecx,%eax /* can't toggle ID bit, */
movl $0x400,%eax /* return processor id */
je NoCpuid /* processor=80486 */
movl $1,%eax /* CPUID supported */
NoCpuid:
pushl %ecx
popfl /* restore EFLAGS */
popl %ecx /* retore ECX */
ret
/*
* VOID GetCpuid(U32 Level, U32 *eax, U32 *ebx, U32 *ecx, U32 *edx);
*/
EXTERN(_GetCpuid)
.code32
pushl %ebp
movl %esp,%ebp
pushl %eax
pushl %ebx
pushl %ecx
pushl %edx
pushl %esi
movl 0x08(%ebp),%eax
cpuid
movl 0x0C(%ebp),%esi
movl %eax, (%esi)
movl 0x10(%ebp),%esi
movl %ebx, (%esi)
movl 0x14(%ebp),%esi
movl %ecx, (%esi)
movl 0x18(%ebp),%esi
movl %edx, (%esi)
popl %esi
popl %edx
popl %ecx
popl %ebx
popl %eax
movl %ebp,%esp
popl %ebp
ret
/* EOF */

View File

@@ -1,487 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <debug.h>
#include <portio.h>
typedef struct
{
U8 PacketSize; // 00h - Size of packet (10h or 18h)
U8 Reserved; // 01h - Reserved (0)
U16 LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD)
U16 TransferBufferOffset; // 04h - Transfer buffer offset (seg:off)
U16 TransferBufferSegment; // Transfer buffer segment (seg:off)
U64 LBAStartBlock; // 08h - Starting absolute block number
U64 TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer
// used if DWORD at 04h is FFFFh:FFFFh
} PACKED I386_DISK_ADDRESS_PACKET, *PI386_DISK_ADDRESS_PACKET;
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __i386__
BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %d%d SectorCount: %d Buffer: 0x%x\n", DriveNumber, (U32)SectorNumber, SectorCount, Buffer));
//
// Check to see if it is a fixed disk drive
// If so then check to see if Int13 extensions work
// If they do then use them, otherwise default back to BIOS calls
//
if ((DriveNumber >= 0x80) && DiskInt13ExtensionsSupported(DriveNumber))
{
DbgPrint((DPRINT_DISK, "Using Int 13 Extensions for read. DiskInt13ExtensionsSupported(%d) = %s\n", DriveNumber, DiskInt13ExtensionsSupported(DriveNumber) ? "TRUE" : "FALSE"));
//
// LBA is easy, nothing to calculate
// Just do the read
//
return DiskReadLogicalSectorsLBA(DriveNumber, SectorNumber, SectorCount, Buffer);
}
else
{
// LBA is not supported default to the CHS calls
return DiskReadLogicalSectorsCHS(DriveNumber, SectorNumber, SectorCount, Buffer);
}
return TRUE;
}
BOOL DiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
REGS RegsIn;
REGS RegsOut;
U32 RetryCount;
PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER);
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectorsLBA()\n"));
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
RegsIn.b.ah = 0x42; // Subfunction 42h
RegsIn.b.dl = DriveNumber; // Drive number in DL (0 - floppy, 0x80 - harddisk)
RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> disk address packet
RegsIn.w.si = BIOSCALLBUFOFFSET;
// Setup disk address packet
RtlZeroMemory(Packet, sizeof(I386_DISK_ADDRESS_PACKET));
Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET);
Packet->Reserved = 0;
Packet->LBABlockCount = SectorCount;
Packet->TransferBufferOffset = ((U32)Buffer) & 0x0F;
Packet->TransferBufferSegment = ((U32)Buffer) >> 4;
Packet->LBAStartBlock = SectorNumber;
Packet->TransferBuffer64 = 0;
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
// Return:
// CF clear if successful
// AH = 00h
// CF set on error
// AH = error code
// disk address packet's block count field set to the
// number of blocks successfully transferred
// Retry 3 times
for (RetryCount=0; RetryCount<3; RetryCount++)
{
Int386(0x13, &RegsIn, &RegsOut);
// If it worked return TRUE
if (INT386_SUCCESS(RegsOut))
{
return TRUE;
}
// If it was a corrected ECC error then the data is still good
else if (RegsOut.b.ah == 0x11)
{
return TRUE;
}
// If it failed the do the next retry
else
{
DiskResetController(DriveNumber);
continue;
}
}
// If we get here then the read failed
DiskError("Disk Read Failed", RegsOut.b.ah);
return FALSE;
}
BOOL DiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
U32 PhysicalSector;
U32 PhysicalHead;
U32 PhysicalTrack;
GEOMETRY DriveGeometry;
U32 NumberOfSectorsToRead;
REGS RegsIn;
REGS RegsOut;
U32 RetryCount;
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectorsCHS()\n"));
//
// Get the drive geometry
//
if (!DiskGetDriveGeometry(DriveNumber, &DriveGeometry))
{
return FALSE;
}
while (SectorCount)
{
//
// Calculate the physical disk offsets
//
PhysicalSector = 1 + (SectorNumber % DriveGeometry.Sectors);
PhysicalHead = (SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads;
PhysicalTrack = (SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads;
//
// Calculate how many sectors we need to read this round
//
if (PhysicalSector > 1)
{
if (SectorCount >= (DriveGeometry.Sectors - (PhysicalSector - 1)))
NumberOfSectorsToRead = (DriveGeometry.Sectors - (PhysicalSector - 1));
else
NumberOfSectorsToRead = SectorCount;
}
else
{
if (SectorCount >= DriveGeometry.Sectors)
NumberOfSectorsToRead = DriveGeometry.Sectors;
else
NumberOfSectorsToRead = SectorCount;
}
//
// Make sure the read is within the geometry boundaries
//
if ((PhysicalHead >= DriveGeometry.Heads) ||
(PhysicalTrack >= DriveGeometry.Cylinders) ||
((NumberOfSectorsToRead + PhysicalSector) > (DriveGeometry.Sectors + 1)) ||
(PhysicalSector > DriveGeometry.Sectors))
{
DiskError("Disk read exceeds drive geometry limits.", 0);
return FALSE;
}
// BIOS Int 13h, function 2 - Read Disk Sectors
// AH = 02h
// AL = number of sectors to read (must be nonzero)
// CH = low eight bits of cylinder number
// CL = sector number 1-63 (bits 0-5)
// high two bits of cylinder (bits 6-7, hard disk only)
// DH = head number
// DL = drive number (bit 7 set for hard disk)
// ES:BX -> data buffer
// Return:
// CF set on error
// if AH = 11h (corrected ECC error), AL = burst length
// CF clear if successful
// AH = status
// AL = number of sectors transferred
// (only valid if CF set for some BIOSes)
RegsIn.b.ah = 0x02;
RegsIn.b.al = NumberOfSectorsToRead;
RegsIn.b.ch = (PhysicalTrack & 0xFF);
RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
RegsIn.b.dh = PhysicalHead;
RegsIn.b.dl = DriveNumber;
RegsIn.w.es = ((U32)Buffer) >> 4;
RegsIn.w.bx = ((U32)Buffer) & 0x0F;
//
// Perform the read
// Retry 3 times
//
for (RetryCount=0; RetryCount<3; RetryCount++)
{
Int386(0x13, &RegsIn, &RegsOut);
// If it worked break out
if (INT386_SUCCESS(RegsOut))
{
break;
}
// If it was a corrected ECC error then the data is still good
else if (RegsOut.b.ah == 0x11)
{
break;
}
// If it failed the do the next retry
else
{
DiskResetController(DriveNumber);
continue;
}
}
// If we retried 3 times then fail
if (RetryCount >= 3)
{
DiskError("Disk Read Failed", RegsOut.b.ah);
return FALSE;
}
// I have learned that not all bioses return
// the sector read count in the AL register (at least mine doesn't)
// even if the sectors were read correctly. So instead
// of checking the sector read count we will rely solely
// on the carry flag being set on error
Buffer += (NumberOfSectorsToRead * DriveGeometry.BytesPerSector);
SectorCount -= NumberOfSectorsToRead;
SectorNumber += NumberOfSectorsToRead;
}
return TRUE;
}
BOOL DiskResetController(U32 DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
DbgPrint((DPRINT_DISK, "DiskResetController(0x%x) DISK OPERATION FAILED -- RESETTING CONTROLLER\n", DriveNumber));
// BIOS Int 13h, function 0 - Reset disk system
// AH = 00h
// DL = drive (if bit 7 is set both hard disks and floppy disks reset)
// Return:
// AH = status
// CF clear if successful
// CF set on error
RegsIn.b.ah = 0x02;
RegsIn.b.dl = DriveNumber;
// Reset the disk controller
Int386(0x13, &RegsIn, &RegsOut);
return INT386_SUCCESS(RegsOut);
}
BOOL DiskInt13ExtensionsSupported(U32 DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
DbgPrint((DPRINT_DISK, "DiskInt13ExtensionsSupported()\n"));
// IBM/MS INT 13 Extensions - INSTALLATION CHECK
// AH = 41h
// BX = 55AAh
// DL = drive (80h-FFh)
// Return:
// CF set on error (extensions not supported)
// AH = 01h (invalid function)
// CF clear if successful
// BX = AA55h if installed
// AH = major version of extensions
// 01h = 1.x
// 20h = 2.0 / EDD-1.0
// 21h = 2.1 / EDD-1.1
// 30h = EDD-3.0
// AL = internal use
// CX = API subset support bitmap
// DH = extension version (v2.0+ ??? -- not present in 1.x)
//
// Bitfields for IBM/MS INT 13 Extensions API support bitmap
// Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
// Bit 1, removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h) supported
// Bit 2, enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
// extended drive parameter table is valid
// Bits 3-15 reserved
RegsIn.b.ah = 0x41;
RegsIn.w.bx = 0x55AA;
RegsIn.b.dl = DriveNumber;
// Reset the disk controller
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
// CF set on error (extensions not supported)
return FALSE;
}
if (RegsOut.w.bx != 0xAA55)
{
// BX = AA55h if installed
return FALSE;
}
// Note:
// The original check is too strict because some BIOSes report that
// extended disk access functions are not suported when booting
// from a CD (e.g. Phoenix BIOS v6.00PG). Argh!
#if 0
if (!(RegsOut.w.cx & 0x0001))
{
// CX = API subset support bitmap
// Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
return FALSE;
}
#endif
// Use this relaxed check instead
if (RegsOut.w.cx == 0x0000)
{
// CX = API subset support bitmap
return FALSE;
}
return TRUE;
}
VOID DiskStopFloppyMotor(VOID)
{
WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0);
}
BOOL DiskGetDriveParameters(U32 DriveNumber, PGEOMETRY Geometry)
{
REGS RegsIn;
REGS RegsOut;
U32 Cylinders;
DbgPrint((DPRINT_DISK, "DiskGetDriveParameters()\n"));
// BIOS Int 13h, function 08h - Get drive parameters
// AH = 08h
// DL = drive (bit 7 set for hard disk)
// ES:DI = 0000h:0000h to guard against BIOS bugs
// Return:
// CF set on error
// AH = status (07h)
// CF clear if successful
// AH = 00h
// AL = 00h on at least some BIOSes
// BL = drive type (AT/PS2 floppies only)
// CH = low eight bits of maximum cylinder number
// CL = maximum sector number (bits 5-0)
// high two bits of maximum cylinder number (bits 7-6)
// DH = maximum head number
// DL = number of drives
// ES:DI -> drive parameter table (floppies only)
RegsIn.b.ah = 0x08;
RegsIn.b.dl = DriveNumber;
RegsIn.w.es = 0x0000;
RegsIn.w.di = 0x0000;
// Get drive parameters
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
return FALSE;
}
Cylinders = (RegsOut.b.cl & 0xC0) << 2;
Cylinders += RegsOut.b.ch;
Cylinders++;
Geometry->Cylinders = Cylinders;
Geometry->Heads = RegsOut.b.dh + 1;
Geometry->Sectors = RegsOut.b.cl & 0x3F;
Geometry->BytesPerSector = 512; // Just assume 512 bytes per sector
return TRUE;
}
BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize)
{
REGS RegsIn;
REGS RegsOut;
PU16 Ptr = (PU16)(BIOSCALLBUFFER);
DbgPrint((DPRINT_DISK, "DiskGetExtendedDriveParameters()\n"));
// Initialize transfer buffer
*Ptr = BufferSize;
// BIOS Int 13h, function 48h - Get drive parameters
// AH = 48h
// DL = drive (bit 7 set for hard disk)
// DS:SI = result buffer
// Return:
// CF set on error
// AH = status (07h)
// CF clear if successful
// AH = 00h
// DS:SI -> result buffer
RegsIn.b.ah = 0x48;
RegsIn.b.dl = DriveNumber;
RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> result buffer
RegsIn.w.si = BIOSCALLBUFOFFSET;
// Get drive parameters
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
return FALSE;
}
memcpy(Buffer, Ptr, BufferSize);
return TRUE;
}
U32 DiskGetCacheableBlockCount(U32 DriveNumber)
{
GEOMETRY Geometry;
// Get the disk geometry
// If this fails then we will just return 1 sector to be safe
if (!DiskGetDriveParameters(DriveNumber, &Geometry))
{
return 1;
}
// If LBA is supported then the block size will be 64 sectors (32k)
// If not then the block size is the size of one track
if (DiskInt13ExtensionsSupported(DriveNumber))
{
return 64;
}
else
{
return Geometry.Sectors;
}
}
#endif // defined __i386__

View File

@@ -1,224 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
.p2align 2 /* force 4-byte alignment */
EXTERN(i386idt)
/* Exception 0 - Divide By Zero */
.word i386DivideByZero /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Flags, Zero Byte */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 1 - Debug Exception */
.word i386DebugException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 2 - NMI */
.word i386NMIException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 3 - Breakpoint (INT 3) */
.word i386Breakpoint /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 4 - Overflow (INTO with EFLAGS[OF] set) */
.word i386Overflow /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 5 - Bound Exception */
.word i386BoundException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 6 - Invalid Opcode */
.word i386InvalidOpcode /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 7 - FPU Not Available */
.word i386FPUNotAvailable /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 8 - Double Fault */
.word i386DoubleFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 9 - Coprocessor Segment Overrun */
.word i386CoprocessorSegment /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 10 (0x0A) - Invalid TSS */
.word i386InvalidTSS /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 11 (0x0B) - Segment Not Present */
.word i386SegmentNotPresent /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 12 (0x0C) - Stack Exception */
.word i386StackException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 13 (0x0D) - General Protection Fault */
.word i386GeneralProtectionFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 14 (0x0E) - Page Fault */
.word i386PageFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 15 (0x0F) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 16 (0x10) - Coprocessor Error */
.word i386CoprocessorError /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 17 (0x11) - Alignment Check */
.word i386AlignmentCheck /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 18 (0x12) - Machine Check */
.word i386MachineCheck /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 19 (0x13) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 20 (0x14) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 21 (0x15) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 22 (0x16) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 23 (0x17) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 24 (0x18) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 25 (0x19) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 26 (0x1A) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 27 (0x1B) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 28 (0x1C) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 29 (0x1D) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 30 (0x1E) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 31 (0x1F) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* IDT table pointer */
EXTERN(i386idtptr)
.word (i386idtptr-i386idt) /* Limit */
.long i386idt /* Base Address */

View File

@@ -1,216 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <rtl.h>
#include <portio.h>
U32 GetExtendedMemorySize(VOID)
{
REGS RegsIn;
REGS RegsOut;
U32 MemorySize;
DbgPrint((DPRINT_MEMORY, "GetExtendedMemorySize()\n"));
// Int 15h AX=E801h
// Phoenix BIOS v4.0 - GET MEMORY SIZE FOR >64M CONFIGURATIONS
//
// AX = E801h
// Return:
// CF clear if successful
// AX = extended memory between 1M and 16M, in K (max 3C00h = 15MB)
// BX = extended memory above 16M, in 64K blocks
// CX = configured memory 1M to 16M, in K
// DX = configured memory above 16M, in 64K blocks
// CF set on error
RegsIn.w.ax = 0xE801;
Int386(0x15, &RegsIn, &RegsOut);
DbgPrint((DPRINT_MEMORY, "Int15h AX=E801h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
DbgPrint((DPRINT_MEMORY, "BX = 0x%x\n", RegsOut.w.bx));
DbgPrint((DPRINT_MEMORY, "CX = 0x%x\n", RegsOut.w.cx));
DbgPrint((DPRINT_MEMORY, "DX = 0x%x\n", RegsOut.w.dx));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
if (INT386_SUCCESS(RegsOut))
{
// If AX=BX=0000h the use CX and DX
if (RegsOut.w.ax == 0)
{
// Return extended memory size in K
MemorySize = RegsOut.w.dx * 64;
MemorySize += RegsOut.w.cx;
return MemorySize;
}
else
{
// Return extended memory size in K
MemorySize = RegsOut.w.bx * 64;
MemorySize += RegsOut.w.ax;
return MemorySize;
}
}
// If we get here then Int15 Func E801h didn't work
// So try Int15 Func 88h
// Int 15h AH=88h
// SYSTEM - GET EXTENDED MEMORY SIZE (286+)
//
// AH = 88h
// Return:
// CF clear if successful
// AX = number of contiguous KB starting at absolute address 100000h
// CF set on error
// AH = status
// 80h invalid command (PC,PCjr)
// 86h unsupported function (XT,PS30)
RegsIn.b.ah = 0x88;
Int386(0x15, &RegsIn, &RegsOut);
DbgPrint((DPRINT_MEMORY, "Int15h AH=88h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
if (INT386_SUCCESS(RegsOut) && RegsOut.w.ax != 0)
{
MemorySize = RegsOut.w.ax;
return MemorySize;
}
// If we get here then Int15 Func 88h didn't work
// So try reading the CMOS
WRITE_PORT_UCHAR((PUCHAR)0x70, 0x31);
MemorySize = READ_PORT_UCHAR((PUCHAR)0x71);
MemorySize = (MemorySize & 0xFFFF);
MemorySize = (MemorySize << 8);
DbgPrint((DPRINT_MEMORY, "Int15h Failed\n"));
DbgPrint((DPRINT_MEMORY, "CMOS reports: 0x%x\n", MemorySize));
return MemorySize;
}
U32 GetConventionalMemorySize(VOID)
{
REGS Regs;
DbgPrint((DPRINT_MEMORY, "GetConventionalMemorySize()\n"));
// Int 12h
// BIOS - GET MEMORY SIZE
//
// Return:
// AX = kilobytes of contiguous memory starting at absolute address 00000h
//
// This call returns the contents of the word at 0040h:0013h;
// in PC and XT, this value is set from the switches on the motherboard
Regs.w.ax = 0;
Int386(0x12, &Regs, &Regs);
DbgPrint((DPRINT_MEMORY, "Int12h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n\n", Regs.w.ax));
return (U32)Regs.w.ax;
}
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize)
{
REGS Regs;
U32 MapCount;
DbgPrint((DPRINT_MEMORY, "GetBiosMemoryMap()\n"));
// Int 15h AX=E820h
// Newer BIOSes - GET SYSTEM MEMORY MAP
//
// AX = E820h
// EAX = 0000E820h
// EDX = 534D4150h ('SMAP')
// EBX = continuation value or 00000000h to start at beginning of map
// ECX = size of buffer for result, in bytes (should be >= 20 bytes)
// ES:DI -> buffer for result
// Return:
// CF clear if successful
// EAX = 534D4150h ('SMAP')
// ES:DI buffer filled
// EBX = next offset from which to copy or 00000000h if all done
// ECX = actual length returned in bytes
// CF set on error
// AH = error code (86h)
Regs.x.eax = 0x0000E820;
Regs.x.edx = 0x534D4150; // ('SMAP')
Regs.x.ebx = 0x00000000;
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
for (MapCount=0; MapCount<MaxMemoryMapSize; MapCount++)
{
Int386(0x15, &Regs, &Regs);
DbgPrint((DPRINT_MEMORY, "Memory Map Entry %d\n", MapCount));
DbgPrint((DPRINT_MEMORY, "Int15h AX=E820h\n"));
DbgPrint((DPRINT_MEMORY, "EAX = 0x%x\n", Regs.x.eax));
DbgPrint((DPRINT_MEMORY, "EBX = 0x%x\n", Regs.x.ebx));
DbgPrint((DPRINT_MEMORY, "ECX = 0x%x\n", Regs.x.ecx));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n", (Regs.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
// If the BIOS didn't return 'SMAP' in EAX then
// it doesn't support this call
if (Regs.x.eax != 0x534D4150)
{
break;
}
// Copy data to caller's buffer
RtlCopyMemory(&BiosMemoryMap[MapCount], (PVOID)BIOSCALLBUFFER, Regs.x.ecx);
DbgPrint((DPRINT_MEMORY, "BaseAddress: 0x%x%x\n", BiosMemoryMap[MapCount].BaseAddress));
DbgPrint((DPRINT_MEMORY, "Length: 0x%x%x\n", BiosMemoryMap[MapCount].Length));
DbgPrint((DPRINT_MEMORY, "Type: 0x%x\n", BiosMemoryMap[MapCount].Type));
DbgPrint((DPRINT_MEMORY, "Reserved: 0x%x\n", BiosMemoryMap[MapCount].Reserved));
DbgPrint((DPRINT_MEMORY, "\n"));
// If the continuation value is zero or the
// carry flag is set then this was
// the last entry so we're done
if (Regs.x.ebx == 0x00000000 || !INT386_SUCCESS(Regs))
{
MapCount++;
DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
break;
}
// Setup the registers for the next call
Regs.x.eax = 0x0000E820;
Regs.x.edx = 0x534D4150; // ('SMAP')
//Regs.x.ebx = 0x00000001; // Continuation value already set by the BIOS
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
}
return MapCount;
}

View File

@@ -1,257 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2003 Eric Kohl <ekohl@rz-online.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
/*
* U32 PnpBiosSupported(VOID);
*
* RETURNS:
*/
_pnp_bios_entry_point:
.long 0
_pnp_bios_data_segment:
.word 0
EXTERN(_PnpBiosSupported)
.code32
pushl %edi
pushl %esi
pushl %ecx
pushl %edx
xorl %edi,%edi
/* init esi */
movl $0xF0000,%esi
pnp_again:
movl (%esi),%eax
cmp $0x506E5024,%eax /* "$PnP" */
je pnp_found
cmp $0xFFFF0,%esi
je pnp_not_found
pnp_add:
addl $0x10,%esi
jmp pnp_again
pnp_found:
/* first calculate the checksum */
pushl %esi
pushl $0x21
popl %ecx
xorl %edx, %edx
pnp_loop:
lodsb
addb %al,%dl
loopl pnp_loop
testb %dl, %dl
popl %esi
jnz pnp_add
movl %esi,%edi
/* Calculate the bios entry point (far pointer) */
xorl %eax,%eax
movw 0x0F(%esi),%ax
shll $16,%eax
movw 0x0D(%esi),%ax
movl %eax,_pnp_bios_entry_point
/* Store bios data segment */
movw 0x1B(%esi),%ax
movw %ax,_pnp_bios_data_segment
pnp_not_found:
movl %edi,%eax
popl %edx
popl %ecx
popl %esi
popl %edi
ret
/*
* U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, U32 *NodeCount);
*
* RETURNS:
*/
_pnp_result:
.long 0
_pnp_node_size:
.word 0
_pnp_node_count:
.word 0
EXTERN(_PnpBiosGetDeviceNodeCount)
.code32
pushl %ebp
movl %esp,%ebp
pushal
push %es
call switch_to_real
.code16
movw _pnp_bios_data_segment,%ax
pushw %ax
pushw %cs
movw $(_pnp_node_size),%ax
pushw %ax
pushw %cs
movw $(_pnp_node_count),%ax
pushw %ax
pushw $0
lcall *_pnp_bios_entry_point
addw $12,%sp
movzwl %ax,%ecx
movl %ecx,_pnp_result
call switch_to_prot
.code32
movl 0x08(%ebp),%esi
movw _pnp_node_size,%ax
movzwl %ax,%ecx
movl %ecx, (%esi)
movl 0x0C(%ebp),%esi
movw _pnp_node_count,%ax
movzwl %ax,%ecx
movl %eax, (%esi)
pop %es
popal
movl %ebp,%esp
popl %ebp
movl _pnp_result,%eax
ret
/*
* U32 PnpBiosGetDeviceNode(U8 *NodeId, U8 *NodeBuffer);
*
* RETURNS:
*/
_pnp_buffer_segment:
.word 0
_pnp_buffer_offset:
.word 0
_pnp_node_number:
.byte 0
EXTERN(_PnpBiosGetDeviceNode)
.code32
pushl %ebp
movl %esp,%ebp
pushal
push %es
/* get current node number */
movl 0x08(%ebp),%esi
movb (%esi),%al
movb %al,_pnp_node_number
/* convert pointer to node buffer to segment/offset */
movl 0x0C(%ebp),%eax
shrl $4,%eax
andl $0xf000,%eax
movw %ax,_pnp_buffer_segment
movl 0x0C(%ebp),%eax
andl $0xffff,%eax
movw %ax,_pnp_buffer_offset
call switch_to_real
.code16
/* push bios segment */
movw _pnp_bios_data_segment,%ax
pushw %ax
/* push control flag */
pushw $0x0001
/* push pointer to node buffer (segment/offset) */
movw _pnp_buffer_segment,%ax
pushw %ax
movw _pnp_buffer_offset,%ax
pushw %ax
/* push pointer to node number (segment/offset) */
pushw %cs
movw $(_pnp_node_number),%ax
pushw %ax
/* push function number */
pushw $1
/* call entry point */
lcall *_pnp_bios_entry_point
addw $14,%sp
movzwl %ax,%ecx
movl %ecx,_pnp_result
call switch_to_prot
.code32
/* update node number */
movl 0x08(%ebp),%esi
movb _pnp_node_number,%al
movb %al,(%esi)
pop %es
popal
movl %ebp,%esp
popl %ebp
movl _pnp_result,%eax
ret
/* EOF */

View File

@@ -1,396 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <rtl.h>
#include <portio.h>
void putchar(int ch)
{
REGS Regs;
/* If we are displaying a CR '\n' then do a LF also */
if (ch == '\n')
{
/* Display the LF */
putchar('\r');
}
/* If we are displaying a TAB '\t' then display 8 spaces ' ' */
if (ch == '\t')
{
/* Display the 8 spaces ' ' */
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
return;
}
// Int 10h AH=0Eh
// VIDEO - TELETYPE OUTPUT
//
// AH = 0Eh
// AL = character to write
// BH = page number
// BL = foreground color (graphics modes only)
Regs.b.ah = 0x0E;
Regs.b.al = ch;
Regs.w.bx = 1;
Int386(0x10, &Regs, &Regs);
}
int kbhit(void)
{
REGS Regs;
// Int 16h AH=01h
// KEYBOARD - CHECK FOR KEYSTROKE
//
// AH = 01h
// Return:
// ZF set if no keystroke available
// ZF clear if keystroke available
// AH = BIOS scan code
// AL = ASCII character
Regs.b.ah = 0x01;
Int386(0x16, &Regs, &Regs);
if (Regs.x.eflags & I386FLAG_ZF)
{
return 0;
}
return 1;
}
int getch(void)
{
REGS Regs;
static BOOL ExtendedKey = FALSE;
static char ExtendedScanCode = 0;
// If the last time we were called an
// extended key was pressed then return
// that keys scan code.
if (ExtendedKey)
{
ExtendedKey = FALSE;
return ExtendedScanCode;
}
// Int 16h AH=00h
// KEYBOARD - GET KEYSTROKE
//
// AH = 00h
// Return:
// AH = BIOS scan code
// AL = ASCII character
Regs.b.ah = 0x00;
Int386(0x16, &Regs, &Regs);
// Check for an extended keystroke
if (Regs.b.al == 0)
{
ExtendedKey = TRUE;
ExtendedScanCode = Regs.b.ah;
}
// Return keystroke
return Regs.b.al;
}
int getyear(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
U16 Cent1;
U16 Cent2;
U16 Year;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.cl & 0x0F;
Digit2 = ((Regs.b.cl >> 4) & 0x0F) * 10;
Cent1 = Regs.b.ch & 0x0F;
Cent2 = ((Regs.b.ch >> 4) & 0x0F) * 10;
Year = Cent1 + Cent2;
Year *= 100;
Year += Digit1 + Digit2;
return Year;
}
int getday(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dl & 0x0F;
Digit2 = ((Regs.b.dl >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getmonth(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dh & 0x0F;
Digit2 = ((Regs.b.dh >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int gethour(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.ch & 0x0F;
Digit2 = ((Regs.b.ch >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getminute(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.cl & 0x0F;
Digit2 = ((Regs.b.cl >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getsecond(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dh & 0x0F;
Digit2 = ((Regs.b.dh >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
void beep(void)
{
sound(700);
delay(200);
sound(0);
}
void delay(unsigned msec)
{
REGS Regs;
unsigned usec;
unsigned msec_this;
// Int 15h AH=86h
// BIOS - WAIT (AT,PS)
//
// AH = 86h
// CX:DX = interval in microseconds
// Return:
// CF clear if successful (wait interval elapsed)
// CF set on error or AH=83h wait already in progress
// AH = status (see #00496)
// Note: The resolution of the wait period is 977 microseconds on
// many systems because many BIOSes use the 1/1024 second fast
// interrupt from the AT real-time clock chip which is available on INT 70;
// because newer BIOSes may have much more precise timers available, it is
// not possible to use this function accurately for very short delays unless
// the precise behavior of the BIOS is known (or found through testing)
while (msec)
{
msec_this = msec;
if (msec_this > 4000)
{
msec_this = 4000;
}
usec = msec_this * 1000;
Regs.b.ah = 0x86;
Regs.w.cx = usec >> 16;
Regs.w.dx = usec & 0xffff;
Int386(0x15, &Regs, &Regs);
msec -= msec_this;
}
}
void sound(int freq)
{
int scale;
if (freq == 0)
{
WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) & ~3);
return;
}
scale = 1193046 / freq;
WRITE_PORT_UCHAR((PUCHAR)0x43, 0xb6);
WRITE_PORT_UCHAR((PUCHAR)0x42, scale & 0xff);
WRITE_PORT_UCHAR((PUCHAR)0x42, scale >> 8);
WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) | 3);
}

View File

@@ -1,931 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
#include <version.h>
.macro SAVE_CPU_REGS
movl %eax,i386_EAX
movl %ebx,i386_EBX
movl %ecx,i386_ECX
movl %edx,i386_EDX
movl %esp,i386_ESP
movl %ebp,i386_EBP
movl %esi,i386_ESI
movl %edi,i386_EDI
movw %ds,%ax
movw %ax,i386_DS
movw %es,%ax
movw %ax,i386_ES
movw %fs,%ax
movw %ax,i386_FS
movw %gs,%ax
movw %ax,i386_GS
movw %ss,%ax
movw %ax,i386_SS
popl %eax
movl %eax,i386_EIP
popl %eax
movw %ax,i386_CS
popl %eax
movl %eax,i386_EFLAGS
movl %cr0,%eax
movl %eax,i386_CR0
//movl %cr1,%eax
//movl %eax,i386_CR1
movl %cr2,%eax
movl %eax,i386_CR2
movl %cr3,%eax
movl %eax,i386_CR3
movl %dr0,%eax
movl %eax,i386_DR0
movl %dr1,%eax
movl %eax,i386_DR1
movl %dr2,%eax
movl %eax,i386_DR2
movl %dr3,%eax
movl %eax,i386_DR3
movl %dr6,%eax
movl %eax,i386_DR6
movl %dr7,%eax
movl %eax,i386_DR7
sgdt i386_GDTR
sidt i386_IDTR
sldt i386_LDTR
str i386_TR
.endm
i386ExceptionHandlerText:
.ascii "FreeLoader i386 Exception Handler\n"
.ascii VERSION
.ascii "\n"
// .asciz "Report bugs to Brian Palmer <brianp@reactos.org>\n\n"
.asciz "Report bugs to ReactOS Kernel mailing list <ros-kernel@reactos.com>\n\n"
i386DivideByZeroText:
.asciz "Exception 00: DIVIDE BY ZERO\n\n"
i386DebugExceptionText:
.asciz "Exception 01: DEBUG EXCEPTION\n\n"
i386NMIExceptionText:
.asciz "Exception 02: NON-MASKABLE INTERRUPT EXCEPTION\n\n"
i386BreakpointText:
.asciz "Exception 03: BREAKPOINT (INT 3)\n\n"
i386OverflowText:
.asciz "Exception 04: OVERFLOW\n\n"
i386BoundExceptionText:
.asciz "Exception 05: BOUND EXCEPTION\n\n"
i386InvalidOpcodeText:
.asciz "Exception 06: INVALID OPCODE\n\n"
i386FPUNotAvailableText:
.asciz "Exception 07: FPU NOT AVAILABLE\n\n"
i386DoubleFaultText:
.asciz "Exception 08: DOUBLE FAULT\n\n"
i386CoprocessorSegmentText:
.asciz "Exception 09: COPROCESSOR SEGMENT OVERRUN\n\n"
i386InvalidTSSText:
.asciz "Exception 0A: INVALID TSS\n\n"
i386SegmentNotPresentText:
.asciz "Exception 0B: SEGMENT NOT PRESENT\n\n"
i386StackExceptionText:
.asciz "Exception 0C: STACK EXCEPTION\n\n"
i386GeneralProtectionFaultText:
.asciz "Exception 0D: GENERAL PROTECTION FAULT\n\n"
i386PageFaultText:
.asciz "Exception 0E: PAGE FAULT\n\n"
i386CoprocessorErrorText:
.asciz "Exception 10: COPROCESSOR ERROR\n\n"
i386AlignmentCheckText:
.asciz "Exception 11: ALIGNMENT CHECK\n\n"
i386MachineCheckText:
.asciz "Exception 12: MACHINE CHECK\n\n"
i386_EAX_Text:
.asciz "EAX: "
i386_EBX_Text:
.asciz "EBX: "
i386_ECX_Text:
.asciz "ECX: "
i386_EDX_Text:
.asciz "EDX: "
i386_ESP_Text:
.asciz " ESP: "
i386_EBP_Text:
.asciz " EBP: "
i386_ESI_Text:
.asciz " ESI: "
i386_EDI_Text:
.asciz " EDI: "
i386_CS_Text:
.asciz "CS: "
i386_DS_Text:
.asciz "DS: "
i386_ES_Text:
.asciz "ES: "
i386_FS_Text:
.asciz "FS: "
i386_GS_Text:
.asciz "GS: "
i386_SS_Text:
.asciz "SS: "
i386_EFLAGS_Text:
.asciz " EFLAGS: "
i386_EIP_Text:
.asciz " EIP: "
i386_ERROR_CODE_Text:
.asciz " ERROR CODE: "
i386_CR0_Text:
.asciz " CR0: "
i386_CR1_Text:
.asciz " CR1: "
i386_CR2_Text:
.asciz " CR2: "
i386_CR3_Text:
.asciz " CR3: "
i386_DR0_Text:
.asciz " DR0: "
i386_DR1_Text:
.asciz " DR1: "
i386_DR2_Text:
.asciz " DR2: "
i386_DR3_Text:
.asciz " DR3: "
i386_DR6_Text:
.asciz " DR6: "
i386_DR7_Text:
.asciz " DR7: "
i386_GDTR_Text:
.asciz " GDTR Base: "
i386_IDTR_Text:
.asciz " IDTR Base: "
i386_Limit_Text:
.asciz " Limit: "
i386_LDTR_Text:
.asciz " LDTR: "
i386_TR_Text:
.asciz " TR: "
/* Set by each exception handler to the address of the description text */
i386ExceptionDescriptionText:
.long 0
/* Used to store the contents of all the registers when an exception occurs */
i386_EAX:
.long 0
i386_EBX:
.long 0
i386_ECX:
.long 0
i386_EDX:
.long 0
i386_ESP:
.long 0
i386_EBP:
.long 0
i386_ESI:
.long 0
i386_EDI:
.long 0
i386_CS:
.word 0
i386_DS:
.word 0
i386_ES:
.word 0
i386_FS:
.word 0
i386_GS:
.word 0
i386_SS:
.word 0
i386_EFLAGS:
.long 0
i386_EIP:
.long 0
i386_ERROR_CODE:
.long 0
i386_CR0:
.long 0
i386_CR1:
.long 0
i386_CR2:
.long 0
i386_CR3:
.long 0
i386_DR0:
.long 0
i386_DR1:
.long 0
i386_DR2:
.long 0
i386_DR3:
.long 0
i386_DR6:
.long 0
i386_DR7:
.long 0
i386_GDTR:
.word 0
.long 0
i386_IDTR:
.word 0
.long 0
i386_LDTR:
.word 0
i386_TR:
.word 0
/* Used to store the current X and Y position on the screen */
i386_ScreenPosX:
.long 0
i386_ScreenPosY:
.long 0
/************************************************************************/
i386CommonExceptionHandler:
.code32
SAVE_CPU_REGS
call i386ClearScreenToBlue
movl $i386ExceptionHandlerText,%esi
call i386PrintText
movl i386ExceptionDescriptionText,%esi
call i386PrintText
movl $i386_EAX_Text,%esi
call i386PrintText
movl i386_EAX,%eax
call i386PrintHexDword // Display EAX
movl $i386_ESP_Text,%esi
call i386PrintText
movl i386_ESP,%eax
call i386PrintHexDword // Display ESP
movl $i386_CR0_Text,%esi
call i386PrintText
movl i386_CR0,%eax
call i386PrintHexDword // Display CR0
movl $i386_DR0_Text,%esi
call i386PrintText
movl i386_DR0,%eax
call i386PrintHexDword // Display DR0
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_EBX_Text,%esi
call i386PrintText
movl i386_EBX,%eax
call i386PrintHexDword // Display EBX
movl $i386_EBP_Text,%esi
call i386PrintText
movl i386_EBP,%eax
call i386PrintHexDword // Display EBP
movl $i386_CR1_Text,%esi
call i386PrintText
movl i386_CR1,%eax
call i386PrintHexDword // Display CR1
movl $i386_DR1_Text,%esi
call i386PrintText
movl i386_DR1,%eax
call i386PrintHexDword // Display DR1
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_ECX_Text,%esi
call i386PrintText
movl i386_ECX,%eax
call i386PrintHexDword // Display ECX
movl $i386_ESI_Text,%esi
call i386PrintText
movl i386_ESI,%eax
call i386PrintHexDword // Display ESI
movl $i386_CR2_Text,%esi
call i386PrintText
movl i386_CR2,%eax
call i386PrintHexDword // Display CR2
movl $i386_DR2_Text,%esi
call i386PrintText
movl i386_DR2,%eax
call i386PrintHexDword // Display DR2
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_EDX_Text,%esi
call i386PrintText
movl i386_EDX,%eax
call i386PrintHexDword // Display EDX
movl $i386_EDI_Text,%esi
call i386PrintText
movl i386_EDI,%eax
call i386PrintHexDword // Display EDI
movl $i386_CR3_Text,%esi
call i386PrintText
movl i386_CR3,%eax
call i386PrintHexDword // Display CR3
movl $i386_DR3_Text,%esi
call i386PrintText
movl i386_DR3,%eax
call i386PrintHexDword // Display DR3
incl i386_ScreenPosY
movl $55,i386_ScreenPosX
movl $i386_DR6_Text,%esi
call i386PrintText
movl i386_DR6,%eax
call i386PrintHexDword // Display DR6
incl i386_ScreenPosY
movl $55,i386_ScreenPosX
movl $i386_DR7_Text,%esi
call i386PrintText
movl i386_DR7,%eax
call i386PrintHexDword // Display DR7
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
incl i386_ScreenPosY
movl $i386_CS_Text,%esi
call i386PrintText
movw i386_CS,%ax
call i386PrintHexWord // Display CS
movl $i386_EIP_Text,%esi
call i386PrintText
movl i386_EIP,%eax
call i386PrintHexDword // Display EIP
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_DS_Text,%esi
call i386PrintText
movw i386_DS,%ax
call i386PrintHexWord // Display DS
movl $i386_ERROR_CODE_Text,%esi
call i386PrintText
movl i386_ERROR_CODE,%eax
call i386PrintHexDword // Display ERROR CODE
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_ES_Text,%esi
call i386PrintText
movw i386_ES,%ax
call i386PrintHexWord // Display ES
movl $i386_EFLAGS_Text,%esi
call i386PrintText
movl i386_EFLAGS,%eax
call i386PrintHexDword // Display EFLAGS
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_FS_Text,%esi
call i386PrintText
movw i386_FS,%ax
call i386PrintHexWord // Display FS
movl $i386_GDTR_Text,%esi
call i386PrintText
movl i386_GDTR+2,%eax
call i386PrintHexDword // Display GDTR Base
movl $i386_Limit_Text,%esi
call i386PrintText
movw i386_GDTR,%ax
call i386PrintHexWord // Display GDTR Limit
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_GS_Text,%esi
call i386PrintText
movw i386_GS,%ax
call i386PrintHexWord // Display GS
movl $i386_IDTR_Text,%esi
call i386PrintText
movl i386_IDTR+2,%eax
call i386PrintHexDword // Display IDTR Base
movl $i386_Limit_Text,%esi
call i386PrintText
movw i386_IDTR,%ax
call i386PrintHexWord // Display IDTR Limit
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_SS_Text,%esi
call i386PrintText
movw i386_SS,%ax
call i386PrintHexWord // Display SS
movl $i386_LDTR_Text,%esi
call i386PrintText
movw i386_LDTR,%ax
call i386PrintHexWord // Display LDTR
movl $i386_TR_Text,%esi
call i386PrintText
movw i386_TR,%ax
call i386PrintHexWord // Display TR
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
incl i386_ScreenPosY
i386ExceptionHandlerHang:
jmp i386ExceptionHandlerHang
iret
/************************************************************************/
i386ClearScreenToBlue:
.code32
cld
movw $0x1F20,%ax
movl $0xB0000,%edi
movl $0x8000,%ecx
rep stosw
ret
/************************************************************************/
/* ESI = Address of text to display */
/************************************************************************/
i386PrintText:
.code32
i386PrintTextLoop:
lodsb
// Check for end of string char
cmp $0,%al
je i386PrintTextDone
// Check for newline char
cmp $0x0a,%al
jne i386PrintTextLoop2
incl i386_ScreenPosY
movl $0,i386_ScreenPosX
jmp i386PrintTextLoop
i386PrintTextLoop2:
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
jmp i386PrintTextLoop
i386PrintTextDone:
ret
/************************************************************************/
/* On return EDI = Address of next char in screen memory */
/************************************************************************/
i386PrintTextCalcAddressOfNextChar:
.code32
push %eax
movl $0xB8000,%edi
addl i386_ScreenPosX,%edi
addl i386_ScreenPosX,%edi
movl i386_ScreenPosY,%eax
movl $160,%ecx // 80 columns, 2 bytes per column
mull %ecx
addl %eax,%edi
pop %eax
ret
/************************************************************************/
/* Prints the value in EAX on the screen in hex */
/************************************************************************/
i386PrintHexDword:
.code32
call i386PrintHex1
i386PrintHex1:
call i386PrintHex2
i386PrintHex2:
call i386PrintHex3
i386PrintHex3:
movb $4,%cl
rol %cl,%eax
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
i386PrintHexTable:
.ascii "0123456789ABCDEF"
/************************************************************************/
/* Prints the value in AX on the screen in hex */
/************************************************************************/
i386PrintHexWord:
.code32
call i386PrintHexWord1
i386PrintHexWord1:
call i386PrintHexWord2
i386PrintHexWord2:
movb $4,%cl
rol %cl,%ax
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
/************************************************************************/
/* Prints the value in AL on the screen in hex */
/************************************************************************/
i386PrintHexByte:
.code32
call i386PrintHexByte1
i386PrintHexByte1:
movb $4,%cl
rol %cl,%al
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
/************************************************************************/
EXTERN(i386DivideByZero)
.code32
movl $i386DivideByZeroText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386DebugException)
.code32
movl $i386DebugExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386NMIException)
.code32
movl $i386NMIExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386Breakpoint)
.code32
movl $i386BreakpointText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386Overflow)
.code32
movl $i386OverflowText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386BoundException)
.code32
movl $i386BoundExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386InvalidOpcode)
.code32
movl $i386InvalidOpcodeText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386FPUNotAvailable)
.code32
movl $i386FPUNotAvailableText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386DoubleFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386DoubleFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386CoprocessorSegment)
.code32
movl $i386CoprocessorSegmentText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386InvalidTSS)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386InvalidTSSText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386SegmentNotPresent)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386SegmentNotPresentText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386StackException)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386StackExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386GeneralProtectionFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386GeneralProtectionFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386PageFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386PageFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386CoprocessorError)
.code32
movl $i386CoprocessorErrorText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386AlignmentCheck)
.code32
movl $i386AlignmentCheckText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386MachineCheck)
.code32
movl $i386MachineCheckText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************
* DEBUGGING SUPPORT FUNCTIONS
************************************************************************/
EXTERN(_INSTRUCTION_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00000303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00030303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00010303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0000030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0030030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0010030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x00000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x03000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x01000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x000003c0,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x300003c0,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x100003c0,%eax
movl %eax,%dr7
popl %eax
ret

View File

@@ -1,807 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
* Portions from Linux video.S - Display adapter & video mode setup, version 2.13 (14-May-99)
* Copyright (C) 1995 -- 1999 Martin Mares <mj@ucw.cz>
* Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <video.h>
#include <portio.h>
#include <rtl.h>
#include <debug.h>
typedef struct
{
U8 Signature[4]; // (ret) signature ("VESA")
// (call) VESA 2.0 request signature ("VBE2"), required to receive
// version 2.0 info
U16 VesaVersion; // VESA version number (one-digit minor version -- 0102h = v1.2)
U32 OemNamePtr; // pointer to OEM name
// "761295520" for ATI
U32 Capabilities; // capabilities flags (see #00078)
U32 SupportedModeListPtr; // pointer to list of supported VESA and OEM video modes
// (list of words terminated with FFFFh)
U16 TotalVideoMemory; // total amount of video memory in 64K blocks
// ---VBE v1.x ---
//U8 Reserved[236];
// ---VBE v2.0 ---
U16 OemSoftwareVersion; // OEM software version (BCD, high byte = major, low byte = minor)
U32 VendorNamePtr; // pointer to vendor name
U32 ProductNamePtr; // pointer to product name
U32 ProductRevisionStringPtr; // pointer to product revision string
U16 VBE_AF_Version; // (if capabilities bit 3 set) VBE/AF version (BCD)
// 0100h for v1.0P
U32 AcceleratedModeListPtr; // (if capabilities bit 3 set) pointer to list of supported
// accelerated video modes (list of words terminated with FFFFh)
U8 Reserved[216]; // reserved for VBE implementation
U8 ScratchPad[256]; // OEM scratchpad (for OEM strings, etc.)
} PACKED VESA_SVGA_INFO, *PVESA_SVGA_INFO;
// Bitfields for VESA capabilities:
//
// Bit(s) Description (Table 00078)
// 0 DAC can be switched into 8-bit mode
// 1 non-VGA controller
// 2 programmed DAC with blank bit (i.e. only during blanking interval)
// 3 (VBE v3.0) controller supports hardware stereoscopic signalling
// 3 controller supports VBE/AF v1.0P extensions
// 4 (VBE v3.0) if bit 3 set:
// =0 stereo signalling via external VESA stereo connector
// =1 stereo signalling via VESA EVC connector
// 4 (VBE/AF v1.0P) must call EnableDirectAccess to access framebuffer
// 5 (VBE/AF v1.0P) controller supports hardware mouse cursor
// 6 (VBE/AF v1.0P) controller supports hardware clipping
// 7 (VBE/AF v1.0P) controller supports transparent BitBLT
// 8-31 reserved (0)
// Notes: The list of supported video modes is stored in the reserved
// portion of the SuperVGA information record by some implementations,
// and it may thus be necessary to either copy the mode list or use a
// different buffer for all subsequent VESA calls. Not all of the video
// modes in the list of mode numbers may be supported, e.g. if they require
// more memory than currently installed or are not supported by the
// attached monitor. Check any mode you intend to use through AX=4F01h first..
// The 1.1 VESA document specifies 242 reserved bytes at the end, so the
// buffer should be 262 bytes to ensure that it is not overrun; for v2.0,
// the buffer should be 512 bytes. The S3 specific video modes will most
// likely follow the FFFFh terminator at the end of the standard modes.
// A search must then be made to find them, FFFFh will also terminate this
// second list. In some cases, only a "stub" VBE may be present, supporting
// only AX=4F00h; this case may be assumed if the list of supported video modes
// is empty (consisting of a single word of FFFFh)
VOID BiosSetVideoMode(U32 VideoMode)
{
REGS Regs;
// Int 10h AH=00h
// VIDEO - SET VIDEO MODE
//
// AH = 00h
// AL = desired video mode
// Return:
// AL = video mode flag (Phoenix, AMI BIOS)
// 20h mode > 7
// 30h modes 0-5 and 7
// 3Fh mode 6
// AL = CRT controller mode byte (Phoenix 386 BIOS v1.10)
Regs.b.ah = 0x00;
Regs.b.al = VideoMode;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x8(VOID)
{
REGS Regs;
// Int 10h AX=1112h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x8 DBL-DOT PATTERNS (PS,EGA,VGA)
//
// AX = 1112h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1112;
Regs.b.bl = 0x00;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x14(VOID)
{
REGS Regs;
// Int 10h AX=1111h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM MONOCHROME PATTERNS (PS,EGA,VGA)
//
// AX = 1111h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1111;
Regs.b.bl = 0;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x16(VOID)
{
REGS Regs;
// Int 10h AX=1114h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x16 CHARACTER SET (VGA)
//
// AX = 1114h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1114;
Regs.b.bl = 0;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSelectAlternatePrintScreen(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=20h
// VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - ALTERNATE PRTSC
//
// AH = 12h
// BL = 20h select alternate print screen routine
// Return:
// Nothing
//
// Installs a PrtSc routine from the video card's BIOS to replace the
// default PrtSc handler from the ROM BIOS, which usually does not
// understand screen heights other than 25 lines.
//
// Some adapters disable print-screen instead of enhancing it.
Regs.b.ah = 0x12;
Regs.b.bl = 0x20;
Int386(0x10, &Regs, &Regs);
}
VOID BiosDisableCursorEmulation(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=34h
// VIDEO - ALTERNATE FUNCTION SELECT (VGA) - CURSOR EMULATION
//
// AH = 12h
// BL = 34h
// AL = new state
// 00h enable alphanumeric cursor emulation
// 01h disable alphanumeric cursor emulation
// Return:
// AL = 12h if function supported
//
// Specify whether the BIOS should automatically remap cursor start/end
// according to the current character height in text modes.
Regs.b.ah = 0x12;
Regs.b.bl = 0x34;
Regs.b.al = 0x01;
Int386(0x10, &Regs, &Regs);
}
VOID BiosDefineCursor(U32 StartScanLine, U32 EndScanLine)
{
REGS Regs;
// Int 10h AH=01h
// VIDEO - SET TEXT-MODE CURSOR SHAPE
//
// AH = 01h
// CH = cursor start and options
// CL = bottom scan line containing cursor (bits 0-4)
// Return:
// Nothing
//
// Specify the starting and ending scan lines to be occupied
// by the hardware cursor in text modes.
//
// AMI 386 BIOS and AST Premier 386 BIOS will lock up the
// system if AL is not equal to the current video mode.
//
// Bitfields for cursor start and options:
//
// Bit(s) Description
// 7 should be zero
// 6,5 cursor blink
// (00=normal, 01=invisible, 10=erratic, 11=slow).
// (00=normal, other=invisible on EGA/VGA)
// 4-0 topmost scan line containing cursor
Regs.b.ah = 0x01;
Regs.b.al = 0x03;
Regs.b.ch = StartScanLine;
Regs.b.cl = EndScanLine;
Int386(0x10, &Regs, &Regs);
}
U32 BiosDetectVideoCard(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=10h
// VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - GET EGA INFO
//
// AH = 12h
// BL = 10h
// Return:
// BH = video state
// 00h color mode in effect (I/O port 3Dxh)
// 01h mono mode in effect (I/O port 3Bxh)
// BL = installed memory (00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K)
// CH = feature connector bits
// CL = switch settings
// AH destroyed (at least by Tseng ET4000 BIOS v8.00n)
//
// Installation check;EGA
Regs.b.ah = 0x12;
Regs.b.bl = 0x10;
Int386(0x10, &Regs, &Regs);
// If BL is still equal to 0x10 then there is no EGA/VGA present
if (Regs.b.bl == 0x10)
{
return VIDEOCARD_CGA_OR_OTHER;
}
// Int 10h AX=1A00h
// VIDEO - GET DISPLAY COMBINATION CODE (PS,VGA/MCGA)
//
// AX = 1A00h
// Return:
// AL = 1Ah if function was supported
// BL = active display code
// BH = alternate display code
//
// This function is commonly used to check for the presence of a VGA.
//
// Installation check;VGA
//
// Values for display combination code:
// 00h no display
// 01h monochrome adapter w/ monochrome display
// 02h CGA w/ color display
// 03h reserved
// 04h EGA w/ color display
// 05h EGA w/ monochrome display
// 06h PGA w/ color display
// 07h VGA w/ monochrome analog display
// 08h VGA w/ color analog display
// 09h reserved
// 0Ah MCGA w/ digital color display
// 0Bh MCGA w/ monochrome analog display
// 0Ch MCGA w/ color analog display
// FFh unknown display type
Regs.b.ah = 0x12;
Regs.b.bl = 0x10;
Int386(0x10, &Regs, &Regs);
if (Regs.b.al == 0x1A)
{
return VIDEOCARD_VGA;
}
else
{
return VIDEOCARD_EGA;
}
}
VOID BiosSetVerticalResolution(U32 ScanLines)
{
REGS Regs;
// Int 10h AH=12h BL=30h
// VIDEO - ALTERNATE FUNCTION SELECT (VGA) - SELECT VERTICAL RESOLUTION
//
// AH = 12h
// BL = 30h
// AL = vertical resolution
// 00h 200 scan lines
// 01h 350 scan lines
// 02h 400 scan lines
// Return:
// AL = 12h if function supported
//
// Specifiy the number of scan lines used to display text modes.
//
// The specified resolution will take effect on the next mode set.
Regs.b.ah = 0x12;
Regs.b.bl = 0x30;
Regs.b.al = ScanLines;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSet480ScanLines(VOID)
{
int CRTC;
// Read CRTC port
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
if (CRTC & 1)
{
CRTC = 0x3D4;
}
else
{
CRTC = 0x3B4;
}
// Vertical sync end (also unlocks CR0-7)
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x11);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0C);
// Vertical total
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x06);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0B);
// (vertical) overflow
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x07);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x3E);
// Vertical sync start
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x10);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xEA);
// Vertical display end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
// Vertical blank start
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x15);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xE7);
// Vertical blank end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x16);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x04);
// Misc output register (read)
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
// Preserve clock select bits and color bit
CRTC = (CRTC & 0x0D);
// Set correct sync polarity
CRTC = (CRTC | 0xE2);
// (write)
WRITE_PORT_UCHAR((PUCHAR)0x03C2, CRTC);
}
VOID BiosSetVideoDisplayEnd(VOID)
{
int CRTC;
// Read CRTC port
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
if (CRTC & 1)
{
CRTC = 0x3D4;
}
else
{
CRTC = 0x3B4;
}
// Vertical display end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
}
VOID VideoSetTextCursorPosition(U32 X, U32 Y)
{
REGS Regs;
// Int 10h AH=02h
// VIDEO - SET CURSOR POSITION
//
// AH = 02h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// DH = row (00h is top)
// DL = column (00h is left)
// Return:
// Nothing
Regs.b.ah = 0x02;
Regs.b.bh = 0x00;
Regs.b.dh = Y;
Regs.b.dl = X;
Int386(0x10, &Regs, &Regs);
}
VOID VideoHideTextCursor(VOID)
{
BiosDefineCursor(0x20, 0x00);
}
VOID VideoShowTextCursor(VOID)
{
BiosDefineCursor(0x0D, 0x0E);
}
U32 VideoGetTextCursorPositionX(VOID)
{
REGS Regs;
// Int 10h AH=03h
// VIDEO - GET CURSOR POSITION AND SIZE
//
// AH = 03h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// Return:
// AX = 0000h (Phoenix BIOS)
// CH = start scan line
// CL = end scan line
// DH = row (00h is top)
// DL = column (00h is left)
Regs.b.ah = 0x03;
Regs.b.bh = 0x00;
Int386(0x10, &Regs, &Regs);
return Regs.b.dl;
}
U32 VideoGetTextCursorPositionY(VOID)
{
REGS Regs;
// Int 10h AH=03h
// VIDEO - GET CURSOR POSITION AND SIZE
//
// AH = 03h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// Return:
// AX = 0000h (Phoenix BIOS)
// CH = start scan line
// CL = end scan line
// DH = row (00h is top)
// DL = column (00h is left)
Regs.b.ah = 0x03;
Regs.b.bh = 0x00;
Int386(0x10, &Regs, &Regs);
return Regs.b.dh;
}
VOID BiosVideoDisableBlinkBit(VOID)
{
REGS Regs;
// Int 10h AX=1003h
// VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
//
// AX = 1003h
// BL = new state
// 00h background intensity enabled
// 01h blink enabled
// BH = 00h to avoid problems on some adapters
// Return:
// Nothing
//
// Note: although there is no function to get
// the current status, bit 5 of 0040h:0065h
// indicates the state.
Regs.w.ax = 0x1003;
Regs.w.bx = 0x0000;
Int386(0x10, &Regs, &Regs);
}
VOID BiosVideoEnableBlinkBit(VOID)
{
REGS Regs;
// Int 10h AX=1003h
// VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
//
// AX = 1003h
// BL = new state
// 00h background intensity enabled
// 01h blink enabled
// BH = 00h to avoid problems on some adapters
// Return:
// Nothing
//
// Note: although there is no function to get
// the current status, bit 5 of 0040h:0065h
// indicates the state.
Regs.w.ax = 0x1003;
Regs.w.bx = 0x0001;
Int386(0x10, &Regs, &Regs);
}
U16 BiosIsVesaSupported(VOID)
{
REGS Regs;
PVESA_SVGA_INFO SvgaInfo = (PVESA_SVGA_INFO)BIOSCALLBUFFER;
#ifdef DEBUG
//U16* VideoModes;
//U16 Index;
#endif // defined DEBUG
DbgPrint((DPRINT_UI, "BiosIsVesaSupported()\n"));
RtlZeroMemory(SvgaInfo, sizeof(VESA_SVGA_INFO));
// Make sure we receive version 2.0 info
SvgaInfo->Signature[0] = 'V';
SvgaInfo->Signature[1] = 'B';
SvgaInfo->Signature[2] = 'E';
SvgaInfo->Signature[3] = '2';
// Int 10h AX=4F00h
// VESA SuperVGA BIOS (VBE) - GET SuperVGA INFORMATION
//
// AX = 4F00h
// ES:DI -> buffer for SuperVGA information (see #00077)
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// ES:DI buffer filled
// 01h failed
// ---VBE v2.0---
// 02h function not supported by current hardware configuration
// 03h function invalid in current video mode
//
// Determine whether VESA BIOS extensions are present and the
// capabilities supported by the display adapter
//
// Installation check;VESA SuperVGA
Regs.w.ax = 0x4F00;
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
Int386(0x10, &Regs, &Regs);
DbgPrint((DPRINT_UI, "AL = 0x%x\n", Regs.b.al));
DbgPrint((DPRINT_UI, "AH = 0x%x\n", Regs.b.ah));
if (Regs.w.ax != 0x004F)
{
DbgPrint((DPRINT_UI, "Failed.\n"));
return 0x0000;
}
#ifdef DEBUG
DbgPrint((DPRINT_UI, "Supported.\n"));
DbgPrint((DPRINT_UI, "SvgaInfo->Signature[4] = %c%c%c%c\n", SvgaInfo->Signature[0], SvgaInfo->Signature[1], SvgaInfo->Signature[2], SvgaInfo->Signature[3]));
DbgPrint((DPRINT_UI, "SvgaInfo->VesaVersion = v%d.%d\n", ((SvgaInfo->VesaVersion >> 8) & 0xFF), (SvgaInfo->VesaVersion & 0xFF)));
DbgPrint((DPRINT_UI, "SvgaInfo->OemNamePtr = 0x%x\n", SvgaInfo->OemNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->Capabilities = 0x%x\n", SvgaInfo->Capabilities));
DbgPrint((DPRINT_UI, "SvgaInfo->VideoMemory = %dK\n", SvgaInfo->TotalVideoMemory * 64));
DbgPrint((DPRINT_UI, "---VBE v2.0 ---\n"));
DbgPrint((DPRINT_UI, "SvgaInfo->OemSoftwareVersion = v%d.%d\n", ((SvgaInfo->OemSoftwareVersion >> 8) & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 12) & 0x0F) * 10), (SvgaInfo->OemSoftwareVersion & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 4) & 0x0F) * 10)));
DbgPrint((DPRINT_UI, "SvgaInfo->VendorNamePtr = 0x%x\n", SvgaInfo->VendorNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->ProductNamePtr = 0x%x\n", SvgaInfo->ProductNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->ProductRevisionStringPtr = 0x%x\n", SvgaInfo->ProductRevisionStringPtr));
DbgPrint((DPRINT_UI, "SvgaInfo->VBE/AF Version = 0x%x (BCD WORD)\n", SvgaInfo->VBE_AF_Version));
//DbgPrint((DPRINT_UI, "\nSupported VESA and OEM video modes:\n"));
//VideoModes = (U16*)SvgaInfo->SupportedModeListPtr;
//for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
//{
// DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
//}
//if (SvgaInfo->VesaVersion >= 0x0200)
//{
// DbgPrint((DPRINT_UI, "\nSupported accelerated video modes (VESA v2.0):\n"));
// VideoModes = (U16*)SvgaInfo->AcceleratedModeListPtr;
// for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
// {
// DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
// }
//}
DbgPrint((DPRINT_UI, "\n"));
//getch();
#endif // defined DEBUG
return SvgaInfo->VesaVersion;
}
BOOL BiosVesaSetBank(U16 Bank)
{
REGS Regs;
// Int 10h AX=4F05h
// VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL
//
// AX = 4F05h
// BH = subfunction
// 00h select video memory window
// 01h get video memory window
// DX = window address in video memory (in granularity units)
// Return:
// DX = window address in video memory (in gran. units)
// BL = window number
// 00h window A
// 01h window B.
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// 01h failed
Regs.w.ax = 0x4F05;
Regs.w.bx = 0x0000;
Regs.w.dx = Bank;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
return TRUE;
}
BOOL BiosVesaSetVideoMode(U16 Mode)
{
REGS Regs;
// Int 10h AX=4F02h
// VESA SuperVGA BIOS - SET SuperVGA VIDEO MODE
//
// AX = 4F02h
// BX = new video mode
// ES:DI -> (VBE 3.0+) CRTC information block, bit mode bit 11 set
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// 01h failed
//
// Values for VESA video mode:
// 00h-FFh OEM video modes (see #00010 at AH=00h)
// 100h 640x400x256
// 101h 640x480x256
// 102h 800x600x16
// 103h 800x600x256
// 104h 1024x768x16
// 105h 1024x768x256
// 106h 1280x1024x16
// 107h 1280x1024x256
// 108h 80x60 text
// 109h 132x25 text
// 10Ah 132x43 text
// 10Bh 132x50 text
// 10Ch 132x60 text
// ---VBE v1.2+ ---
// 10Dh 320x200x32K
// 10Eh 320x200x64K
// 10Fh 320x200x16M
// 110h 640x480x32K
// 111h 640x480x64K
// 112h 640x480x16M
// 113h 800x600x32K
// 114h 800x600x64K
// 115h 800x600x16M
// 116h 1024x768x32K
// 117h 1024x768x64K
// 118h 1024x768x16M
// 119h 1280x1024x32K (1:5:5:5)
// 11Ah 1280x1024x64K (5:6:5)
// 11Bh 1280x1024x16M
// ---VBE 2.0+ ---
// 120h 1600x1200x256
// 121h 1600x1200x32K
// 122h 1600x1200x64K
// 81FFh special full-memory access mode
// Notes: The special mode 81FFh preserves the contents of the video memory and gives
// access to all of the memory; VESA recommends that the special mode be a packed-pixel
// mode. For VBE 2.0+, it is required that the VBE implement the mode, but not place it
// in the list of available modes (mode information for this mode can be queried
// directly, however).. As of VBE 2.0, VESA will no longer define video mode numbers
Regs.w.ax = 0x4F02;
Regs.w.bx = Mode;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
return TRUE;
}
BOOL BiosVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformation)
{
REGS Regs;
RtlZeroMemory((PVOID)BIOSCALLBUFFER, 256);
// VESA SuperVGA BIOS - GET SuperVGA MODE INFORMATION
// AX = 4F01h
// CX = SuperVGA video mode (see #04082 for bitfields)
// ES:DI -> 256-byte buffer for mode information (see #00079)
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// ES:DI buffer filled
// 01h failed
//
// Desc: Determine the attributes of the specified video mode
//
// Note: While VBE 1.1 and higher will zero out all unused bytes
// of the buffer, v1.0 did not, so applications that want to be
// backward compatible should clear the buffer before calling
Regs.w.ax = 0x4F01;
Regs.w.cx = Mode;
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
RtlCopyMemory(ModeInformation, (PVOID)BIOSCALLBUFFER, sizeof(SVGA_MODE_INFORMATION));
DbgPrint((DPRINT_UI, "\n"));
DbgPrint((DPRINT_UI, "BiosVesaGetSVGAModeInformation() mode 0x%x\n", Mode));
DbgPrint((DPRINT_UI, "ModeAttributes = 0x%x\n", ModeInformation->ModeAttributes));
DbgPrint((DPRINT_UI, "WindowAttributesA = 0x%x\n", ModeInformation->WindowAttributesA));
DbgPrint((DPRINT_UI, "WindowAttributesB = 0x%x\n", ModeInformation->WindowsAttributesB));
DbgPrint((DPRINT_UI, "WindowGranularity = %dKB\n", ModeInformation->WindowGranularity));
DbgPrint((DPRINT_UI, "WindowSize = %dKB\n", ModeInformation->WindowSize));
DbgPrint((DPRINT_UI, "WindowAStartSegment = 0x%x\n", ModeInformation->WindowAStartSegment));
DbgPrint((DPRINT_UI, "WindowBStartSegment = 0x%x\n", ModeInformation->WindowBStartSegment));
DbgPrint((DPRINT_UI, "WindowPositioningFunction = 0x%x\n", ModeInformation->WindowPositioningFunction));
DbgPrint((DPRINT_UI, "BytesPerScanLine = %d\n", ModeInformation->BytesPerScanLine));
DbgPrint((DPRINT_UI, "WidthInPixels = %d\n", ModeInformation->WidthInPixels));
DbgPrint((DPRINT_UI, "HeightInPixels = %d\n", ModeInformation->HeightInPixels));
DbgPrint((DPRINT_UI, "CharacterWidthInPixels = %d\n", ModeInformation->CharacterWidthInPixels));
DbgPrint((DPRINT_UI, "CharacterHeightInPixels = %d\n", ModeInformation->CharacterHeightInPixels));
DbgPrint((DPRINT_UI, "NumberOfMemoryPlanes = %d\n", ModeInformation->NumberOfMemoryPlanes));
DbgPrint((DPRINT_UI, "BitsPerPixel = %d\n", ModeInformation->BitsPerPixel));
DbgPrint((DPRINT_UI, "NumberOfBanks = %d\n", ModeInformation->NumberOfBanks));
DbgPrint((DPRINT_UI, "MemoryModel = %d\n", ModeInformation->MemoryModel));
DbgPrint((DPRINT_UI, "BankSize = %d\n", ModeInformation->BankSize));
DbgPrint((DPRINT_UI, "NumberOfImagePlanes = %d\n", ModeInformation->NumberOfImagePanes));
DbgPrint((DPRINT_UI, "---VBE v1.2+ ---\n"));
DbgPrint((DPRINT_UI, "RedMaskSize = %d\n", ModeInformation->RedMaskSize));
DbgPrint((DPRINT_UI, "RedMaskPosition = %d\n", ModeInformation->RedMaskPosition));
DbgPrint((DPRINT_UI, "GreenMaskSize = %d\n", ModeInformation->GreenMaskSize));
DbgPrint((DPRINT_UI, "GreenMaskPosition = %d\n", ModeInformation->GreenMaskPosition));
DbgPrint((DPRINT_UI, "BlueMaskSize = %d\n", ModeInformation->BlueMaskSize));
DbgPrint((DPRINT_UI, "BlueMaskPosition = %d\n", ModeInformation->BlueMaskPosition));
DbgPrint((DPRINT_UI, "ReservedMaskSize = %d\n", ModeInformation->ReservedMaskSize));
DbgPrint((DPRINT_UI, "ReservedMaskPosition = %d\n", ModeInformation->ReservedMaskPosition));
DbgPrint((DPRINT_UI, "\n"));
return TRUE;
}

View File

@@ -1,155 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
Int386_REGS:
Int386_eax:
.long 0
Int386_ebx:
.long 0
Int386_ecx:
.long 0
Int386_edx:
.long 0
Int386_esi:
.long 0
Int386_edi:
.long 0
Int386_ds:
.word 0
Int386_es:
.word 0
Int386_fs:
.word 0
Int386_gs:
.word 0
Int386_eflags:
.long 0
Int386_vector:
.long 0
Int386_regsin:
.long 0
Int386_regsout:
.long 0
/*
* int Int386(int ivec, REGS* in, REGS* out);
*/
EXTERN(_Int386)
.code32
/* Get the function parameters */
movl 0x04(%esp),%eax
movl %eax,Int386_vector
movb %al,Int386_vector_opcode
movl 0x08(%esp),%eax
movl %eax,Int386_regsin
movl 0x0c(%esp),%eax
movl %eax,Int386_regsout
pushal
/* Copy the input regs to our variables */
movl $Int386_REGS,%edi
movl Int386_regsin,%esi
movl $0x24,%ecx
rep
movsb
call switch_to_real
.code16
/* Setup the registers */
movw %cs:Int386_ds,%ax
movw %ax,%ds /* DS register */
movw %cs:Int386_es,%ax
movw %ax,%es /* ES register */
movw %cs:Int386_fs,%ax
movw %ax,%fs /* FS register */
movw %cs:Int386_gs,%ax
movw %ax,%gs /* GS register */
movl %cs:Int386_eax,%eax /* EAX register */
movl %cs:Int386_ebx,%ebx /* EBX register */
movl %cs:Int386_ecx,%ecx /* ECX register */
movl %cs:Int386_edx,%edx /* EDX register */
movl %cs:Int386_esi,%esi /* ESI register */
movl %cs:Int386_edi,%edi /* EDI register */
/* Do not set the flags register */
/* only return its value in regsout */
//pushl Int386_eflags
//popfl /* EFLAGS register */
/* Call the interrupt vector */
/*int Int386_vector*/
Int386_int_opcode:
.byte 0xcd
Int386_vector_opcode:
.byte 0x00
/* Save the registers */
movl %eax,%cs:Int386_eax /* EAX register */
movl %ebx,%cs:Int386_ebx /* EBX register */
movl %ecx,%cs:Int386_ecx /* ECX register */
movl %edx,%cs:Int386_edx /* EDX register */
movl %esi,%cs:Int386_esi /* ESI register */
movl %edi,%cs:Int386_edi /* EDI register */
movw %ds,%ax /* DS register */
movw %ax,%cs:Int386_ds
movw %es,%ax /* ES register */
movw %ax,%cs:Int386_es
movw %fs,%ax /* FS register */
movw %ax,%cs:Int386_fs
movw %gs,%ax /* GS register */
movw %ax,%cs:Int386_gs
pushf
popw %cs:Int386_eflags /* EFLAGS register */
call switch_to_prot
.code32
/* Copy the variables to the output regs */
movl $Int386_REGS,%esi
movl Int386_regsout,%edi
movl $0x24,%ecx
rep
movsb
popal
/* Get return value */
movl Int386_eax,%eax
ret

View File

@@ -1,81 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
.code32
EXTERN(_BootNewLinuxKernel)
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x9000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x9000,%sp
ljmpl $0x9020,$0x0000
.code32
/*
* VOID BootOldLinuxKernel(ULONG KernelSize);
*/
EXTERN(_BootOldLinuxKernel)
/* First we have to copy the kernel down from 0x100000 to 0x10000 */
/* The reason we can overwrite low memory is because this code */
/* executes between 0000:8000 and 0000:FFFF. That leaves space for */
/* 32k of code before we start interfering with Linux kernel address space. */
/* Get KernelSize in ECX and move the kernel down */
movl 0x04(%esp),%ecx
movl $0x100000,%esi
movl $0x10000,%edi
rep movsb
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x9000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x9000,%sp
ljmpl $0x9020,$0x0000

View File

@@ -1,262 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
#include <multiboot.h>
/*
* Here we assume the kernel is loaded at 1mb
* This boots the kernel
*/
.code32
EXTERN(_boot_reactos)
call switch_to_real
.code16
/* Save cursor position */
movw $3,%ax //! Reset video mode
int $0x10
movb $10,%bl
movb $12,%ah
int $0x10
movw $0x1112,%ax // Use 8x8 font
xorb %bl,%bl
int $0x10
movw $0x1200,%ax // Use alternate print screen
movb $0x20,%bl
int $0x10
movb $1,%ah // Define cursor (scan lines 6 to 7)
movw $0x0607,%cx
int $0x10
movb $1,%ah
movw $0x600,%cx
int $0x10
movb $6,%ah // Scroll active page up
movb $0x32,%al // Clear 25 lines
movw $0,%cx // Upper left of scroll
movw $0x314F,%dx // Lower right of scroll
movb $(1*0x00+0),%bh // Use normal attribute on blanked line
int $0x10 // Video-IO
movw $0,%dx
movb $0,%dh
movb $2,%ah
movb $0,%bh
int $0x10
movw $0,%dx
movb $0,%dh
movb $2,%ah
movb $0,%bh
int $0x10
call _multi_boot
// Should never get here
cli
hlt
/*
* After you have setup the _mb_header and _mb_info structures
* then call this routine to transfer control to the kernel.
* This routine must be entered in 16-bit mode.
*/
.code16
EXTERN(_multi_boot)
cli
/*
* Setup various variables
*/
movw %ds,%bx
movzwl %bx,%eax
shll $4,%eax
addl %eax,kernel_gdtbase
/*
* Load the absolute address of the multiboot information structure
*/
movl $_mb_info,%ebx
/*
* load gdt
*/
lgdt kernel_gdtptr
/*
* Enter pmode and clear prefetch queue
*/
movl %cr0,%eax
orl $0x10001,%eax
movl %eax,%cr0
jmp next
next:
/*
* NOTE: This must be position independant (no references to
* non absolute variables)
*/
/*
* Initalize segment registers
*/
movw $KERNEL_DS,%ax
movw %ax,%ds
movw %ax,%ss
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
/*
* Initalize eflags
*/
pushl $0
popfl
/*
* Load the multiboot magic value into eax
*/
movl $0x2badb002,%eax
/*
* Jump to start of 32 bit code at 0xc0000000 + 0x1000
*/
pushl $KERNEL_CS
pushl _mb_entry_addr
lretl
//ljmpl $KERNEL_CS,$(0x0200000+0x1000)
//ljmpl $KERNEL_CS,(_mb_entry_addr)
//ljmpl $KERNEL_CS,$(KERNEL_BASE+0x1000)
.p2align 2 /* force 4-byte alignment */
kernel_gdt:
.word 0 // Zero descriptor
.word 0
.word 0
.word 0
.word 0xffff // Kernel code descriptor
.word 0x0000 //
.word 0x9a00 // base 0h limit 4gb
.word 0x00cf
.word 0xffff // Kernel data descriptor
.word 0x0000 //
.word 0x9200 // base 0h limit 4gb
.word 0x00cf
kernel_gdtptr:
.word (3*8)-1 /* Limit */
kernel_gdtbase:
.long kernel_gdt /* Base Address */
EXTERN(_mb_header)
_mb_magic:
.long 0 // unsigned long magic;
_mb_flags:
.long 0 // unsigned long flags;
_mb_checksum:
.long 0 // unsigned long checksum;
_mb_header_addr:
.long 0 // unsigned long header_addr;
_mb_load_addr:
.long 0 // unsigned long load_addr;
_mb_load_end_addr:
.long 0 // unsigned long load_end_addr;
_mb_bss_end_addr:
.long 0 // unsigned long bss_end_addr;
_mb_entry_addr:
.long 0 // unsigned long entry_addr;
//
// Boot information structure
//
EXTERN(_mb_info)
_multiboot_flags:
.long 0
_multiboot_mem_lower:
.long 0
_multiboot_mem_upper:
.long 0
_multiboot_boot_device:
.long 0
_multiboot_cmdline:
.long 0
_multiboot_mods_count:
.long 0
_multiboot_mods_addr:
.long 0
_multiboot_syms:
.rept 12
.byte 0
.endr
_multiboot_mmap_length:
.long 0
_multiboot_mmap_addr:
.long 0
_multiboot_drives_count:
.long 0
_multiboot_drives_addr:
.long 0
_multiboot_config_table:
.long 0
_multiboot_boot_loader_name:
.long 0
_multiboot_apm_table:
.long 0
EXTERN(_multiboot_modules)
.rept (64 * /*multiboot_module_size*/ 16)
.byte 0
.endr
EXTERN(_multiboot_module_strings)
.rept (64*256)
.byte 0
.endr
EXTERN(_multiboot_memory_map_descriptor_size)
.long 0
EXTERN(_multiboot_memory_map)
.rept (32 * /*sizeof(memory_map_t)*/24)
.byte 0
.endr
EXTERN(_multiboot_kernel_cmdline)
.rept 255
.byte 0
.endr

View File

@@ -1,183 +0,0 @@
/* $Id: portio.c,v 1.1 2003/01/19 01:03:58 bpalmer Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/portio.c
* PURPOSE: Port I/O functions
* PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
* UPDATE HISTORY:
* Created 18/10/99
*/
//#include <ddk/ntddk.h>
#include <freeldr.h>
/* FUNCTIONS ****************************************************************/
/*
* This file contains the definitions for the x86 IO instructions
* inb/inw/inl/outb/outw/outl and the "string versions" of the same
* (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
* versions of the single-IO instructions (inb_p/inw_p/..).
*
* This file is not meant to be obfuscating: it's just complicated
* to (a) handle it all in a way that makes gcc able to optimize it
* as well as possible and (b) trying to avoid writing the same thing
* over and over again with slight variations and possibly making a
* mistake somewhere.
*/
/*
* Thanks to James van Artsdalen for a better timing-fix than
* the two short jumps: using outb's to a nonexistent port seems
* to guarantee better timings even on fast machines.
*
* On the other hand, I'd like to be sure of a non-existent port:
* I feel a bit unsafe about using 0x80 (should be safe, though)
*
* Linus
*/
#ifdef SLOW_IO_BY_JUMPING
#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:")
#else
#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80")
#endif
#ifdef REALLY_SLOW_IO
#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; }
#else
#define SLOW_DOWN_IO __SLOW_DOWN_IO
#endif
VOID /*STDCALL*/
READ_PORT_BUFFER_UCHAR (PUCHAR Port,
PUCHAR Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insb\n\t"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_USHORT (U16* Port,
U16* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insw"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_ULONG (U32* Port,
U32* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insl"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
UCHAR /*STDCALL*/
READ_PORT_UCHAR (PUCHAR Port)
{
UCHAR Value;
__asm__("inb %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
U16 /*STDCALL*/
READ_PORT_USHORT (U16* Port)
{
U16 Value;
__asm__("inw %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
U32 /*STDCALL*/
READ_PORT_ULONG (U32* Port)
{
U32 Value;
__asm__("inl %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_UCHAR (PUCHAR Port,
PUCHAR Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsb"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_USHORT (U16* Port,
U16* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsw"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_ULONG (U32* Port,
U32* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsl"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_UCHAR (PUCHAR Port,
UCHAR Value)
{
__asm__("outb %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
VOID /*STDCALL*/
WRITE_PORT_USHORT (U16* Port,
U16 Value)
{
__asm__("outw %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
VOID /*STDCALL*/
WRITE_PORT_ULONG (U32* Port,
U32 Value)
{
__asm__("outl %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
/* EOF */

View File

@@ -1,214 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <fs.h>
#include <reactos.h>
#include <ui.h>
#include <arch.h>
#include <miscboot.h>
#include <linux.h>
#include <mm.h>
#include <inifile.h>
#include <debug.h>
#include <options.h>
#include <oslist.h>
#include <video.h>
#include <bootmgr.h>
#include <drivemap.h>
#include <keycodes.h>
VOID RunLoader(VOID)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
U32 OperatingSystemCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
U32 DefaultOperatingSystem;
S32 TimeOut;
U32 SelectedOperatingSystem;
if (!IniFileInitialize())
{
printf("Press any key to reboot.\n");
getch();
return;
}
if (!IniOpenSection("FreeLoader", &SectionId))
{
printf("Section [FreeLoader] not found in freeldr.ini.\n");
getch();
return;
}
if (!UiInitialize())
{
printf("Press any key to reboot.\n");
getch();
return;
}
if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
{
UiMessageBox("Press ENTER to reboot.\n");
goto reboot;
}
if (OperatingSystemCount == 0)
{
UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
goto reboot;
}
DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount);
TimeOut = GetTimeOut();
//
// Find all the message box settings and run them
//
UiShowMessageBoxesInSection("FreeLoader");
for (;;)
{
// Redraw the backdrop
UiDrawBackdrop();
// Show the operating system list menu
if (!UiDisplayMenu(OperatingSystemDisplayNames, OperatingSystemCount, DefaultOperatingSystem, TimeOut, &SelectedOperatingSystem, FALSE, MainBootMenuKeyPressFilter))
{
UiMessageBox("Press ENTER to reboot.\n");
goto reboot;
}
TimeOut = -1;
DefaultOperatingSystem = SelectedOperatingSystem;
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemSectionNames[SelectedOperatingSystem], &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemSectionNames[SelectedOperatingSystem]);
UiMessageBox(SettingName);
continue;
}
// Try to read the boot type
if (!IniReadSettingByName(SectionId, "BootType", SettingValue, 80))
{
sprintf(SettingName, "BootType= line not found in section [%s] in freeldr.ini.\n", OperatingSystemSectionNames[SelectedOperatingSystem]);
UiMessageBox(SettingName);
continue;
}
// Install the drive mapper according to this sections drive mappings
DriveMapMapDrivesInSection(OperatingSystemSectionNames[SelectedOperatingSystem]);
if (stricmp(SettingValue, "ReactOS") == 0)
{
LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Linux") == 0)
{
LoadAndBootLinux(OperatingSystemSectionNames[SelectedOperatingSystem], OperatingSystemDisplayNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "BootSector") == 0)
{
LoadAndBootBootSector(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Partition") == 0)
{
LoadAndBootPartition(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Drive") == 0)
{
LoadAndBootDrive(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
}
reboot:
UiUnInitialize("Rebooting...");
return;
}
U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount)
{
UCHAR DefaultOSText[80];
U32 SectionId;
U32 DefaultOS = 0;
U32 Idx;
if (!IniOpenSection("FreeLoader", &SectionId))
{
return 0;
}
if (IniReadSettingByName(SectionId, "DefaultOS", DefaultOSText, 80))
{
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
if (stricmp(DefaultOSText, OperatingSystemList[Idx]) == 0)
{
DefaultOS = Idx;
break;
}
}
}
return DefaultOS;
}
S32 GetTimeOut(VOID)
{
UCHAR TimeOutText[20];
U32 TimeOut;
U32 SectionId;
if (!IniOpenSection("FreeLoader", &SectionId))
{
return -1;
}
if (IniReadSettingByName(SectionId, "TimeOut", TimeOutText, 20))
{
TimeOut = atoi(TimeOutText);
}
else
{
TimeOut = -1;
}
return TimeOut;
}
BOOL MainBootMenuKeyPressFilter(U32 KeyPress)
{
if (KeyPress == KEY_F8)
{
DoOptionsMenu();
return TRUE;
}
// We didn't handle the key
return FALSE;
}

View File

@@ -1,262 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "cm.h"
#include <mm.h>
#include <disk.h>
#include <rtl.h>
#include <debug.h>
#include <arch.h>
// Returns a pointer to a CACHE_BLOCK structure
// Adds the block to the cache manager block list
// in cache memory if it isn't already there
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalGetBlockPointer() BlockNumber = %d\n", BlockNumber));
CacheBlock = CacheInternalFindBlock(CacheDrive, BlockNumber);
if (CacheBlock != NULL)
{
DbgPrint((DPRINT_CACHE, "Cache hit! BlockNumber: %d CacheBlock->BlockNumber: %d\n", BlockNumber, CacheBlock->BlockNumber));
return CacheBlock;
}
DbgPrint((DPRINT_CACHE, "Cache miss! BlockNumber: %d\n", BlockNumber));
CacheBlock = CacheInternalAddBlockToCache(CacheDrive, BlockNumber);
// Optimize the block list so it has a LRU structure
CacheInternalOptimizeBlockList(CacheDrive, CacheBlock);
return CacheBlock;
}
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalFindBlock() BlockNumber = %d\n", BlockNumber));
//
// Make sure the block list has entries before I start searching it.
//
if (!RtlListIsEmpty((PLIST_ITEM)CacheDrive->CacheBlockHead))
{
//
// Search the list and find the BIOS drive number
//
CacheBlock = CacheDrive->CacheBlockHead;
while (CacheBlock != NULL)
{
//
// We found the block, so return it
//
if (CacheBlock->BlockNumber == BlockNumber)
{
//
// Increment the blocks access count
//
CacheBlock->AccessCount++;
return CacheBlock;
}
CacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlock);
}
}
return NULL;
}
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalAddBlockToCache() BlockNumber = %d\n", BlockNumber));
// Check the size of the cache so we don't exceed our limits
CacheInternalCheckCacheSizeLimits(CacheDrive);
// We will need to add the block to the
// drive's list of cached blocks. So allocate
// the block memory.
CacheBlock = MmAllocateMemory(sizeof(CACHE_BLOCK));
if (CacheBlock == NULL)
{
return NULL;
}
// Now initialize the structure and
// allocate room for the block data
RtlZeroMemory(CacheBlock, sizeof(CACHE_BLOCK));
CacheBlock->BlockNumber = BlockNumber;
CacheBlock->BlockData = MmAllocateMemory(CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
if (CacheBlock->BlockData ==NULL)
{
MmFreeMemory(CacheBlock);
return NULL;
}
// Now try to read in the block
if (!DiskReadLogicalSectors(CacheDrive->DriveNumber, (BlockNumber * CacheDrive->BlockSize), CacheDrive->BlockSize, (PVOID)DISKREADBUFFER))
{
MmFreeMemory(CacheBlock->BlockData);
MmFreeMemory(CacheBlock);
return NULL;
}
RtlCopyMemory(CacheBlock->BlockData, (PVOID)DISKREADBUFFER, CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
// Add it to our list of blocks managed by the cache
if (CacheDrive->CacheBlockHead == NULL)
{
CacheDrive->CacheBlockHead = CacheBlock;
}
else
{
RtlListInsertTail((PLIST_ITEM)CacheDrive->CacheBlockHead, (PLIST_ITEM)CacheBlock);
}
// Update the cache data
CacheBlockCount++;
CacheSizeCurrent = CacheBlockCount * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
CacheInternalDumpBlockList(CacheDrive);
return CacheBlock;
}
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive)
{
PCACHE_BLOCK CacheBlockToFree;
DbgPrint((DPRINT_CACHE, "CacheInternalFreeBlock()\n"));
// Get a pointer to the last item in the block list
// that isn't forced to be in the cache and remove
// it from the list
CacheBlockToFree = (PCACHE_BLOCK)RtlListGetTail((PLIST_ITEM)CacheDrive->CacheBlockHead);
while (CacheBlockToFree != NULL && CacheBlockToFree->LockedInCache == TRUE)
{
CacheBlockToFree = (PCACHE_BLOCK)RtlListGetPrevious((PLIST_ITEM)CacheBlockToFree);
}
// No blocks left in cache that can be freed
// so just return
if (CacheBlockToFree == NULL)
{
return FALSE;
}
//
// If we are freeing the head of the list then update it's pointer
//
if (CacheBlockToFree == CacheDrive->CacheBlockHead)
{
CacheDrive->CacheBlockHead = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlockToFree);
}
RtlListRemoveEntry((PLIST_ITEM)CacheBlockToFree);
// Free the block memory and the block structure
MmFreeMemory(CacheBlockToFree->BlockData);
MmFreeMemory(CacheBlockToFree);
// Update the cache data
CacheBlockCount--;
CacheSizeCurrent = CacheBlockCount * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
return TRUE;
}
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive)
{
U32 NewCacheSize;
DbgPrint((DPRINT_CACHE, "CacheInternalCheckCacheSizeLimits()\n"));
// Calculate the size of the cache if we added a block
NewCacheSize = (CacheBlockCount + 1) * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
// Check the new size against the cache size limit
if (NewCacheSize > CacheSizeLimit)
{
CacheInternalFreeBlock(CacheDrive);
CacheInternalDumpBlockList(CacheDrive);
}
}
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive)
{
PCACHE_BLOCK CacheBlock;
DbgPrint((DPRINT_CACHE, "Dumping block list for BIOS drive 0x%x.\n", CacheDrive->DriveNumber));
DbgPrint((DPRINT_CACHE, "Cylinders: %d.\n", CacheDrive->DriveGeometry.Cylinders));
DbgPrint((DPRINT_CACHE, "Heads: %d.\n", CacheDrive->DriveGeometry.Heads));
DbgPrint((DPRINT_CACHE, "Sectors: %d.\n", CacheDrive->DriveGeometry.Sectors));
DbgPrint((DPRINT_CACHE, "BytesPerSector: %d.\n", CacheDrive->DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "BlockSize: %d.\n", CacheDrive->BlockSize));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d.\n", CacheSizeLimit));
DbgPrint((DPRINT_CACHE, "CacheSizeCurrent: %d.\n", CacheSizeCurrent));
DbgPrint((DPRINT_CACHE, "CacheBlockCount: %d.\n", CacheBlockCount));
DbgPrint((DPRINT_CACHE, "Dumping %d cache blocks.\n", RtlListCountEntries((PLIST_ITEM)CacheDrive->CacheBlockHead)));
CacheBlock = CacheDrive->CacheBlockHead;
while (CacheBlock != NULL)
{
DbgPrint((DPRINT_CACHE, "Cache Block: CacheBlock: 0x%x\n", CacheBlock));
DbgPrint((DPRINT_CACHE, "Cache Block: Block Number: %d\n", CacheBlock->BlockNumber));
DbgPrint((DPRINT_CACHE, "Cache Block: Access Count: %d\n", CacheBlock->AccessCount));
DbgPrint((DPRINT_CACHE, "Cache Block: Block Data: 0x%x\n", CacheBlock->BlockData));
DbgPrint((DPRINT_CACHE, "Cache Block: Locked In Cache: %d\n", CacheBlock->LockedInCache));
if (CacheBlock->BlockData == NULL)
{
BugCheck((DPRINT_CACHE, "What the heck?!?\n"));
}
CacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlock);
}
}
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock)
{
DbgPrint((DPRINT_CACHE, "CacheInternalOptimizeBlockList()\n"));
// Don't do this if this block is already at the head of the list
if (CacheBlock != CacheDrive->CacheBlockHead)
{
// Remove this item from the block list
RtlListRemoveEntry((PLIST_ITEM)CacheBlock);
// Re-insert it at the head of the list
RtlListInsertHead((PLIST_ITEM)CacheDrive->CacheBlockHead, (PLIST_ITEM)CacheBlock);
// Update the head pointer
CacheDrive->CacheBlockHead = CacheBlock;
}
}

View File

@@ -1,325 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "cm.h"
#include <mm.h>
#include <disk.h>
#include <rtl.h>
#include <debug.h>
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal data
//
///////////////////////////////////////////////////////////////////////////////////////
CACHE_DRIVE CacheManagerDrive;
BOOL CacheManagerInitialized = FALSE;
BOOL CacheManagerDataInvalid = FALSE;
U32 CacheBlockCount = 0;
U32 CacheSizeLimit = 0;
U32 CacheSizeCurrent = 0;
BOOL CacheInitializeDrive(U32 DriveNumber)
{
PCACHE_BLOCK NextCacheBlock;
// If we already have a cache for this drive then
// by all means lets keep it, unless it is a removable
// drive, in which case we'll invalidate the cache
if ((CacheManagerInitialized == TRUE) &&
(DriveNumber == CacheManagerDrive.DriveNumber) &&
(DriveNumber >= 0x80) &&
(CacheManagerDataInvalid != TRUE))
{
return TRUE;
}
CacheManagerDataInvalid = FALSE;
//
// If we have already been initialized then free
// the old data
//
if (CacheManagerInitialized)
{
CacheManagerInitialized = FALSE;
DbgPrint((DPRINT_CACHE, "CacheBlockCount: %d\n", CacheBlockCount));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d\n", CacheSizeLimit));
DbgPrint((DPRINT_CACHE, "CacheSizeCurrent: %d\n", CacheSizeCurrent));
//
// Loop through and free the cache blocks
//
while (CacheManagerDrive.CacheBlockHead != NULL)
{
NextCacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheManagerDrive.CacheBlockHead);
MmFreeMemory(CacheManagerDrive.CacheBlockHead->BlockData);
MmFreeMemory(CacheManagerDrive.CacheBlockHead);
CacheManagerDrive.CacheBlockHead = NextCacheBlock;
}
}
// Initialize the structure
RtlZeroMemory(&CacheManagerDrive, sizeof(CACHE_DRIVE));
CacheManagerDrive.DriveNumber = DriveNumber;
if (!DiskGetDriveGeometry(DriveNumber, &CacheManagerDrive.DriveGeometry))
{
return FALSE;
}
// Get the number of sectors in each cache block
CacheManagerDrive.BlockSize = DiskGetCacheableBlockCount(DriveNumber);
CacheBlockCount = 0;
CacheSizeLimit = GetSystemMemorySize() / 8;
CacheSizeCurrent = 0;
if (CacheSizeLimit < (64 * 1024))
{
CacheSizeLimit = (64 * 1024);
}
CacheManagerInitialized = TRUE;
DbgPrint((DPRINT_CACHE, "Initializing BIOS drive 0x%x.\n", DriveNumber));
DbgPrint((DPRINT_CACHE, "Cylinders: %d.\n", CacheManagerDrive.DriveGeometry.Cylinders));
DbgPrint((DPRINT_CACHE, "Heads: %d.\n", CacheManagerDrive.DriveGeometry.Heads));
DbgPrint((DPRINT_CACHE, "Sectors: %d.\n", CacheManagerDrive.DriveGeometry.Sectors));
DbgPrint((DPRINT_CACHE, "BytesPerSector: %d.\n", CacheManagerDrive.DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "BlockSize: %d.\n", CacheManagerDrive.BlockSize));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d.\n", CacheSizeLimit));
return TRUE;
}
VOID CacheInvalidateCacheData(VOID)
{
CacheManagerDataInvalid = TRUE;
}
BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer)
{
PCACHE_BLOCK CacheBlock;
U32 StartBlock;
U32 SectorOffsetInStartBlock;
U32 CopyLengthInStartBlock;
U32 EndBlock;
U32 SectorOffsetInEndBlock;
U32 BlockCount;
U32 Idx;
DbgPrint((DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
//
// Caculate which blocks we must cache
//
StartBlock = StartSector / CacheManagerDrive.BlockSize;
SectorOffsetInStartBlock = StartSector % CacheManagerDrive.BlockSize;
CopyLengthInStartBlock = (SectorCount > (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) : SectorCount;
EndBlock = (StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize;
SectorOffsetInEndBlock = (StartSector + SectorCount) % CacheManagerDrive.BlockSize;
BlockCount = (EndBlock - StartBlock) + 1;
DbgPrint((DPRINT_CACHE, "StartBlock: %d SectorOffsetInStartBlock: %d CopyLengthInStartBlock: %d EndBlock: %d SectorOffsetInEndBlock: %d BlockCount: %d\n", StartBlock, SectorOffsetInStartBlock, CopyLengthInStartBlock, EndBlock, SectorOffsetInEndBlock, BlockCount));
//
// Read the first block into the buffer
//
if (BlockCount > 0)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, StartBlock);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
(CacheBlock->BlockData + (SectorOffsetInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)),
(CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "1 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, (CacheBlock->BlockData + (SectorOffsetInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)), (CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)));
//
// Update the buffer address
//
Buffer += (CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector);
//
// Update the block count
//
BlockCount--;
}
//
// Loop through the middle blocks and read them into the buffer
//
for (Idx=StartBlock+1; BlockCount>1; Idx++)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, Idx);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
CacheBlock->BlockData,
CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector);
DbgPrint((DPRINT_CACHE, "2 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, CacheBlock->BlockData, CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector));
//
// Update the buffer address
//
Buffer += CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector;
//
// Update the block count
//
BlockCount--;
}
//
// Read the last block into the buffer
//
if (BlockCount > 0)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, EndBlock);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
CacheBlock->BlockData,
SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector);
DbgPrint((DPRINT_CACHE, "3 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, CacheBlock->BlockData, SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector));
//
// Update the buffer address
//
Buffer += SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector;
//
// Update the block count
//
BlockCount--;
}
return TRUE;
}
BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount)
{
PCACHE_BLOCK CacheBlock;
U32 StartBlock;
U32 EndBlock;
U32 BlockCount;
U32 Idx;
DbgPrint((DPRINT_CACHE, "CacheForceDiskSectorsIntoCache() DiskNumber: 0x%x StartSector: %d SectorCount: %d\n", DiskNumber, StartSector, SectorCount));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
//
// Caculate which blocks we must cache
//
StartBlock = StartSector / CacheManagerDrive.BlockSize;
EndBlock = (StartSector + SectorCount) / CacheManagerDrive.BlockSize;
BlockCount = (EndBlock - StartBlock) + 1;
//
// Loop through and cache them
//
for (Idx=StartBlock; Idx<(StartBlock+BlockCount); Idx++)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, Idx);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Lock the sectors into the cache
//
CacheBlock->LockedInCache = TRUE;
}
return TRUE;
}
BOOL CacheReleaseMemory(U32 MinimumAmountToRelease)
{
U32 AmountReleased;
DbgPrint((DPRINT_CACHE, "CacheReleaseMemory() MinimumAmountToRelease = %d\n", MinimumAmountToRelease));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
// Loop through and try to free the requested amount of memory
for (AmountReleased=0; AmountReleased<MinimumAmountToRelease; )
{
// Try to free a block
// If this fails then break out of the loop
if (!CacheInternalFreeBlock(&CacheManagerDrive))
{
break;
}
// It succeeded so increment the amount of memory we have freed
AmountReleased += CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector;
}
// Return status
return (AmountReleased >= MinimumAmountToRelease);
}

View File

@@ -1,92 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <disk.h>
#ifndef __CM_H
#define __CM_H
///////////////////////////////////////////////////////////////////////////////////////
//
// This structure describes a cached block element. The disk is divided up into
// cache blocks. For disks which LBA is not supported each block is the size of
// one track. This will force the cache manager to make track sized reads, and
// therefore maximizes throughput. For disks which support LBA the block size
// is 64k because they have no cylinder, head, or sector boundaries.
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct
{
LIST_ITEM ListEntry; // Doubly linked list synchronization member
U32 BlockNumber; // Track index for CHS, 64k block index for LBA
BOOL LockedInCache; // Indicates that this block is locked in cache memory
U32 AccessCount; // Access count for this block
PVOID BlockData; // Pointer to block data
} CACHE_BLOCK, *PCACHE_BLOCK;
///////////////////////////////////////////////////////////////////////////////////////
//
// This structure describes a cached drive. It contains the BIOS drive number
// and indicates whether or not LBA is supported. If LBA is not supported then
// the drive's geometry is described here.
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct
{
U32 DriveNumber;
GEOMETRY DriveGeometry;
U32 BlockSize; // Block size (in sectors)
PCACHE_BLOCK CacheBlockHead;
} CACHE_DRIVE, *PCACHE_DRIVE;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal data
//
///////////////////////////////////////////////////////////////////////////////////////
extern CACHE_DRIVE CacheManagerDrive;
extern BOOL CacheManagerInitialized;
extern U32 CacheBlockCount;
extern U32 CacheSizeLimit;
extern U32 CacheSizeCurrent;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal functions
//
///////////////////////////////////////////////////////////////////////////////////////
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Searches the block list for a particular block
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Adds a block to the cache's block list
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive); // Removes a block from the cache's block list & frees the memory
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive); // Checks the cache size limits to see if we can add a new block, if not calls CacheInternalFreeBlock()
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the list of cached blocks to the debug output port
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock); // Moves the specified block to the head of the list
#endif // defined __CM_H

View File

@@ -1,277 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <comm.h>
#include <portio.h>
/* MACROS *******************************************************************/
#define DEFAULT_BAUD_RATE 19200
#define SER_RBR(x) ((x)+0)
#define SER_THR(x) ((x)+0)
#define SER_DLL(x) ((x)+0)
#define SER_IER(x) ((x)+1)
#define SER_DLM(x) ((x)+1)
#define SER_IIR(x) ((x)+2)
#define SER_LCR(x) ((x)+3)
#define SR_LCR_CS5 0x00
#define SR_LCR_CS6 0x01
#define SR_LCR_CS7 0x02
#define SR_LCR_CS8 0x03
#define SR_LCR_ST1 0x00
#define SR_LCR_ST2 0x04
#define SR_LCR_PNO 0x00
#define SR_LCR_POD 0x08
#define SR_LCR_PEV 0x18
#define SR_LCR_PMK 0x28
#define SR_LCR_PSP 0x38
#define SR_LCR_BRK 0x40
#define SR_LCR_DLAB 0x80
#define SER_MCR(x) ((x)+4)
#define SR_MCR_DTR 0x01
#define SR_MCR_RTS 0x02
#define SER_LSR(x) ((x)+5)
#define SR_LSR_DR 0x01
#define SR_LSR_TBE 0x20
#define SER_MSR(x) ((x)+6)
#define SR_MSR_CTS 0x10
#define SR_MSR_DSR 0x20
#define SER_SCR(x) ((x)+7)
/* STATIC VARIABLES *********************************************************/
static U32 Rs232ComPort = 0;
static U32 Rs232BaudRate = 0;
static PUCHAR Rs232PortBase = (PUCHAR)0;
/* The com port must only be initialized once! */
static BOOLEAN PortInitialized = FALSE;
/* STATIC FUNCTIONS *********************************************************/
static BOOL Rs232DoesComPortExist(PUCHAR BaseAddress)
{
BOOLEAN found;
U8 mcr;
U8 msr;
found = FALSE;
/* save Modem Control Register (MCR) */
mcr = READ_PORT_UCHAR (SER_MCR(BaseAddress));
/* enable loop mode (set Bit 4 of the MCR) */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
/* clear all modem output bits */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
/* read the Modem Status Register */
msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
/*
* the upper nibble of the MSR (modem output bits) must be
* equal to the lower nibble of the MCR (modem input bits)
*/
if ((msr & 0xF0) == 0x00)
{
/* set all modem output bits */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x1F);
/* read the Modem Status Register */
msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
/*
* the upper nibble of the MSR (modem output bits) must be
* equal to the lower nibble of the MCR (modem input bits)
*/
if ((msr & 0xF0) == 0xF0)
found = TRUE;
}
/* restore MCR */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), mcr);
return (found);
}
/* FUNCTIONS *********************************************************/
BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate)
{
U32 BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
//char buffer[80];
U32 divisor;
U8 lcr;
if (PortInitialized == FALSE)
{
if (BaudRate != 0)
{
Rs232BaudRate = BaudRate;
}
else
{
Rs232BaudRate = DEFAULT_BAUD_RATE;
}
if (ComPort == 0)
{
if (Rs232DoesComPortExist ((PUCHAR)BaseArray[2]))
{
Rs232PortBase = (PUCHAR)BaseArray[2];
Rs232ComPort = 2;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else if (Rs232DoesComPortExist ((PUCHAR)BaseArray[1]))
{
Rs232PortBase = (PUCHAR)BaseArray[1];
Rs232ComPort = 1;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else
{
/*sprintf (buffer,
"\nKernel Debugger: No COM port found!!!\n\n");
HalDisplayString (buffer);*/
return FALSE;
}
}
else
{
if (Rs232DoesComPortExist ((PUCHAR)BaseArray[ComPort]))
{
Rs232PortBase = (PUCHAR)BaseArray[ComPort];
Rs232ComPort = ComPort;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else
{
/*sprintf (buffer,
"\nKernel Debugger: No serial port found!!!\n\n");
HalDisplayString (buffer);*/
return FALSE;
}
}
PortInitialized = TRUE;
}
/*
* set baud rate and data format (8N1)
*/
/* turn on DTR and RTS */
WRITE_PORT_UCHAR (SER_MCR(Rs232PortBase), SR_MCR_DTR | SR_MCR_RTS);
/* set DLAB */
lcr = READ_PORT_UCHAR (SER_LCR(Rs232PortBase)) | SR_LCR_DLAB;
WRITE_PORT_UCHAR (SER_LCR(Rs232PortBase), lcr);
/* set baud rate */
divisor = 115200 / BaudRate;
WRITE_PORT_UCHAR (SER_DLL(Rs232PortBase), divisor & 0xff);
WRITE_PORT_UCHAR (SER_DLM(Rs232PortBase), (divisor >> 8) & 0xff);
/* reset DLAB and set 8N1 format */
WRITE_PORT_UCHAR (SER_LCR(Rs232PortBase),
SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO);
/* read junk out of the RBR */
lcr = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
/*
* set global info
*/
//KdComPortInUse = (U32)PortBase;
/*
* print message to blue screen
*/
/*sprintf (buffer,
"\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n",
ComPort,
(U32)PortBase,
BaudRate);
HalDisplayString (buffer);*/
return TRUE;
}
BOOL Rs232PortGetByte(PUCHAR ByteRecieved)
{
if (PortInitialized == FALSE)
return FALSE;
if ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_DR))
{
*ByteRecieved = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
return TRUE;
}
return FALSE;
}
BOOL Rs232PortPollByte(PUCHAR ByteRecieved)
{
if (PortInitialized == FALSE)
return FALSE;
while ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_DR) == 0)
;
*ByteRecieved = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
return TRUE;
}
VOID Rs232PortPutByte(UCHAR ByteToSend)
{
if (PortInitialized == FALSE)
return;
while ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_TBE) == 0)
;
WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend);
}

View File

@@ -1,400 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <ui.h>
#include <options.h>
#include <miscboot.h>
#include <debug.h>
#include <disk.h>
#include <arch.h>
#include <inifile.h>
#include <linux.h>
#include <reactos.h>
#include <drivemap.h>
UCHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
UCHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
UCHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos";
UCHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18";
UCHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk.";
UCHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init";
UCHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS";
UCHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
UCHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup.";
VOID OptionMenuCustomBoot(VOID)
{
PUCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" };
U32 CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]);
U32 SelectedMenuItem;
if (!UiDisplayMenu(CustomBootMenuList, CustomBootMenuCount, 0, -1, &SelectedMenuItem, TRUE, NULL))
{
// The user pressed ESC
return;
}
switch (SelectedMenuItem)
{
case 0: // Disk
OptionMenuCustomBootDisk();
break;
case 1: // Partition
OptionMenuCustomBootPartition();
break;
case 2: // Boot Sector File
OptionMenuCustomBootBootSectorFile();
break;
case 3: // ReactOS
OptionMenuCustomBootReactOS();
break;
case 4: // Linux
OptionMenuCustomBootLinux();
break;
}
}
VOID OptionMenuCustomBootDisk(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootDisk%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Drive"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootDrive(SectionName);
}
VOID OptionMenuCustomBootPartition(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootPartition%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Partition"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootPartition(SectionName);
}
VOID OptionMenuCustomBootBootSectorFile(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR BootSectorFileString[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(BootSectorFileString, sizeof(BootSectorFileString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(BootSectorFilePrompt, BootSectorFileString, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootSectorFile%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "BootSector"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
// Add the BootSectorFile
if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFileString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootBootSector(SectionName);
}
VOID OptionMenuCustomBootReactOS(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR ReactOSSystemPath[200];
UCHAR ReactOSARCPath[200];
UCHAR ReactOSOptions[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(ReactOSSystemPath, sizeof(ReactOSSystemPath));
RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, 200))
{
return;
}
if (!UiEditBox(ReactOSOptionsPrompt, ReactOSOptions, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomReactOS%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "ReactOS"))
{
return;
}
// Construct the ReactOS ARC system path
ConstructArcPath(ReactOSARCPath, ReactOSSystemPath, DriveMapGetBiosDriveNumber(BootDriveString), atoi(BootPartitionString));
// Add the system path
if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath))
{
return;
}
// Add the CommandLine
if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootReactOS(SectionName);
}
VOID OptionMenuCustomBootLinux(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR LinuxKernelString[200];
UCHAR LinuxInitrdString[200];
UCHAR LinuxCommandLineString[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(LinuxKernelString, sizeof(LinuxKernelString));
RtlZeroMemory(LinuxInitrdString, sizeof(LinuxInitrdString));
RtlZeroMemory(LinuxCommandLineString, sizeof(LinuxCommandLineString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(LinuxKernelPrompt, LinuxKernelString, 200))
{
return;
}
if (!UiEditBox(LinuxInitrdPrompt, LinuxInitrdString, 200))
{
return;
}
if (!UiEditBox(LinuxCommandLinePrompt, LinuxCommandLineString, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomLinux%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Linux"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
// Add the Kernel
if (!IniAddSettingValueToSection(SectionId, "Kernel", LinuxKernelString))
{
return;
}
// Add the Initrd
if (strlen(LinuxInitrdString) > 0)
{
if (!IniAddSettingValueToSection(SectionId, "Initrd", LinuxInitrdString))
{
return;
}
}
// Add the CommandLine
if (!IniAddSettingValueToSection(SectionId, "CommandLine", LinuxCommandLineString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootLinux(SectionName, "Custom Linux Setup");
}

View File

@@ -1,380 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <debug.h>
#include <rtl.h>
#include <comm.h>
#include <portio.h>
#ifdef DEBUG
//#define DEBUG_ALL
//#define DEBUG_INIFILE
//#define DEBUG_REACTOS
//#define DEBUG_CUSTOM
#define DEBUG_NONE
#if defined (DEBUG_ALL)
U32 DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS |
DPRINT_LINUX;
#elif defined (DEBUG_INIFILE)
U32 DebugPrintMask = DPRINT_INIFILE;
#elif defined (DEBUG_REACTOS)
U32 DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY;
#elif defined (DEBUG_CUSTOM)
U32 DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINUX;
#else //#elif defined (DEBUG_NONE)
U32 DebugPrintMask = 0;
#endif
#define SCREEN 0
#define RS232 1
#define BOCHS 2
#define COM1 1
#define COM2 2
#define COM3 3
#define COM4 4
#define BOCHS_OUTPUT_PORT 0xe9
U32 DebugPort = RS232;
//U32 DebugPort = SCREEN;
//U32 DebugPort = BOCHS;
U32 ComPort = COM1;
//U32 BaudRate = 19200;
U32 BaudRate = 115200;
BOOL DebugStartOfLine = TRUE;
VOID DebugInit(VOID)
{
if (DebugPort == RS232)
{
Rs232PortInitialize(ComPort, BaudRate);
}
}
VOID DebugPrintChar(UCHAR Character)
{
if (Character == '\n')
{
DebugStartOfLine = TRUE;
}
if (DebugPort == RS232)
{
if (Character == '\n')
{
Rs232PortPutByte('\r');
}
Rs232PortPutByte(Character);
}
else if (DebugPort == BOCHS)
{
WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character);
}
else
{
putchar(Character);
}
}
VOID DebugPrintHeader(U32 Mask)
{
/* No header */
if (Mask == 0)
return;
switch (Mask)
{
case DPRINT_WARNING:
DebugPrintChar('W');
DebugPrintChar('A');
DebugPrintChar('R');
DebugPrintChar('N');
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('G');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_MEMORY:
DebugPrintChar('M');
DebugPrintChar('E');
DebugPrintChar('M');
DebugPrintChar('O');
DebugPrintChar('R');
DebugPrintChar('Y');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_FILESYSTEM:
DebugPrintChar('F');
DebugPrintChar('I');
DebugPrintChar('L');
DebugPrintChar('E');
DebugPrintChar('S');
DebugPrintChar('Y');
DebugPrintChar('S');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_INIFILE:
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('I');
DebugPrintChar('F');
DebugPrintChar('I');
DebugPrintChar('L');
DebugPrintChar('E');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_UI:
DebugPrintChar('U');
DebugPrintChar('I');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_DISK:
DebugPrintChar('D');
DebugPrintChar('I');
DebugPrintChar('S');
DebugPrintChar('K');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_CACHE:
DebugPrintChar('C');
DebugPrintChar('A');
DebugPrintChar('C');
DebugPrintChar('H');
DebugPrintChar('E');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_REGISTRY:
DebugPrintChar('R');
DebugPrintChar('E');
DebugPrintChar('G');
DebugPrintChar('I');
DebugPrintChar('S');
DebugPrintChar('T');
DebugPrintChar('R');
DebugPrintChar('Y');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_REACTOS:
DebugPrintChar('R');
DebugPrintChar('E');
DebugPrintChar('A');
DebugPrintChar('C');
DebugPrintChar('T');
DebugPrintChar('O');
DebugPrintChar('S');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_LINUX:
DebugPrintChar('L');
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('U');
DebugPrintChar('X');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_HWDETECT:
DebugPrintChar('H');
DebugPrintChar('W');
DebugPrintChar('D');
DebugPrintChar('E');
DebugPrintChar('T');
DebugPrintChar('E');
DebugPrintChar('C');
DebugPrintChar('T');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
default:
DebugPrintChar('U');
DebugPrintChar('N');
DebugPrintChar('K');
DebugPrintChar('N');
DebugPrintChar('O');
DebugPrintChar('W');
DebugPrintChar('N');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
}
}
VOID DebugPrint(U32 Mask, char *format, ...)
{
int *dataptr = (int *) &format;
char c, *ptr, str[16];
// Mask out unwanted debug messages
if (!(Mask & DebugPrintMask))
{
return;
}
// Print the header if we have started a new line
if (DebugStartOfLine)
{
DebugPrintHeader(Mask);
DebugStartOfLine = FALSE;
}
dataptr++;
while ((c = *(format++)))
{
if (c != '%')
{
DebugPrintChar(c);
}
else
{
switch (c = *(format++))
{
case 'd': case 'u': case 'x':
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
ptr = str;
while (*ptr)
{
DebugPrintChar(*(ptr++));
}
break;
case 'c':
DebugPrintChar((*(dataptr++))&0xff);
break;
case 's':
ptr = (char *)(*(dataptr++));
while ((c = *(ptr++)))
{
DebugPrintChar(c);
}
break;
case '%':
DebugPrintChar(c);
break;
default:
DebugPrint(Mask, "\nDebugPrint() invalid format specifier - %%%c\n", c);
break;
}
}
}
if (DebugPort == SCREEN)
{
//getch();
}
}
VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length)
{
PUCHAR BufPtr = (PUCHAR)Buffer;
U32 Idx;
U32 Idx2;
// Mask out unwanted debug messages
if (!(Mask & DebugPrintMask))
{
return;
}
DebugStartOfLine = FALSE; // We don't want line headers
DebugPrint(Mask, "Dumping buffer at 0x%x with length of %d bytes:\n", Buffer, Length);
for (Idx=0; Idx<Length; )
{
DebugStartOfLine = FALSE; // We don't want line headers
if (Idx < 0x0010)
{
DebugPrint(Mask, "000%x:\t", Idx);
}
else if (Idx < 0x0100)
{
DebugPrint(Mask, "00%x:\t", Idx);
}
else if (Idx < 0x1000)
{
DebugPrint(Mask, "0%x:\t", Idx);
}
else
{
DebugPrint(Mask, "%x:\t", Idx);
}
for (Idx2=0; Idx2<16; Idx2++,Idx++)
{
if (BufPtr[Idx] < 0x10)
{
DebugPrint(Mask, "0");
}
DebugPrint(Mask, "%x", BufPtr[Idx]);
if (Idx2 == 7)
{
DebugPrint(Mask, "-");
}
else
{
DebugPrint(Mask, " ");
}
}
Idx -= 16;
DebugPrint(Mask, " ");
for (Idx2=0; Idx2<16; Idx2++,Idx++)
{
if ((BufPtr[Idx] > 20) && (BufPtr[Idx] < 0x80))
{
DebugPrint(Mask, "%c", BufPtr[Idx]);
}
else
{
DebugPrint(Mask, ".");
}
}
DebugPrint(Mask, "\n");
}
}
#endif // defined DEBUG

View File

@@ -1,112 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <arch.h>
#include <rtl.h>
#include <ui.h>
#include <debug.h>
#undef UNIMPLEMENTED
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
static BOOL bReportError = TRUE;
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID DiskReportError (BOOL bError)
{
bReportError = bError;
}
VOID DiskError(PUCHAR ErrorString, U32 ErrorCode)
{
UCHAR ErrorCodeString[200];
if (bReportError == FALSE)
return;
sprintf(ErrorCodeString, "%s\n\nError Code: 0x%x\nError: %s", ErrorString, ErrorCode, DiskGetErrorCodeString(ErrorCode));
DbgPrint((DPRINT_DISK, "%s\n", ErrorCodeString));
UiMessageBox(ErrorCodeString);
}
PUCHAR DiskGetErrorCodeString(U32 ErrorCode)
{
switch (ErrorCode)
{
case 0x00: return "no error";
case 0x01: return "bad command passed to driver";
case 0x02: return "address mark not found or bad sector";
case 0x03: return "diskette write protect error";
case 0x04: return "sector not found";
case 0x05: return "fixed disk reset failed";
case 0x06: return "diskette changed or removed";
case 0x07: return "bad fixed disk parameter table";
case 0x08: return "DMA overrun";
case 0x09: return "DMA access across 64k boundary";
case 0x0A: return "bad fixed disk sector flag";
case 0x0B: return "bad fixed disk cylinder";
case 0x0C: return "unsupported track/invalid media";
case 0x0D: return "invalid number of sectors on fixed disk format";
case 0x0E: return "fixed disk controlled data address mark detected";
case 0x0F: return "fixed disk DMA arbitration level out of range";
case 0x10: return "ECC/CRC error on disk read";
case 0x11: return "recoverable fixed disk data error, data fixed by ECC";
case 0x20: return "controller error (NEC for floppies)";
case 0x40: return "seek failure";
case 0x80: return "time out, drive not ready";
case 0xAA: return "fixed disk drive not ready";
case 0xBB: return "fixed disk undefined error";
case 0xCC: return "fixed disk write fault on selected drive";
case 0xE0: return "fixed disk status error/Error reg = 0";
case 0xFF: return "sense operation failed";
default: return "unknown error code";
}
}
// This function is in arch/i386/i386disk.c
//BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
BOOL DiskIsDriveRemovable(U32 DriveNumber)
{
// Hard disks use drive numbers >= 0x80
// So if the drive number indicates a hard disk
// then return FALSE
if (DriveNumber >= 0x80)
{
return FALSE;
}
// Drive is a floppy diskette so return TRUE
return TRUE;
}
// This function is in arch/i386/i386disk.c
//VOID DiskStopFloppyMotor(VOID)
// This function is in arch/i386/i386disk.c
//U32 DiskGetCacheableBlockCount(U32 DriveNumber)

View File

@@ -1,44 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
#ifdef __i386__
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry)
{
// For now just return the geometry as the BIOS reports it
// BytesPerSector is always set to 512 by i386DiskGetDriveParameters()
if (!DiskGetDriveParameters(DriveNumber, DriveGeometry))
{
DiskError("Drive geometry unknown.", 0);
return FALSE;
}
return TRUE;
}
#else
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry)
{
UNIMPLEMENTED();
}
#endif

View File

@@ -1,239 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
#include <debug.h>
#include <arch.h>
BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 BootablePartitionCount = 0;
MASTER_BOOT_RECORD MasterBootRecord;
// Read master boot record
if (!DiskReadBootRecord(DriveNumber, 0, &MasterBootRecord))
{
return FALSE;
}
// Count the bootable partitions
if (MasterBootRecord.PartitionTable[0].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 0;
}
if (MasterBootRecord.PartitionTable[1].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 1;
}
if (MasterBootRecord.PartitionTable[2].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 2;
}
if (MasterBootRecord.PartitionTable[3].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 3;
}
// Make sure there was only one bootable partition
if (BootablePartitionCount == 0)
{
DiskError("No bootable (active) partitions found.", 0);
return FALSE;
}
else if (BootablePartitionCount != 1)
{
DiskError("Too many bootable (active) partitions found.", 0);
return FALSE;
}
// Copy the partition table entry
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[BootPartition], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
MASTER_BOOT_RECORD MasterBootRecord;
PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry;
U32 ExtendedPartitionNumber;
U32 ExtendedPartitionRelativeOffset;
U32 Index;
// Read master boot record
if (!DiskReadBootRecord(DriveNumber, 0, &MasterBootRecord))
{
return FALSE;
}
// If they are asking for a primary
// partition then things are easy
if (PartitionNumber < 5)
{
// PartitionNumber is one-based and we need it zero-based
PartitionNumber--;
// Copy the partition table entry
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[PartitionNumber], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
else
{
// They want an extended partition entry so we will need
// to loop through all the extended partitions on the disk
// and return the one they want.
ExtendedPartitionNumber = PartitionNumber - 5;
// Set the initial relative starting sector to 0
// This is because extended partition starting
// sectors a numbered relative to their parent
ExtendedPartitionRelativeOffset = 0;
for (Index=0; Index<=ExtendedPartitionNumber; Index++)
{
// Get the extended partition table entry
if (!DiskGetFirstExtendedPartitionEntry(&MasterBootRecord, &ExtendedPartitionTableEntry))
{
return FALSE;
}
// Adjust the relative starting sector of the partition
ExtendedPartitionRelativeOffset += ExtendedPartitionTableEntry.SectorCountBeforePartition;
// Read the partition boot record
if (!DiskReadBootRecord(DriveNumber, ExtendedPartitionRelativeOffset, &MasterBootRecord))
{
return FALSE;
}
// Get the first real partition table entry
if (!DiskGetFirstPartitionEntry(&MasterBootRecord, PartitionTableEntry))
{
return FALSE;
}
// Now correct the start sector of the partition
PartitionTableEntry->SectorCountBeforePartition += ExtendedPartitionRelativeOffset;
}
// When we get here we should have the correct entry
// already stored in PartitionTableEntry
// so just return TRUE
return TRUE;
}
}
BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 Index;
for (Index=0; Index<4; Index++)
{
// Check the system indicator
// If it's not an extended or unused partition
// then we're done
if ((MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_ENTRY_UNUSED) &&
(MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_EXTENDED) &&
(MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_XINT13_EXTENDED))
{
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord->PartitionTable[Index], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
}
return FALSE;
}
BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 Index;
for (Index=0; Index<4; Index++)
{
// Check the system indicator
// If it an extended partition then we're done
if ((MasterBootRecord->PartitionTable[Index].SystemIndicator == PARTITION_EXTENDED) ||
(MasterBootRecord->PartitionTable[Index].SystemIndicator == PARTITION_XINT13_EXTENDED))
{
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord->PartitionTable[Index], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
}
return FALSE;
}
BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord)
{
#ifdef DEBUG
U32 Index;
#endif
// Read master boot record
if (!DiskReadLogicalSectors(DriveNumber, LogicalSectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(BootRecord, (PVOID)DISKREADBUFFER, sizeof(MASTER_BOOT_RECORD));
#ifdef DEBUG
DbgPrint((DPRINT_DISK, "Dumping partition table for drive 0x%x:\n", DriveNumber));
DbgPrint((DPRINT_DISK, "Boot record logical start sector = %d\n", LogicalSectorNumber));
DbgPrint((DPRINT_DISK, "sizeof(MASTER_BOOT_RECORD) = 0x%x.\n", sizeof(MASTER_BOOT_RECORD)));
for (Index=0; Index<4; Index++)
{
DbgPrint((DPRINT_DISK, "-------------------------------------------\n"));
DbgPrint((DPRINT_DISK, "Partition %d\n", (Index + 1)));
DbgPrint((DPRINT_DISK, "BootIndicator: 0x%x\n", BootRecord->PartitionTable[Index].BootIndicator));
DbgPrint((DPRINT_DISK, "StartHead: 0x%x\n", BootRecord->PartitionTable[Index].StartHead));
DbgPrint((DPRINT_DISK, "StartSector (Plus 2 cylinder bits): 0x%x\n", BootRecord->PartitionTable[Index].StartSector));
DbgPrint((DPRINT_DISK, "StartCylinder: 0x%x\n", BootRecord->PartitionTable[Index].StartCylinder));
DbgPrint((DPRINT_DISK, "SystemIndicator: 0x%x\n", BootRecord->PartitionTable[Index].SystemIndicator));
DbgPrint((DPRINT_DISK, "EndHead: 0x%x\n", BootRecord->PartitionTable[Index].EndHead));
DbgPrint((DPRINT_DISK, "EndSector (Plus 2 cylinder bits): 0x%x\n", BootRecord->PartitionTable[Index].EndSector));
DbgPrint((DPRINT_DISK, "EndCylinder: 0x%x\n", BootRecord->PartitionTable[Index].EndCylinder));
DbgPrint((DPRINT_DISK, "SectorCountBeforePartition: 0x%x\n", BootRecord->PartitionTable[Index].SectorCountBeforePartition));
DbgPrint((DPRINT_DISK, "PartitionSectorCount: 0x%x\n", BootRecord->PartitionTable[Index].PartitionSectorCount));
}
#endif // defined DEBUG
// Check the partition table magic value
if (BootRecord->MasterBootRecordMagic != 0xaa55)
{
DiskError("Invalid partition table magic (0xaa55)", 0);
return FALSE;
}
return TRUE;
}

View File

@@ -1,227 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <drivemap.h>
#include <rtl.h>
#include <inifile.h>
#include <cache.h>
#include <ui.h>
#include <debug.h>
BOOL DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code
U32 OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler
U32 DriveMapHandlerAddress = 0; // Linear address of our drive map handler
U32 DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler
VOID DriveMapMapDrivesInSection(PUCHAR SectionName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
UCHAR ErrorText[260];
UCHAR Drive1[80];
UCHAR Drive2[80];
U32 SectionId;
U32 SectionItemCount;
U32 Index;
U32 Index2;
DRIVE_MAP_LIST DriveMapList;
RtlZeroMemory(&DriveMapList, sizeof(DRIVE_MAP_LIST));
if (!IniOpenSection(SectionName, &SectionId))
{
return;
}
// Get the number of items in this section
SectionItemCount = IniGetNumSectionItems(SectionId);
// Loop through each one and check if its a DriveMap= setting
for (Index=0; Index<SectionItemCount; Index++)
{
// Get the next setting from the .ini file section
if (IniReadSettingByNumber(SectionId, Index, SettingName, 80, SettingValue, 80))
{
if (stricmp(SettingName, "DriveMap") == 0)
{
// Make sure we haven't exceeded the drive map max count
if (DriveMapList.DriveMapCount >= 4)
{
sprintf(ErrorText, "Max DriveMap count exceeded in section [%s]:\n\n%s=%s", SectionName, SettingName, SettingValue);
UiMessageBox(ErrorText);
continue;
}
RtlZeroMemory(Drive1, 80);
RtlZeroMemory(Drive2, 80);
strcpy(Drive1, SettingValue);
// Parse the setting value and separate a string "hd0,hd1"
// into two strings "hd0" and "hd1"
for (Index2=0; Index2<strlen(Drive1); Index2++)
{
// Check if this character is the separater character (comma - ',')
if (Drive1[Index2] == ',')
{
Drive1[Index2] = '\0';
strcpy(Drive2, &Drive1[Index2+1]);
break;
}
}
// Make sure we got good values before we add them to the map
if (!DriveMapIsValidDriveString(Drive1) || !DriveMapIsValidDriveString(Drive2))
{
sprintf(ErrorText, "Error in DriveMap setting in section [%s]:\n\n%s=%s", SectionName, SettingName, SettingValue);
UiMessageBox(ErrorText);
continue;
}
// Add them to the map
DriveMapList.DriveMap[(DriveMapList.DriveMapCount * 2)] = DriveMapGetBiosDriveNumber(Drive1);
DriveMapList.DriveMap[(DriveMapList.DriveMapCount * 2)+1] = DriveMapGetBiosDriveNumber(Drive2);
DriveMapList.DriveMapCount++;
DbgPrint((DPRINT_WARNING, "Mapping BIOS drive 0x%x to drive 0x%x\n", DriveMapGetBiosDriveNumber(Drive1), DriveMapGetBiosDriveNumber(Drive2)));
}
}
}
if (DriveMapList.DriveMapCount)
{
DbgPrint((DPRINT_WARNING, "Installing Int13 drive map for %d drives.\n", DriveMapList.DriveMapCount));
DriveMapInstallInt13Handler(&DriveMapList);
}
else
{
DbgPrint((DPRINT_WARNING, "Removing any previously installed Int13 drive map.\n"));
DriveMapRemoveInt13Handler();
}
}
BOOL DriveMapIsValidDriveString(PUCHAR DriveString)
{
U32 Index;
// Now verify that the user has given us appropriate strings
if ((strlen(DriveString) < 3) ||
((DriveString[0] != 'f') && (DriveString[0] != 'F') && (DriveString[0] != 'h') && (DriveString[0] != 'H')) ||
((DriveString[1] != 'd') && (DriveString[1] != 'D')))
{
return FALSE;
}
// Now verify that the user has given us appropriate numbers
// Make sure that only numeric characters were given
for (Index=2; Index<strlen(DriveString); Index++)
{
if (DriveString[Index] < '0' || DriveString[Index] > '9')
{
return FALSE;
}
}
// Now make sure that they are not outrageous values (i.e. hd90874)
if ((atoi(&DriveString[2]) < 0) || (atoi(&DriveString[2]) > 0xff))
{
return FALSE;
}
return TRUE;
}
U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName)
{
U32 BiosDriveNumber = 0;
// If they passed in a number string then just
// convert it to decimal and return it
if (DeviceName[0] >= '0' && DeviceName[0] <= '9')
{
return atoi(DeviceName);
}
// Convert the drive number string into a number
// 'hd1' = 1
BiosDriveNumber = atoi(&DeviceName[2]);
// If it's a hard disk then set the high bit
if ((DeviceName[0] == 'h' || DeviceName[0] == 'H') &&
(DeviceName[1] == 'd' || DeviceName[1] == 'D'))
{
BiosDriveNumber |= 0x80;
}
return BiosDriveNumber;
}
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap)
{
U32* RealModeIVT = (U32*)0x00000000;
U16* BiosLowMemorySize = (U16*)0x00000413;
if (!DriveMapInstalled)
{
// Get the old INT 13h handler address from the vector table
OldInt13HandlerAddress = RealModeIVT[0x13];
// Decrease the size of low memory
(*BiosLowMemorySize)--;
// Get linear address for drive map handler
DriveMapHandlerAddress = (U32)(*BiosLowMemorySize) << 10;
// Convert to segment:offset style address
DriveMapHandlerSegOff = (DriveMapHandlerAddress << 12) & 0xffff0000;
}
// Copy the drive map structure to the proper place
RtlCopyMemory(&DriveMapInt13HandlerMapList, DriveMap, sizeof(DRIVE_MAP_LIST));
// Set the address of the BIOS INT 13h handler
DriveMapOldInt13HandlerAddress = OldInt13HandlerAddress;
// Copy the code to our reserved area
RtlCopyMemory((PVOID)DriveMapHandlerAddress, &DriveMapInt13HandlerStart, ((U32)&DriveMapInt13HandlerEnd - (U32)&DriveMapInt13HandlerStart));
// Update the IVT
RealModeIVT[0x13] = DriveMapHandlerSegOff;
CacheInvalidateCacheData();
DriveMapInstalled = TRUE;
}
VOID DriveMapRemoveInt13Handler(VOID)
{
U32* RealModeIVT = (U32*)0x00000000;
U16* BiosLowMemorySize = (U16*)0x00000413;
if (DriveMapInstalled)
{
// Get the old INT 13h handler address from the vector table
RealModeIVT[0x13] = OldInt13HandlerAddress;
// Increase the size of low memory
(*BiosLowMemorySize)++;
CacheInvalidateCacheData();
DriveMapInstalled = FALSE;
}
}

View File

@@ -1,51 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <bootmgr.h>
#include <fs.h>
// Variables BootDrive & BootPartition moved to asmcode.S
//U32 BootDrive = 0; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
//U32 BootPartition = 0; // Boot Partition, 1-4
VOID BootMain(VOID)
{
EnableA20();
#ifdef DEBUG
DebugInit();
#endif
DbgPrint((DPRINT_WARNING, "BootMain() called. BootDrive = 0x%x BootPartition = %d\n", BootDrive, BootPartition));
if (!MmInitializeMemoryManager())
{
printf("Press any key to reboot.\n");
getch();
return;
}
RunLoader();
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,697 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __EXT2_H
#define __EXT2_H
/*
* linux/include/linux/ext3_fs.h
*
* Copyright (C) 1992, 1993, 1994, 1995
* Remy Card (card@masi.ibp.fr)
* Laboratoire MASI - Institut Blaise Pascal
* Universite Pierre et Marie Curie (Paris VI)
*
* from
*
* linux/include/linux/minix_fs.h
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#ifndef _LINUX_EXT3_FS_H
#define _LINUX_EXT3_FS_H
//#include <linux/types.h>
/*
* The second extended filesystem constants/structures
*/
/*
* Define EXT3FS_DEBUG to produce debug messages
*/
#undef EXT3FS_DEBUG
/*
* Define EXT3_PREALLOCATE to preallocate data blocks for expanding files
*/
#undef EXT3_PREALLOCATE /* @@@ Fix this! */
#define EXT3_DEFAULT_PREALLOC_BLOCKS 8
/*
* The second extended file system version
*/
#define EXT3FS_DATE "10 Jan 2002"
#define EXT3FS_VERSION "2.4-0.9.17"
/*
* Debug code
*/
#ifdef EXT3FS_DEBUG
#define ext3_debug(f, a...) \
do { \
printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \
__FILE__, __LINE__, __FUNCTION__); \
printk (KERN_DEBUG f, ## a); \
} while (0)
#else
#define ext3_debug(f, a...) do {} while (0)
#endif
/*
* Special inodes numbers
*/
#define EXT3_BAD_INO 1 /* Bad blocks inode */
#define EXT3_ROOT_INO 2 /* Root inode */
#define EXT3_ACL_IDX_INO 3 /* ACL inode */
#define EXT3_ACL_DATA_INO 4 /* ACL inode */
#define EXT3_BOOT_LOADER_INO 5 /* Boot loader inode */
#define EXT3_UNDEL_DIR_INO 6 /* Undelete directory inode */
#define EXT3_RESIZE_INO 7 /* Reserved group descriptors inode */
#define EXT3_JOURNAL_INO 8 /* Journal inode */
/* First non-reserved inode for old ext3 filesystems */
#define EXT3_GOOD_OLD_FIRST_INO 11
/*
* The second extended file system magic number
*/
#define EXT3_SUPER_MAGIC 0xEF53
/*
* Maximal count of links to a file
*/
#define EXT3_LINK_MAX 32000
/*
* Macro-instructions used to manage several block sizes
*/
#define EXT3_MIN_BLOCK_SIZE 1024
#define EXT3_MAX_BLOCK_SIZE 4096
#define EXT3_MIN_BLOCK_LOG_SIZE 10
#ifdef __KERNEL__
# define EXT3_BLOCK_SIZE(s) ((s)->s_blocksize)
#else
# define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
#endif
#define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry))
#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
#ifdef __KERNEL__
# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
#else
# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
#endif
#ifdef __KERNEL__
#define EXT3_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext3_sb.s_addr_per_block_bits)
#define EXT3_INODE_SIZE(s) ((s)->u.ext3_sb.s_inode_size)
#define EXT3_FIRST_INO(s) ((s)->u.ext3_sb.s_first_ino)
#else
#define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
EXT3_GOOD_OLD_INODE_SIZE : \
(s)->s_inode_size)
#define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
EXT3_GOOD_OLD_FIRST_INO : \
(s)->s_first_ino)
#endif
/*
* Macro-instructions used to manage fragments
*/
#define EXT3_MIN_FRAG_SIZE 1024
#define EXT3_MAX_FRAG_SIZE 4096
#define EXT3_MIN_FRAG_LOG_SIZE 10
#ifdef __KERNEL__
# define EXT3_FRAG_SIZE(s) ((s)->u.ext3_sb.s_frag_size)
# define EXT3_FRAGS_PER_BLOCK(s) ((s)->u.ext3_sb.s_frags_per_block)
#else
# define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size)
# define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s))
#endif
/*
* ACL structures
*/
struct ext3_acl_header /* Header of Access Control Lists */
{
__u32 aclh_size;
__u32 aclh_file_count;
__u32 aclh_acle_count;
__u32 aclh_first_acle;
};
struct ext3_acl_entry /* Access Control List Entry */
{
__u32 acle_size;
__u16 acle_perms; /* Access permissions */
__u16 acle_type; /* Type of entry */
__u16 acle_tag; /* User or group identity */
__u16 acle_pad1;
__u32 acle_next; /* Pointer on next entry for the */
/* same inode or on next free entry */
};
/*
* Structure of a blocks group descriptor
*/
struct ext3_group_desc
{
__u32 bg_block_bitmap; /* Blocks bitmap block */
__u32 bg_inode_bitmap; /* Inodes bitmap block */
__u32 bg_inode_table; /* Inodes table block */
__u16 bg_free_blocks_count; /* Free blocks count */
__u16 bg_free_inodes_count; /* Free inodes count */
__u16 bg_used_dirs_count; /* Directories count */
__u16 bg_pad;
__u32 bg_reserved[3];
};
/*
* Macro-instructions used to manage group descriptors
*/
#ifdef __KERNEL__
# define EXT3_BLOCKS_PER_GROUP(s) ((s)->u.ext3_sb.s_blocks_per_group)
# define EXT3_DESC_PER_BLOCK(s) ((s)->u.ext3_sb.s_desc_per_block)
# define EXT3_INODES_PER_GROUP(s) ((s)->u.ext3_sb.s_inodes_per_group)
# define EXT3_DESC_PER_BLOCK_BITS(s) ((s)->u.ext3_sb.s_desc_per_block_bits)
#else
# define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
# define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc))
# define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
#endif
/*
* Constants relative to the data blocks
*/
#define EXT3_NDIR_BLOCKS 12
#define EXT3_IND_BLOCK EXT3_NDIR_BLOCKS
#define EXT3_DIND_BLOCK (EXT3_IND_BLOCK + 1)
#define EXT3_TIND_BLOCK (EXT3_DIND_BLOCK + 1)
#define EXT3_N_BLOCKS (EXT3_TIND_BLOCK + 1)
/*
* Inode flags
*/
#define EXT3_SECRM_FL 0x00000001 /* Secure deletion */
#define EXT3_UNRM_FL 0x00000002 /* Undelete */
#define EXT3_COMPR_FL 0x00000004 /* Compress file */
#define EXT3_SYNC_FL 0x00000008 /* Synchronous updates */
#define EXT3_IMMUTABLE_FL 0x00000010 /* Immutable file */
#define EXT3_APPEND_FL 0x00000020 /* writes to file may only append */
#define EXT3_NODUMP_FL 0x00000040 /* do not dump file */
#define EXT3_NOATIME_FL 0x00000080 /* do not update atime */
/* Reserved for compression usage... */
#define EXT3_DIRTY_FL 0x00000100
#define EXT3_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
#define EXT3_NOCOMPR_FL 0x00000400 /* Don't compress */
#define EXT3_ECOMPR_FL 0x00000800 /* Compression error */
/* End compression flags --- maybe not all used */
#define EXT3_INDEX_FL 0x00001000 /* hash-indexed directory */
#define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */
#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
#define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */
#define EXT3_FL_USER_VISIBLE 0x00005FFF /* User visible flags */
#define EXT3_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
/*
* Inode dynamic state flags
*/
#define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */
#define EXT3_STATE_NEW 0x00000002 /* inode is newly created */
/*
* ioctl commands
*/
#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
#define EXT3_IOC_SETFLAGS _IOW('f', 2, long)
#define EXT3_IOC_GETVERSION _IOR('f', 3, long)
#define EXT3_IOC_SETVERSION _IOW('f', 4, long)
#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long)
#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long)
#ifdef CONFIG_JBD_DEBUG
#define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long)
#endif
/*
* Structure of an inode on the disk
*/
struct ext3_inode {
__u16 i_mode; /* File mode */
__u16 i_uid; /* Low 16 bits of Owner Uid */
__u32 i_size; /* Size in bytes */
__u32 i_atime; /* Access time */
__u32 i_ctime; /* Creation time */
__u32 i_mtime; /* Modification time */
__u32 i_dtime; /* Deletion Time */
__u16 i_gid; /* Low 16 bits of Group Id */
__u16 i_links_count; /* Links count */
__u32 i_blocks; /* Blocks count */
__u32 i_flags; /* File flags */
union {
struct {
__u32 l_i_reserved1;
} linux1;
struct {
__u32 h_i_translator;
} hurd1;
struct {
__u32 m_i_reserved1;
} masix1;
} osd1; /* OS dependent 1 */
__u32 i_block[EXT3_N_BLOCKS];/* Pointers to blocks */
__u32 i_generation; /* File version (for NFS) */
__u32 i_file_acl; /* File ACL */
__u32 i_dir_acl; /* Directory ACL */
__u32 i_faddr; /* Fragment address */
union {
struct {
__u8 l_i_frag; /* Fragment number */
__u8 l_i_fsize; /* Fragment size */
__u16 i_pad1;
__u16 l_i_uid_high; /* these 2 fields */
__u16 l_i_gid_high; /* were reserved2[0] */
__u32 l_i_reserved2;
} linux2;
struct {
__u8 h_i_frag; /* Fragment number */
__u8 h_i_fsize; /* Fragment size */
__u16 h_i_mode_high;
__u16 h_i_uid_high;
__u16 h_i_gid_high;
__u32 h_i_author;
} hurd2;
struct {
__u8 m_i_frag; /* Fragment number */
__u8 m_i_fsize; /* Fragment size */
__u16 m_pad1;
__u32 m_i_reserved2[2];
} masix2;
} osd2; /* OS dependent 2 */
};
#define i_size_high i_dir_acl
#if defined(__KERNEL__) || defined(__linux__)
#define i_reserved1 osd1.linux1.l_i_reserved1
#define i_frag osd2.linux2.l_i_frag
#define i_fsize osd2.linux2.l_i_fsize
#define i_uid_low i_uid
#define i_gid_low i_gid
#define i_uid_high osd2.linux2.l_i_uid_high
#define i_gid_high osd2.linux2.l_i_gid_high
#define i_reserved2 osd2.linux2.l_i_reserved2
#elif defined(__GNU__)
#define i_translator osd1.hurd1.h_i_translator
#define i_frag osd2.hurd2.h_i_frag;
#define i_fsize osd2.hurd2.h_i_fsize;
#define i_uid_high osd2.hurd2.h_i_uid_high
#define i_gid_high osd2.hurd2.h_i_gid_high
#define i_author osd2.hurd2.h_i_author
#elif defined(__masix__)
#define i_reserved1 osd1.masix1.m_i_reserved1
#define i_frag osd2.masix2.m_i_frag
#define i_fsize osd2.masix2.m_i_fsize
#define i_reserved2 osd2.masix2.m_i_reserved2
#endif /* defined(__KERNEL__) || defined(__linux__) */
/*
* File system states
*/
#define EXT3_VALID_FS 0x0001 /* Unmounted cleanly */
#define EXT3_ERROR_FS 0x0002 /* Errors detected */
#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */
/*
* Mount flags
*/
#define EXT3_MOUNT_CHECK 0x0001 /* Do mount-time checks */
#define EXT3_MOUNT_GRPID 0x0004 /* Create files with directory's group */
#define EXT3_MOUNT_DEBUG 0x0008 /* Some debugging messages */
#define EXT3_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
#define EXT3_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
#define EXT3_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
#define EXT3_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
#define EXT3_MOUNT_NOLOAD 0x0100 /* Don't use existing journal*/
#define EXT3_MOUNT_ABORT 0x0200 /* Fatal error detected */
#define EXT3_MOUNT_DATA_FLAGS 0x0C00 /* Mode for data writes: */
#define EXT3_MOUNT_JOURNAL_DATA 0x0400 /* Write data to journal */
#define EXT3_MOUNT_ORDERED_DATA 0x0800 /* Flush data before commit */
#define EXT3_MOUNT_WRITEBACK_DATA 0x0C00 /* No data ordering */
#define EXT3_MOUNT_UPDATE_JOURNAL 0x1000 /* Update the journal format */
#define EXT3_MOUNT_NO_UID32 0x2000 /* Disable 32-bit UIDs */
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
#ifndef _LINUX_EXT2_FS_H
#define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt
#define set_opt(o, opt) o |= EXT3_MOUNT_##opt
#define test_opt(sb, opt) ((sb)->u.ext3_sb.s_mount_opt & \
EXT3_MOUNT_##opt)
#else
#define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD
#define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT
#endif
#define ext3_set_bit ext2_set_bit
#define ext3_clear_bit ext2_clear_bit
#define ext3_test_bit ext2_test_bit
#define ext3_find_first_zero_bit ext2_find_first_zero_bit
#define ext3_find_next_zero_bit ext2_find_next_zero_bit
/*
* Maximal mount counts between two filesystem checks
*/
#define EXT3_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
#define EXT3_DFL_CHECKINTERVAL 0 /* Don't use interval check */
/*
* Behaviour when detecting errors
*/
#define EXT3_ERRORS_CONTINUE 1 /* Continue execution */
#define EXT3_ERRORS_RO 2 /* Remount fs read-only */
#define EXT3_ERRORS_PANIC 3 /* Panic */
#define EXT3_ERRORS_DEFAULT EXT3_ERRORS_CONTINUE
/*
* Structure of the super block
*/
struct ext3_super_block {
/*00*/ __u32 s_inodes_count; /* Inodes count */
__u32 s_blocks_count; /* Blocks count */
__u32 s_r_blocks_count; /* Reserved blocks count */
__u32 s_free_blocks_count; /* Free blocks count */
/*10*/ __u32 s_free_inodes_count; /* Free inodes count */
__u32 s_first_data_block; /* First Data Block */
__u32 s_log_block_size; /* Block size */
__s32 s_log_frag_size; /* Fragment size */
/*20*/ __u32 s_blocks_per_group; /* # Blocks per group */
__u32 s_frags_per_group; /* # Fragments per group */
__u32 s_inodes_per_group; /* # Inodes per group */
__u32 s_mtime; /* Mount time */
/*30*/ __u32 s_wtime; /* Write time */
__u16 s_mnt_count; /* Mount count */
__s16 s_max_mnt_count; /* Maximal mount count */
__u16 s_magic; /* Magic signature */
__u16 s_state; /* File system state */
__u16 s_errors; /* Behaviour when detecting errors */
__u16 s_minor_rev_level; /* minor revision level */
/*40*/ __u32 s_lastcheck; /* time of last check */
__u32 s_checkinterval; /* max. time between checks */
__u32 s_creator_os; /* OS */
__u32 s_rev_level; /* Revision level */
/*50*/ __u16 s_def_resuid; /* Default uid for reserved blocks */
__u16 s_def_resgid; /* Default gid for reserved blocks */
/*
* These fields are for EXT3_DYNAMIC_REV superblocks only.
*
* Note: the difference between the compatible feature set and
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the filesystem.
*
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
* things it doesn't understand...
*/
__u32 s_first_ino; /* First non-reserved inode */
__u16 s_inode_size; /* size of inode structure */
__u16 s_block_group_nr; /* block group # of this superblock */
__u32 s_feature_compat; /* compatible feature set */
/*60*/ __u32 s_feature_incompat; /* incompatible feature set */
__u32 s_feature_ro_compat; /* readonly-compatible feature set */
/*68*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
/*78*/ char s_volume_name[16]; /* volume name */
/*88*/ char s_last_mounted[64]; /* directory where last mounted */
/*C8*/ __u32 s_algorithm_usage_bitmap; /* For compression */
/*
* Performance hints. Directory preallocation should only
* happen if the EXT3_FEATURE_COMPAT_DIR_PREALLOC flag is on.
*/
__u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
__u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
__u16 s_padding1;
/*
* Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
*/
/*D0*/ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
/*E0*/ __u32 s_journal_inum; /* inode number of journal file */
__u32 s_journal_dev; /* device number of journal file */
__u32 s_last_orphan; /* start of list of inodes to delete */
/*EC*/ __u32 s_reserved[197]; /* Padding to the end of the block */
};
#ifdef __KERNEL__
#define EXT3_SB(sb) (&((sb)->u.ext3_sb))
#define EXT3_I(inode) (&((inode)->u.ext3_i))
#else
/* Assume that user mode programs are passing in an ext3fs superblock, not
* a kernel struct super_block. This will allow us to call the feature-test
* macros from user land. */
#define EXT3_SB(sb) (sb)
#endif
#define NEXT_ORPHAN(inode) (inode)->u.ext3_i.i_dtime
/*
* Codes for operating systems
*/
#define EXT3_OS_LINUX 0
#define EXT3_OS_HURD 1
#define EXT3_OS_MASIX 2
#define EXT3_OS_FREEBSD 3
#define EXT3_OS_LITES 4
/*
* Revision levels
*/
#define EXT3_GOOD_OLD_REV 0 /* The good old (original) format */
#define EXT3_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
#define EXT3_CURRENT_REV EXT3_GOOD_OLD_REV
#define EXT3_MAX_SUPP_REV EXT3_DYNAMIC_REV
#define EXT3_GOOD_OLD_INODE_SIZE 128
/*
* Feature set definitions
*/
#define EXT3_HAS_COMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
#define EXT3_HAS_RO_COMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
#define EXT3_HAS_INCOMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
#define EXT3_SET_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
#define EXT3_SET_RO_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
#define EXT3_SET_INCOMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
#define EXT3_CLEAR_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
#define EXT3_CLEAR_INCOMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
#define EXT3_FEATURE_COMPAT_DIR_PREALLOC 0x0001
#define EXT3_FEATURE_COMPAT_IMAGIC_INODES 0x0002
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
#define EXT3_FEATURE_COMPAT_EXT_ATTR 0x0008
#define EXT3_FEATURE_COMPAT_RESIZE_INODE 0x0010
#define EXT3_FEATURE_COMPAT_DIR_INDEX 0x0020
#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
#define EXT3_FEATURE_COMPAT_SUPP 0
/*#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \
EXT3_FEATURE_INCOMPAT_RECOVER)*/
#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE)
#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
/*
* Default values for user and/or group using reserved blocks
*/
#define EXT3_DEF_RESUID 0
#define EXT3_DEF_RESGID 0
/*
* Structure of a directory entry
*/
#define EXT3_NAME_LEN 255
struct ext3_dir_entry {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u16 name_len; /* Name length */
char name[EXT3_NAME_LEN]; /* File name */
};
/*
* The new version of the directory entry. Since EXT3 structures are
* stored in intel byte order, and the name_len field could never be
* bigger than 255 chars, it's safe to reclaim the extra byte for the
* file_type field.
*/
struct ext3_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT3_NAME_LEN]; /* File name */
};
/*
* Ext3 directory file types. Only the low 3 bits are used. The
* other bits are reserved for now.
*/
#define EXT3_FT_UNKNOWN 0
#define EXT3_FT_REG_FILE 1
#define EXT3_FT_DIR 2
#define EXT3_FT_CHRDEV 3
#define EXT3_FT_BLKDEV 4
#define EXT3_FT_FIFO 5
#define EXT3_FT_SOCK 6
#define EXT3_FT_SYMLINK 7
#define EXT3_FT_MAX 8
/*
* EXT3_DIR_PAD defines the directory entries boundaries
*
* NOTE: It must be a multiple of 4
*/
#define EXT3_DIR_PAD 4
#define EXT3_DIR_ROUND (EXT3_DIR_PAD - 1)
#define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & \
~EXT3_DIR_ROUND)
#ifdef __KERNEL__
/*
* Describe an inode's exact location on disk and in memory
*/
struct ext3_iloc
{
struct buffer_head *bh;
struct ext3_inode *raw_inode;
unsigned long block_group;
};
#endif /* __KERNEL__ */
#endif /* _LINUX_EXT3_FS_H */
typedef struct ext3_super_block EXT2_SUPER_BLOCK, *PEXT2_SUPER_BLOCK;
typedef struct ext3_inode EXT2_INODE, *PEXT2_INODE;
typedef struct ext3_group_desc EXT2_GROUP_DESC, *PEXT2_GROUP_DESC;
typedef struct ext3_dir_entry_2 EXT2_DIR_ENTRY, *PEXT2_DIR_ENTRY;
// EXT2_INODE::i_mode values
#define EXT2_S_IRWXO 0x0007 // Other mask
#define EXT2_S_IXOTH 0x0001 // ---------x execute
#define EXT2_S_IWOTH 0x0002 // --------w- write
#define EXT2_S_IROTH 0x0004 // -------r-- read
#define EXT2_S_IRWXG 0x0038 // Group mask
#define EXT2_S_IXGRP 0x0008 // ------x--- execute
#define EXT2_S_IWGRP 0x0010 // -----w---- write
#define EXT2_S_IRGRP 0x0020 // ----r----- read
#define EXT2_S_IRWXU 0x01C0 // User mask
#define EXT2_S_IXUSR 0x0040 // ---x------ execute
#define EXT2_S_IWUSR 0x0080 // --w------- write
#define EXT2_S_IRUSR 0x0100 // -r-------- read
#define EXT2_S_ISVTX 0x0200 // Sticky bit
#define EXT2_S_ISGID 0x0400 // SGID
#define EXT2_S_ISUID 0x0800 // SUID
#define EXT2_S_IFMT 0xF000 // Format mask
#define EXT2_S_IFIFO 0x1000 // FIFO buffer
#define EXT2_S_IFCHR 0x2000 // Character device
#define EXT2_S_IFDIR 0x4000 // Directory
#define EXT2_S_IFBLK 0x6000 // Block device
#define EXT2_S_IFREG 0x8000 // Regular file
#define EXT2_S_IFLNK 0xA000 // Symbolic link
#define EXT2_S_IFSOCK 0xC000 // Socket
#define FAST_SYMLINK_MAX_NAME_SIZE (EXT3_N_BLOCKS * sizeof(U32)) /* 60 bytes */
typedef struct
{
U64 FileSize; // File size
U64 FilePointer; // File pointer
U32* FileBlockList; // File block list
U8 DriveNumber; // Drive number of open file
EXT2_INODE Inode; // File's inode
} EXT2_FILE_INFO, * PEXT2_FILE_INFO;
BOOL Ext2OpenVolume(U8 DriveNumber, U64 VolumeStartSector);
FILE* Ext2OpenFile(PUCHAR FileName);
BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer);
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry);
BOOL Ext2ReadFile(FILE *FileHandle, U64 BytesToRead, U64* BytesRead, PVOID Buffer);
U64 Ext2GetFileSize(FILE *FileHandle);
VOID Ext2SetFilePointer(FILE *FileHandle, U64 NewFilePointer);
U64 Ext2GetFilePointer(FILE *FileHandle);
BOOL Ext2ReadVolumeSectors(U8 DriveNumber, U64 SectorNumber, U64 SectorCount, PVOID Buffer);
BOOL Ext2ReadSuperBlock(VOID);
BOOL Ext2ReadGroupDescriptors(VOID);
BOOL Ext2ReadDirectory(U32 Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer);
BOOL Ext2ReadBlock(U32 BlockNumber, PVOID Buffer);
BOOL Ext2ReadPartialBlock(U32 BlockNumber, U32 StartingOffset, U32 Length, PVOID Buffer);
U32 Ext2GetGroupDescBlockNumber(U32 Group);
U32 Ext2GetGroupDescOffsetInBlock(U32 Group);
U32 Ext2GetInodeGroupNumber(U32 Inode);
U32 Ext2GetInodeBlockNumber(U32 Inode);
U32 Ext2GetInodeOffsetInBlock(U32 Inode);
BOOL Ext2ReadInode(U32 Inode, PEXT2_INODE InodeBuffer);
BOOL Ext2ReadGroupDescriptor(U32 Group, PEXT2_GROUP_DESC GroupBuffer);
U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode);
U64 Ext2GetInodeFileSize(PEXT2_INODE Inode);
BOOL Ext2CopyIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 IndirectBlock);
BOOL Ext2CopyDoubleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 DoubleIndirectBlock);
BOOL Ext2CopyTripleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 TripleIndirectBlock);
#endif // #defined __EXT2_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,162 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FAT_H
#define __FAT_H
typedef struct _FAT_BOOTSECTOR
{
U8 JumpBoot[3]; // Jump instruction to boot code
U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes
U16 BytesPerSector; // Bytes per sector
U8 SectorsPerCluster; // Number of sectors in a cluster
U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
U8 NumberOfFats; // Number of FAT tables
U16 RootDirEntries; // Number of root directory entries (fat12/16)
U16 TotalSectors; // Number of total sectors on the drive, 16-bit
U8 MediaDescriptor; // Media descriptor byte
U16 SectorsPerFat; // Sectors per FAT table (fat12/16)
U16 SectorsPerTrack; // Number of sectors in a track
U16 NumberOfHeads; // Number of heads on the disk
U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80)
U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
U32 VolumeSerialNumber; // Volume serial number
U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
U8 FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT "
U8 BootCodeAndData[448]; // The remainder of the boot sector
U16 BootSectorMagic; // 0xAA55
} PACKED FAT_BOOTSECTOR, *PFAT_BOOTSECTOR;
typedef struct _FAT32_BOOTSECTOR
{
U8 JumpBoot[3]; // Jump instruction to boot code
U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes
U16 BytesPerSector; // Bytes per sector
U8 SectorsPerCluster; // Number of sectors in a cluster
U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
U8 NumberOfFats; // Number of FAT tables
U16 RootDirEntries; // Number of root directory entries (fat12/16)
U16 TotalSectors; // Number of total sectors on the drive, 16-bit
U8 MediaDescriptor; // Media descriptor byte
U16 SectorsPerFat; // Sectors per FAT table (fat12/16)
U16 SectorsPerTrack; // Number of sectors in a track
U16 NumberOfHeads; // Number of heads on the disk
U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
U32 SectorsPerFatBig; // This field is the FAT32 32-bit count of sectors occupied by ONE FAT. BPB_FATSz16 must be 0
U16 ExtendedFlags; // Extended flags (fat32)
U16 FileSystemVersion; // File system version (fat32)
U32 RootDirStartCluster; // Starting cluster of the root directory (fat32)
U16 FsInfo; // Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1.
U16 BackupBootSector; // If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6.
U8 Reserved[12]; // Reserved for future expansion
U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80)
U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
U32 VolumeSerialNumber; // Volume serial number
U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
U8 FileSystemType[8]; // Always set to the string "FAT32 "
U8 BootCodeAndData[420]; // The remainder of the boot sector
U16 BootSectorMagic; // 0xAA55
} PACKED FAT32_BOOTSECTOR, *PFAT32_BOOTSECTOR;
/*
* Structure of MSDOS directory entry
*/
typedef struct //_DIRENTRY
{
UCHAR FileName[11]; /* Filename + extension */
U8 Attr; /* File attributes */
U8 ReservedNT; /* Reserved for use by Windows NT */
U8 TimeInTenths; /* Millisecond stamp at file creation */
U16 CreateTime; /* Time file was created */
U16 CreateDate; /* Date file was created */
U16 LastAccessDate; /* Date file was last accessed */
U16 ClusterHigh; /* High word of this entry's start cluster */
U16 Time; /* Time last modified */
U16 Date; /* Date last modified */
U16 ClusterLow; /* First cluster number low word */
U32 Size; /* File size */
} PACKED DIRENTRY, * PDIRENTRY;
typedef struct
{
U8 SequenceNumber; /* Sequence number for slot */
WCHAR Name0_4[5]; /* First 5 characters in name */
U8 EntryAttributes; /* Attribute byte */
U8 Reserved; /* Always 0 */
U8 AliasChecksum; /* Checksum for 8.3 alias */
WCHAR Name5_10[6]; /* 6 more characters in name */
U16 StartCluster; /* Starting cluster number */
WCHAR Name11_12[2]; /* Last 2 characters in name */
} PACKED LFN_DIRENTRY, * PLFN_DIRENTRY;
typedef struct
{
U32 FileSize; // File size
U32 FilePointer; // File pointer
U32* FileFatChain; // File fat chain array
U32 DriveNumber;
} FAT_FILE_INFO, * PFAT_FILE_INFO;
BOOL FatOpenVolume(U32 DriveNumber, U32 VolumeStartSector);
U32 FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector);
PVOID FatBufferDirectory(U32 DirectoryStartCluster, U32* EntryCountPointer, BOOL RootDirectory);
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry);
BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer);
FILE* FatOpenFile(PUCHAR FileName);
U32 FatCountClustersInChain(U32 StartCluster);
U32* FatGetClusterChainArray(U32 StartCluster);
BOOL FatReadCluster(U32 ClusterNumber, PVOID Buffer);
BOOL FatReadClusterChain(U32 StartClusterNumber, U32 NumberOfClusters, PVOID Buffer);
BOOL FatReadPartialCluster(U32 ClusterNumber, U32 StartingOffset, U32 Length, PVOID Buffer);
BOOL FatReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 FatGetFileSize(FILE *FileHandle);
VOID FatSetFilePointer(FILE *FileHandle, U32 NewFilePointer);
U32 FatGetFilePointer(FILE *FileHandle);
BOOL FatReadVolumeSectors(U32 DriveNumber, U32 SectorNumber, U32 SectorCount, PVOID Buffer);
#define ATTR_NORMAL 0x00
#define ATTR_READONLY 0x01
#define ATTR_HIDDEN 0x02
#define ATTR_SYSTEM 0x04
#define ATTR_VOLUMENAME 0x08
#define ATTR_DIRECTORY 0x10
#define ATTR_ARCHIVE 0x20
#define ATTR_LONG_NAME (ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUMENAME)
#define FAT12 1
#define FAT16 2
#define FAT32 3
#endif // #defined __FAT_H

View File

@@ -1,393 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include "fat.h"
#include "iso.h"
#include "ext2.h"
#include "fsrec.h"
#include <disk.h>
#include <rtl.h>
#include <ui.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// DATA
/////////////////////////////////////////////////////////////////////////////////////////////
U32 FileSystemType = 0; // Type of filesystem on boot device, set by FsOpenVolume()
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID FileSystemError(PUCHAR ErrorString)
{
DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString));
UiMessageBox(ErrorString);
}
/*
*
* BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber);
*
* This function is called to open a disk volume for file access.
* It must be called before any of the file functions will work.
* It takes two parameters:
*
* Drive: The BIOS drive number of the disk to open
* Partition: This is zero for floppy drives.
* If the disk is a hard disk then this specifies
* The partition number to open (1 - 4)
* If it is zero then it opens the active (bootable) partition
*
*/
BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber)
{
PARTITION_TABLE_ENTRY PartitionTableEntry;
UCHAR ErrorText[80];
U8 VolumeType;
DbgPrint((DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber: 0x%x\n", DriveNumber, PartitionNumber));
// Check and see if it is a floppy drive
// If so then just assume FAT12 file system type
if (DiskIsDriveRemovable(DriveNumber))
{
DbgPrint((DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file system.\n"));
FileSystemType = FS_FAT;
return FatOpenVolume(DriveNumber, 0);
}
// Check for ISO9660 file system type
if (DriveNumber > 0x80 && FsRecIsIso9660(DriveNumber))
{
DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n"));
FileSystemType = FS_ISO9660;
return IsoOpenVolume(DriveNumber);
}
// Set the boot partition
BootPartition = PartitionNumber;
// Get the requested partition entry
if (PartitionNumber == 0)
{
// Partition requested was zero which means the boot partition
if (DiskGetActivePartitionEntry(DriveNumber, &PartitionTableEntry) == FALSE)
{
FileSystemError("No active partition.");
return FALSE;
}
}
else
{
// Get requested partition
if (DiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry) == FALSE)
{
FileSystemError("Partition not found.");
return FALSE;
}
}
// Check for valid partition
if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
{
FileSystemError("Invalid partition.");
return FALSE;
}
// Try to recognize the file system
if (!FsRecognizeVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
{
FileSystemError("Unrecognized file system.");
return FALSE;
}
//switch (PartitionTableEntry.SystemIndicator)
switch (VolumeType)
{
case PARTITION_FAT_12:
case PARTITION_FAT_16:
case PARTITION_HUGE:
case PARTITION_XINT13:
case PARTITION_FAT32:
case PARTITION_FAT32_XINT13:
FileSystemType = FS_FAT;
return FatOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
case PARTITION_EXT2:
FileSystemType = FS_EXT2;
return Ext2OpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
default:
FileSystemType = 0;
sprintf(ErrorText, "Unsupported file system. Type: 0x%x", VolumeType);
FileSystemError(ErrorText);
return FALSE;
}
return TRUE;
}
PFILE FsOpenFile(PUCHAR FileName)
{
PFILE FileHandle = NULL;
//
// Print status message
//
DbgPrint((DPRINT_FILESYSTEM, "Opening file '%s'...\n", FileName));
//
// Check and see if the first character is '\' or '/' and remove it if so
//
while ((*FileName == '\\') || (*FileName == '/'))
{
FileName++;
}
//
// Check file system type and pass off to appropriate handler
//
switch (FileSystemType)
{
case FS_FAT:
FileHandle = FatOpenFile(FileName);
break;
case FS_ISO9660:
FileHandle = IsoOpenFile(FileName);
break;
case FS_EXT2:
FileHandle = Ext2OpenFile(FileName);
break;
default:
FileSystemError("Error: Unknown filesystem.");
break;
}
#ifdef DEBUG
//
// Check return value
//
if (FileHandle != NULL)
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() succeeded. FileHandle: 0x%x\n", FileHandle));
}
else
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() failed.\n"));
}
#endif // defined DEBUG
return FileHandle;
}
VOID FsCloseFile(PFILE FileHandle)
{
}
/*
* ReadFile()
* returns number of bytes read or EOF
*/
BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer)
{
U64 BytesReadBig;
BOOL Success;
//
// Set the number of bytes read equal to zero
//
if (BytesRead != NULL)
{
*BytesRead = 0;
}
switch (FileSystemType)
{
case FS_FAT:
return FatReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
case FS_ISO9660:
return IsoReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
case FS_EXT2:
//return Ext2ReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
Success = Ext2ReadFile(FileHandle, BytesToRead, &BytesReadBig, Buffer);
*BytesRead = (U32)BytesReadBig;
return Success;
default:
FileSystemError("Unknown file system.");
return FALSE;
}
return FALSE;
}
U32 FsGetFileSize(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFileSize(FileHandle);
case FS_ISO9660:
return IsoGetFileSize(FileHandle);
case FS_EXT2:
return Ext2GetFileSize(FileHandle);
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer)
{
switch (FileSystemType)
{
case FS_FAT:
FatSetFilePointer(FileHandle, NewFilePointer);
break;
case FS_ISO9660:
IsoSetFilePointer(FileHandle, NewFilePointer);
break;
case FS_EXT2:
Ext2SetFilePointer(FileHandle, NewFilePointer);
break;
default:
FileSystemError("Unknown file system.");
break;
}
}
U32 FsGetFilePointer(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFilePointer(FileHandle);
break;
case FS_ISO9660:
return IsoGetFilePointer(FileHandle);
break;
case FS_EXT2:
return Ext2GetFilePointer(FileHandle);
break;
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
BOOL FsIsEndOfFile(PFILE FileHandle)
{
if (FsGetFilePointer(FileHandle) >= FsGetFileSize(FileHandle))
{
return TRUE;
}
else
{
return FALSE;
}
}
/*
* FsGetNumPathParts()
* This function parses a path in the form of dir1\dir2\file1.ext
* and returns the number of parts it has (i.e. 3 - dir1,dir2,file1.ext)
*/
U32 FsGetNumPathParts(PUCHAR Path)
{
U32 i;
U32 num;
for (i=0,num=0; i<(int)strlen(Path); i++)
{
if ((Path[i] == '\\') || (Path[i] == '/'))
{
num++;
}
}
num++;
DbgPrint((DPRINT_FILESYSTEM, "FatGetNumPathParts() Path = %s NumPathParts = %d\n", Path, num));
return num;
}
/*
* FsGetFirstNameFromPath()
* This function parses a path in the form of dir1\dir2\file1.ext
* and puts the first name of the path (e.g. "dir1") in buffer
* compatible with the MSDOS directory structure
*/
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path)
{
U32 i;
// Copy all the characters up to the end of the
// string or until we hit a '\' character
// and put them in Buffer
for (i=0; i<(int)strlen(Path); i++)
{
if ((Path[i] == '\\') || (Path[i] == '/'))
{
break;
}
else
{
Buffer[i] = Path[i];
}
}
Buffer[i] = 0;
DbgPrint((DPRINT_FILESYSTEM, "FatGetFirstNameFromPath() Path = %s FirstName = %s\n", Path, Buffer));
}

View File

@@ -1,116 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include "fsrec.h"
#include "fat.h"
#include "iso.h"
#include "ext2.h"
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
/*
*
* BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType);
*
*/
BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType)
{
DbgPrint((DPRINT_FILESYSTEM, "FsRecognizeVolume() DriveNumber: 0x%x VolumeStartSector: %d\n", DriveNumber, VolumeStartSector));
if (FsRecIsExt2(DriveNumber, VolumeStartSector))
{
*VolumeType = PARTITION_EXT2;
return TRUE;
}
else if (FsRecIsFat(DriveNumber, VolumeStartSector))
{
*VolumeType = PARTITION_FAT32;
return TRUE;
}
return FALSE;
}
BOOL FsRecIsIso9660(U32 DriveNumber)
{
PUCHAR Sector = (PUCHAR)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Sector))
{
FileSystemError("Failed to read the PVD.");
return FALSE;
}
return (Sector[0] == 1 &&
Sector[1] == 'C' &&
Sector[2] == 'D' &&
Sector[3] == '0' &&
Sector[4] == '0' &&
Sector[5] == '1');
}
BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector)
{
PEXT2_SUPER_BLOCK SuperBlock = (PEXT2_SUPER_BLOCK)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, VolumeStartSector + 2, 2, SuperBlock))
{
FileSystemError("Failed to read the super block.");
return FALSE;
}
if (SuperBlock->s_magic == EXT3_SUPER_MAGIC)
{
return TRUE;
}
return FALSE;
}
BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector)
{
PFAT_BOOTSECTOR BootSector = (PFAT_BOOTSECTOR)DISKREADBUFFER;
PFAT32_BOOTSECTOR BootSector32 = (PFAT32_BOOTSECTOR)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, VolumeStartSector, 1, BootSector))
{
FileSystemError("Failed to read the boot sector.");
return FALSE;
}
if (strncmp(BootSector->FileSystemType, "FAT12 ", 8) == 0 ||
strncmp(BootSector->FileSystemType, "FAT16 ", 8) == 0 ||
strncmp(BootSector32->FileSystemType, "FAT32 ", 8) == 0)
{
return TRUE;
}
return FALSE;
}

View File

@@ -1,28 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FSREC_H
#define __FSREC_H
BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType);
BOOL FsRecIsIso9660(U32 DriveNumber);
BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector);
BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector);
#endif // #defined __FSREC_H

View File

@@ -1,478 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <cache.h>
#include "iso.h"
#define SECTORSIZE 2048
static U32 IsoRootSector; // Starting sector of the root directory
static U32 IsoRootLength; // Length of the root directory
U32 IsoDriveNumber = 0;
BOOL IsoOpenVolume(U32 DriveNumber)
{
PPVD Pvd = (PPVD)DISKREADBUFFER;
DbgPrint((DPRINT_FILESYSTEM, "IsoOpenVolume() DriveNumber = 0x%x VolumeStartSector = 16\n", DriveNumber));
// Store the drive number
IsoDriveNumber = DriveNumber;
IsoRootSector = 0;
IsoRootLength = 0;
if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Pvd))
{
FileSystemError("Failed to read the PVD.");
return FALSE;
}
IsoRootSector = Pvd->RootDirRecord.ExtentLocationL;
IsoRootLength = Pvd->RootDirRecord.DataLengthL;
DbgPrint((DPRINT_FILESYSTEM, "IsoRootSector = %u IsoRootLegth = %u\n", IsoRootSector, IsoRootLength));
return TRUE;
}
static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
PDIR_RECORD Record;
U32 Offset;
U32 i;
UCHAR Name[32];
DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
RtlZeroMemory(Name, 32 * sizeof(UCHAR));
Offset = 0;
Record = (PDIR_RECORD)DirectoryBuffer;
while (TRUE)
{
Offset = Offset + Record->RecordLength;
Record = (PDIR_RECORD)(DirectoryBuffer + Offset);
if (Record->RecordLength == 0)
{
Offset = ROUND_UP(Offset, SECTORSIZE);
Record = (PDIR_RECORD)(DirectoryBuffer + Offset);
}
if (Record->FileIdLength == 1 && Record->FileId[0] == 0)
{
DbgPrint((DPRINT_FILESYSTEM, "Name '.'\n"));
}
else if (Record->FileIdLength == 1 && Record->FileId[0] == 1)
{
DbgPrint((DPRINT_FILESYSTEM, "Name '..'\n"));
}
else
{
for (i = 0; i < Record->FileIdLength && Record->FileId[i] != ';'; i++)
Name[i] = Record->FileId[i];
Name[i] = 0;
DbgPrint((DPRINT_FILESYSTEM, "Name '%s'\n", Name));
if (strlen(FileName) == strlen(Name) && stricmp(FileName, Name) == 0)
{
IsoFileInfoPointer->FileStart = Record->ExtentLocationL;
IsoFileInfoPointer->FileSize = Record->DataLengthL;
IsoFileInfoPointer->FilePointer = 0;
IsoFileInfoPointer->Directory = (Record->FileFlags & 0x02)?TRUE:FALSE;
return TRUE;
}
}
if (Offset >= DirectoryLength)
return FALSE;
RtlZeroMemory(Name, 32 * sizeof(UCHAR));
}
return FALSE;
}
/*
* IsoBufferDirectory()
* This function allocates a buffer, reads the specified directory
* and returns a pointer to that buffer. The function returns NULL
* if allocation or read fails. The directory is specified by its
* starting sector and length.
*/
static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength)
{
PVOID DirectoryBuffer;
PVOID Ptr;
U32 SectorCount;
U32 i;
DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength));
SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
DbgPrint((DPRINT_FILESYSTEM, "Trying to read (DirectoryCount) %d sectors.\n", SectorCount));
//
// Attempt to allocate memory for directory buffer
//
DbgPrint((DPRINT_FILESYSTEM, "Trying to allocate (DirectoryLength) %d bytes.\n", DirectoryLength));
DirectoryBuffer = MmAllocateMemory(DirectoryLength);
if (DirectoryBuffer == NULL)
{
return NULL;
}
//
// Now read directory contents into DirectoryBuffer
//
for (i = 0, Ptr = DirectoryBuffer; i < SectorCount; i++, Ptr += SECTORSIZE)
{
if (!DiskReadLogicalSectors(IsoDriveNumber, DirectoryStartSector + i, 1, (PVOID)DISKREADBUFFER))
{
MmFreeMemory(DirectoryBuffer);
return NULL;
}
RtlCopyMemory(Ptr, (PVOID)DISKREADBUFFER, SECTORSIZE);
}
return DirectoryBuffer;
}
/*
* IsoLookupFile()
* This function searches the file system for the
* specified filename and fills in an ISO_FILE_INFO structure
* with info describing the file, etc. returns true
* if the file exists or false otherwise
*/
static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
int i;
U32 NumberOfPathParts;
UCHAR PathPart[261];
PVOID DirectoryBuffer;
U32 DirectorySector;
U32 DirectoryLength;
ISO_FILE_INFO IsoFileInfo;
DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName));
RtlZeroMemory(IsoFileInfoPointer, sizeof(ISO_FILE_INFO));
//
// Figure out how many sub-directories we are nested in
//
NumberOfPathParts = FsGetNumPathParts(FileName);
DirectorySector = IsoRootSector;
DirectoryLength = IsoRootLength;
//
// Loop once for each part
//
for (i=0; i<NumberOfPathParts; i++)
{
//
// Get first path part
//
FsGetFirstNameFromPath(PathPart, FileName);
//
// Advance to the next part of the path
//
for (; (*FileName != '\\') && (*FileName != '/') && (*FileName != '\0'); FileName++)
{
}
FileName++;
//
// Buffer the directory contents
//
DirectoryBuffer = IsoBufferDirectory(DirectorySector, DirectoryLength);
if (DirectoryBuffer == NULL)
{
return FALSE;
}
//
// Search for file name in directory
//
if (!IsoSearchDirectoryBufferForFile(DirectoryBuffer, DirectoryLength, PathPart, &IsoFileInfo))
{
MmFreeMemory(DirectoryBuffer);
return FALSE;
}
MmFreeMemory(DirectoryBuffer);
//
// If we have another sub-directory to go then
// grab the start sector and file size
//
if ((i+1) < NumberOfPathParts)
{
DirectorySector = IsoFileInfo.FileStart;
DirectoryLength = IsoFileInfo.FileSize;
}
}
RtlCopyMemory(IsoFileInfoPointer, &IsoFileInfo, sizeof(ISO_FILE_INFO));
return TRUE;
}
/*
* IsoOpenFile()
* Tries to open the file 'name' and returns true or false
* for success and failure respectively
*/
FILE* IsoOpenFile(PUCHAR FileName)
{
ISO_FILE_INFO TempFileInfo;
PISO_FILE_INFO FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoOpenFile() FileName = %s\n", FileName));
if (!IsoLookupFile(FileName, &TempFileInfo))
{
return NULL;
}
FileHandle = MmAllocateMemory(sizeof(ISO_FILE_INFO));
if (FileHandle == NULL)
{
return NULL;
}
RtlCopyMemory(FileHandle, &TempFileInfo, sizeof(ISO_FILE_INFO));
return (FILE*)FileHandle;
}
/*
* IsoReadFile()
* Reads BytesToRead from open file and
* returns the number of bytes read in BytesRead
*/
BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer)
{
PISO_FILE_INFO IsoFileInfo = (PISO_FILE_INFO)FileHandle;
U32 SectorNumber;
U32 OffsetInSector;
U32 LengthInSector;
U32 NumberOfSectors;
U32 i;
DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer));
if (BytesRead != NULL)
{
*BytesRead = 0;
}
//
// If they are trying to read past the
// end of the file then return success
// with BytesRead == 0
//
if (IsoFileInfo->FilePointer >= IsoFileInfo->FileSize)
{
return TRUE;
}
//
// If they are trying to read more than there is to read
// then adjust the amount to read
//
if ((IsoFileInfo->FilePointer + BytesToRead) > IsoFileInfo->FileSize)
{
BytesToRead = (IsoFileInfo->FileSize - IsoFileInfo->FilePointer);
}
//
// Ok, now we have to perform at most 3 calculations
// I'll draw you a picture (using nifty ASCII art):
//
// CurrentFilePointer -+
// |
// +----------------+
// |
// +-----------+-----------+-----------+-----------+
// | Sector 1 | Sector 2 | Sector 3 | Sector 4 |
// +-----------+-----------+-----------+-----------+
// | |
// +---------------+--------------------+
// |
// BytesToRead -------+
//
// 1 - The first calculation (and read) will align
// the file pointer with the next sector
// boundary (if we are supposed to read that much)
// 2 - The next calculation (and read) will read
// in all the full sectors that the requested
// amount of data would cover (in this case
// sectors 2 & 3).
// 3 - The last calculation (and read) would read
// in the remainder of the data requested out of
// the last sector.
//
//
// Only do the first read if we
// aren't aligned on a cluster boundary
//
if (IsoFileInfo->FilePointer % SECTORSIZE)
{
//
// Do the math for our first read
//
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
OffsetInSector = IsoFileInfo->FilePointer % SECTORSIZE;
LengthInSector = (BytesToRead > (SECTORSIZE - OffsetInSector)) ? (SECTORSIZE - OffsetInSector) : BytesToRead;
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, ((PVOID)DISKREADBUFFER + OffsetInSector), LengthInSector);
if (BytesRead != NULL)
{
*BytesRead += LengthInSector;
}
BytesToRead -= LengthInSector;
IsoFileInfo->FilePointer += LengthInSector;
Buffer += LengthInSector;
}
//
// Do the math for our second read (if any data left)
//
if (BytesToRead > 0)
{
//
// Determine how many full clusters we need to read
//
NumberOfSectors = (BytesToRead / SECTORSIZE);
for (i = 0; i < NumberOfSectors; i++)
{
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectorsLBA(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, SECTORSIZE);
if (BytesRead != NULL)
{
*BytesRead += SECTORSIZE;
}
BytesToRead -= SECTORSIZE;
IsoFileInfo->FilePointer += SECTORSIZE;
Buffer += SECTORSIZE;
}
}
//
// Do the math for our third read (if any data left)
//
if (BytesToRead > 0)
{
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectorsLBA(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, BytesToRead);
if (BytesRead != NULL)
{
*BytesRead += BytesToRead;
}
IsoFileInfo->FilePointer += BytesToRead;
BytesToRead -= BytesToRead;
Buffer += BytesToRead;
}
DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() done\n"));
return TRUE;
}
U32 IsoGetFileSize(FILE *FileHandle)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoGetFileSize() FileSize = %d\n", IsoFileHandle->FileSize));
return IsoFileHandle->FileSize;
}
VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoSetFilePointer() NewFilePointer = %d\n", NewFilePointer));
IsoFileHandle->FilePointer = NewFilePointer;
}
U32 IsoGetFilePointer(FILE *FileHandle)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoGetFilePointer() FilePointer = %d\n", IsoFileHandle->FilePointer));
return IsoFileHandle->FilePointer;
}

View File

@@ -1,115 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ISO_H
#define __ISO_H
struct _DIR_RECORD
{
UCHAR RecordLength; // 1
UCHAR ExtAttrRecordLength; // 2
U32 ExtentLocationL; // 3-6
U32 ExtentLocationM; // 7-10
U32 DataLengthL; // 11-14
U32 DataLengthM; // 15-18
UCHAR Year; // 19
UCHAR Month; // 20
UCHAR Day; // 21
UCHAR Hour; // 22
UCHAR Minute; // 23
UCHAR Second; // 24
UCHAR TimeZone; // 25
UCHAR FileFlags; // 26
UCHAR FileUnitSize; // 27
UCHAR InterleaveGapSize; // 28
U32 VolumeSequenceNumber; // 29-32
UCHAR FileIdLength; // 33
UCHAR FileId[1]; // 34
} __attribute__((packed));
typedef struct _DIR_RECORD DIR_RECORD, *PDIR_RECORD;
/* Volume Descriptor header*/
struct _VD_HEADER
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
} __attribute__((packed));
typedef struct _VD_HEADER VD_HEADER, *PVD_HEADER;
/* Primary Volume Descriptor */
struct _PVD
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
UCHAR unused0; // 8
UCHAR SystemId[32]; // 9-40
UCHAR VolumeId[32]; // 41-72
UCHAR unused1[8]; // 73-80
U32 VolumeSpaceSizeL; // 81-84
U32 VolumeSpaceSizeM; // 85-88
UCHAR unused2[32]; // 89-120
U32 VolumeSetSize; // 121-124
U32 VolumeSequenceNumber; // 125-128
U32 LogicalBlockSize; // 129-132
U32 PathTableSizeL; // 133-136
U32 PathTableSizeM; // 137-140
U32 LPathTablePos; // 141-144
U32 LOptPathTablePos; // 145-148
U32 MPathTablePos; // 149-152
U32 MOptPathTablePos; // 153-156
DIR_RECORD RootDirRecord; // 157-190
UCHAR VolumeSetIdentifier[128]; // 191-318
UCHAR PublisherIdentifier[128]; // 319-446
/* more data ... */
} __attribute__((packed));
typedef struct _PVD PVD, *PPVD;
typedef struct
{
U32 FileStart; // File start sector
U32 FileSize; // File size
U32 FilePointer; // File pointer
BOOL Directory;
U32 DriveNumber;
} ISO_FILE_INFO, * PISO_FILE_INFO;
BOOL IsoOpenVolume(U32 DriveNumber);
FILE* IsoOpenFile(PUCHAR FileName);
BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 IsoGetFileSize(FILE *FileHandle);
VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer);
U32 IsoGetFilePointer(FILE *FileHandle);
#endif // #defined __FAT_H

View File

@@ -1,171 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ARCH_H
#define __ARCH_H
/* Defines needed for switching between real and protected mode */
#define NULL_DESC 0x00 /* NULL descriptor */
#define PMODE_CS 0x08 /* PMode code selector, base 0 limit 4g */
#define PMODE_DS 0x10 /* PMode data selector, base 0 limit 4g */
#define RMODE_CS 0x18 /* RMode code selector, base 0 limit 64k */
#define RMODE_DS 0x20 /* RMode data selector, base 0 limit 64k */
#define KERNEL_BASE 0xC0000000
//#define USER_CS 0x08
//#define USER_DS 0x10
//#define KERNEL_CS 0x20
//#define KERNEL_DS 0x28
#define KERNEL_CS 0x08
#define KERNEL_DS 0x10
#define CR0_PE_SET 0x00000001 /* OR this value with CR0 to enable pmode */
#define CR0_PE_CLR 0xFFFFFFFE /* AND this value with CR0 to disable pmode */
#define STACK16ADDR 0x7000 /* The 16-bit stack top will be at 0000:7000 */
#define STACK32ADDR 0x78000 /* The 32-bit stack top will be at 7000:8000, or 0x78000 */
#define BIOSCALLBUFFER 0x78000 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFSEGMENT 0x7800 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */
#define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer for FAT) */
#define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the BIOS */
/* Makes "x" a global variable or label */
#define EXTERN(x) .global x; x:
#ifndef ASM
typedef struct
{
unsigned long eax;
unsigned long ebx;
unsigned long ecx;
unsigned long edx;
unsigned long esi;
unsigned long edi;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned long eflags;
} PACKED DWORDREGS;
typedef struct
{
unsigned short ax, _upper_ax;
unsigned short bx, _upper_bx;
unsigned short cx, _upper_cx;
unsigned short dx, _upper_dx;
unsigned short si, _upper_si;
unsigned short di, _upper_di;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned short flags, _upper_flags;
} PACKED WORDREGS;
typedef struct
{
unsigned char al;
unsigned char ah;
unsigned short _upper_ax;
unsigned char bl;
unsigned char bh;
unsigned short _upper_bx;
unsigned char cl;
unsigned char ch;
unsigned short _upper_cx;
unsigned char dl;
unsigned char dh;
unsigned short _upper_dx;
unsigned short si, _upper_si;
unsigned short di, _upper_di;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned short flags, _upper_flags;
} PACKED BYTEREGS;
typedef union
{
DWORDREGS x;
DWORDREGS d;
WORDREGS w;
BYTEREGS b;
} REGS;
// Int386()
//
// Real mode interrupt vector interface
//
// (E)FLAGS can *only* be returned by this function, not set.
// Make sure all memory pointers are in SEG:OFFS format and
// not linear addresses, unless the interrupt handler
// specifically handles linear addresses.
int Int386(int ivec, REGS* in, REGS* out);
// Flag Masks
#define I386FLAG_CF 0x0001 // Carry Flag
#define I386FLAG_RESV1 0x0002 // Reserved - Must be 1
#define I386FLAG_PF 0x0004 // Parity Flag
#define I386FLAG_RESV2 0x0008 // Reserved - Must be 0
#define I386FLAG_AF 0x0010 // Auxiliary Flag
#define I386FLAG_RESV3 0x0020 // Reserved - Must be 0
#define I386FLAG_ZF 0x0040 // Zero Flag
#define I386FLAG_SF 0x0080 // Sign Flag
#define I386FLAG_TF 0x0100 // Trap Flag (Single Step)
#define I386FLAG_IF 0x0200 // Interrupt Flag
#define I386FLAG_DF 0x0400 // Direction Flag
#define I386FLAG_OF 0x0800 // Overflow Flag
// This macro tests the Carry Flag
// If CF is set then the call failed (usually)
#define INT386_SUCCESS(regs) ((regs.x.eflags & I386FLAG_CF) == 0)
void EnableA20(void);
VOID ChainLoadBiosBootSectorCode(VOID); // Implemented in boot.S
VOID SoftReboot(VOID); // Implemented in boot.S
VOID DetectHardware(VOID); // Implemented in hardware.c
#endif /* ! ASM */
#endif // #defined __ARCH_H

View File

@@ -1,29 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __BOOTMGR_H
#define __BOOTMGR_H
U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount);
S32 GetTimeOut(VOID);
BOOL MainBootMenuKeyPressFilter(U32 KeyPress);
#endif // #defined __BOOTMGR_H

View File

@@ -1,30 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CACHE_H
#define __CACHE_H
BOOL CacheInitializeDrive(U32 DriveNumber);
VOID CacheInvalidateCacheData(VOID);
BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer);
BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount);
BOOL CacheReleaseMemory(U32 MinimumAmountToRelease);
#endif // defined __CACHE_H

View File

@@ -1,32 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __RS232_H
#define __RS232_H
BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate);
BOOL Rs232PortGetByte(PUCHAR ByteRecieved);
BOOL Rs232PortPollByte(PUCHAR ByteRecieved);
VOID Rs232PortPutByte(UCHAR ByteToSend);
#endif // defined __RS232_H

View File

@@ -1,84 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
#define DPRINT_NONE 0x00000000 // No debug print
#define DPRINT_WARNING 0x00000001 // OR this with DebugPrintMask to enable debugger messages and other misc stuff
#define DPRINT_MEMORY 0x00000002 // OR this with DebugPrintMask to enable memory management messages
#define DPRINT_FILESYSTEM 0x00000004 // OR this with DebugPrintMask to enable file system messages
#define DPRINT_INIFILE 0x00000008 // OR this with DebugPrintMask to enable .ini file messages
#define DPRINT_UI 0x00000010 // OR this with DebugPrintMask to enable user interface messages
#define DPRINT_DISK 0x00000020 // OR this with DebugPrintMask to enable disk messages
#define DPRINT_CACHE 0x00000040 // OR this with DebugPrintMask to enable cache messages
#define DPRINT_REGISTRY 0x00000080 // OR this with DebugPrintMask to enable registry messages
#define DPRINT_REACTOS 0x00000100 // OR this with DebugPrintMask to enable ReactOS messages
#define DPRINT_LINUX 0x00000200 // OR this with DebugPrintMask to enable Linux messages
#define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages
VOID DebugInit(VOID);
VOID DebugPrint(U32 Mask, char *format, ...);
VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length);
#define DbgPrint(_x_) DebugPrint _x_ ;
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); }
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
#ifdef __i386__
// Debugging support functions:
//
// BREAKPOINT() - Inserts an "int 3" instruction
// INSTRUCTION_BREAKPOINTX(x) - Enters exception handler right before instruction at address "x" is executed
// MEMORY_READWRITE_BREAKPOINTX(x) - Enters exception handler when a read or write occurs at address "x"
// MEMORY_WRITE_BREAKPOINTX(x) - Enters exception handler when a write occurs at address "x"
//
// You may have as many BREAKPOINT()'s as you like but you may only
// have up to four of any of the others.
#define BREAKPOINT() __asm__ ("int $3");
void INSTRUCTION_BREAKPOINT1(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT1(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT1(unsigned long addr);
void INSTRUCTION_BREAKPOINT2(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT2(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT2(unsigned long addr);
void INSTRUCTION_BREAKPOINT3(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT3(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT3(unsigned long addr);
void INSTRUCTION_BREAKPOINT4(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT4(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
#endif // defined __i386__
#else
#define DbgPrint(_x_)
#define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_)
#endif // defined DEBUG
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n"))
#endif // defined __DEBUG_H

View File

@@ -1,146 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DISK_H
#define __DISK_H
typedef struct _GEOMETRY
{
U32 Cylinders; // Number of cylinders on the disk
U32 Heads; // Number of heads on the disk
U32 Sectors; // Number of sectors per track
U32 BytesPerSector; // Number of bytes per sector
} GEOMETRY, *PGEOMETRY;
//
// Extended disk geometry (Int13 / ah=48h)
//
typedef struct _EXTENDED_GEOMETRY
{
U16 Size;
U16 Flags;
U32 Cylinders;
U32 Heads;
U32 SectorsPerTrack;
U64 Sectors;
U16 BytesPerSector;
U32 PDPTE;
} __attribute__((packed)) EXTENDED_GEOMETRY, *PEXTENDED_GEOMETRY;
//
// Define the structure of a partition table entry
//
typedef struct _PARTITION_TABLE_ENTRY
{
U8 BootIndicator; // 0x00 - non-bootable partition, 0x80 - bootable partition (one partition only)
U8 StartHead; // Beginning head number
U8 StartSector; // Beginning sector (2 high bits of cylinder #)
U8 StartCylinder; // Beginning cylinder# (low order bits of cylinder #)
U8 SystemIndicator; // System indicator
U8 EndHead; // Ending head number
U8 EndSector; // Ending sector (2 high bits of cylinder #)
U8 EndCylinder; // Ending cylinder# (low order bits of cylinder #)
U32 SectorCountBeforePartition; // Number of sectors preceding the partition
U32 PartitionSectorCount; // Number of sectors in the partition
} PACKED PARTITION_TABLE_ENTRY, *PPARTITION_TABLE_ENTRY;
//
// Define the structure of the master boot record
//
typedef struct _MASTER_BOOT_RECORD
{
U8 MasterBootRecordCodeAndData[0x1b8]; /* 0x000 */
U32 Signature; /* 0x1B8 */
U16 Reserved; /* 0x1BC */
PARTITION_TABLE_ENTRY PartitionTable[4]; /* 0x1BE */
U16 MasterBootRecordMagic; /* 0x1FE */
} PACKED MASTER_BOOT_RECORD, *PMASTER_BOOT_RECORD;
//
// Partition type defines
//
#define PARTITION_ENTRY_UNUSED 0x00 // Entry unused
#define PARTITION_FAT_12 0x01 // 12-bit FAT entries
#define PARTITION_XENIX_1 0x02 // Xenix
#define PARTITION_XENIX_2 0x03 // Xenix
#define PARTITION_FAT_16 0x04 // 16-bit FAT entries
#define PARTITION_EXTENDED 0x05 // Extended partition entry
#define PARTITION_HUGE 0x06 // Huge partition MS-DOS V4
#define PARTITION_IFS 0x07 // IFS Partition
#define PARTITION_OS2BOOTMGR 0x0A // OS/2 Boot Manager/OPUS/Coherent swap
#define PARTITION_FAT32 0x0B // FAT32
#define PARTITION_FAT32_XINT13 0x0C // FAT32 using extended int13 services
#define PARTITION_XINT13 0x0E // Win95 partition using extended int13 services
#define PARTITION_XINT13_EXTENDED 0x0F // Same as type 5 but uses extended int13 services
#define PARTITION_PREP 0x41 // PowerPC Reference Platform (PReP) Boot Partition
#define PARTITION_LDM 0x42 // Logical Disk Manager partition
#define PARTITION_UNIX 0x63 // Unix
#define PARTITION_LINUX_SWAP 0x82 // Linux Swap Partition
#define PARTITION_EXT2 0x83 // Linux Ext2/Ext3
///////////////////////////////////////////////////////////////////////////////////////
//
// i386 BIOS Disk Functions (i386disk.c)
//
///////////////////////////////////////////////////////////////////////////////////////
#ifdef __i386__
//BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskResetController(U32 DriveNumber);
BOOL DiskInt13ExtensionsSupported(U32 DriveNumber);
//VOID DiskStopFloppyMotor(VOID);
BOOL DiskGetDriveParameters(U32 DriveNumber, PGEOMETRY Geometry);
BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize);
//U32 DiskGetCacheableBlockCount(U32 DriveNumber);
#endif // defined __i386__
///////////////////////////////////////////////////////////////////////////////////////
//
// FreeLoader Disk Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID DiskReportError (BOOL bError);
VOID DiskError(PUCHAR ErrorString, U32 ErrorCode);
PUCHAR DiskGetErrorCodeString(U32 ErrorCode);
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry);
BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); // Implemented in i386disk.c
BOOL DiskIsDriveRemovable(U32 DriveNumber);
VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c
U32 DiskGetCacheableBlockCount(U32 DriveNumber); // Implemented in i386disk.c
///////////////////////////////////////////////////////////////////////////////////////
//
// Fixed Disk Partition Management Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord);
#endif // defined __DISK_H

View File

@@ -1,43 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DRIVEMAP_H
#define __DRIVEMAP_H
typedef struct
{
U8 DriveMapCount; // Count of drives currently mapped
U8 DriveMap[8]; // Map of BIOS drives
} PACKED DRIVE_MAP_LIST, *PDRIVE_MAP_LIST;
VOID DriveMapMapDrivesInSection(PUCHAR SectionName);
BOOL DriveMapIsValidDriveString(PUCHAR DriveString); // Checks the drive string ("hd0") for validity
U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0')
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h handler for the drive mapper
VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h drive map handler
extern PVOID DriveMapInt13HandlerStart;
extern PVOID DriveMapInt13HandlerEnd;
extern U32 DriveMapOldInt13HandlerAddress;
extern DRIVE_MAP_LIST DriveMapInt13HandlerMapList;
#endif // #defined __DRIVEMAP_H

View File

@@ -1,81 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FREELDR_H
#define __FREELDR_H
#define NULL 0
#define TRUE 1
#define FALSE 0
#define BOOL int
#define BOOLEAN int
typedef BOOLEAN *PBOOLEAN;
#define CHAR char
#define PCHAR char *
#define UCHAR unsigned char
#define PUCHAR unsigned char *
#define WCHAR unsigned short
#define PWCHAR unsigned short *
#define VOID void
#define PVOID VOID*
#ifdef __i386__
#define size_t unsigned int
typedef unsigned char U8;
typedef char S8;
typedef unsigned short U16;
typedef short S16;
typedef unsigned long U32;
typedef long S32;
typedef unsigned long long U64;
typedef long long S64;
typedef U8 __u8;
typedef S8 __s8;
typedef U16 __u16;
typedef S16 __s16;
typedef U32 __u32;
typedef S32 __s32;
typedef U64 __u64;
typedef S64 __s64;
#endif // __i386__
typedef U8 *PU8;
typedef U16 *PU16;
typedef U32 *PU32;
#define ROUND_UP(N, S) ((N) + (S) - ((N) % (S)))
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
#define PACKED __attribute__((packed))
extern U32 BootDrive; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
extern U32 BootPartition; // Boot Partition, 1-4
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
void BootMain(void);
VOID RunLoader(VOID);
#endif // defined __FREELDR_H

View File

@@ -1,47 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FS_H
#define __FS_H
#define EOF -1
#define FS_FAT 1
#define FS_NTFS 2
#define FS_EXT2 3
#define FS_REISER 4
#define FS_ISO9660 5
#define FILE VOID
#define PFILE FILE *
VOID FileSystemError(PUCHAR ErrorString);
BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber);
PFILE FsOpenFile(PUCHAR FileName);
VOID FsCloseFile(PFILE FileHandle);
BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 FsGetFileSize(PFILE FileHandle);
VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer);
U32 FsGetFilePointer(PFILE FileHandle);
BOOL FsIsEndOfFile(PFILE FileHandle);
U32 FsGetNumPathParts(PUCHAR Path);
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path);
#endif // #defined __FS_H

View File

@@ -1,130 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: inffile.h,v 1.1 2003/05/25 21:17:30 ekohl Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/infcache.h
* PURPOSE: INF file parser that caches contents of INF file in memory
* PROGRAMMER: Royce Mitchell III
* Eric Kohl
*/
#ifndef __INFCACHE_H__
#define __INFCACHE_H__
#define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
#define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
#define STATUS_WRONG_INF_STYLE (0xC0700003)
#define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
#define MAX_INF_STRING_LENGTH 512
typedef PU32 HINF, *PHINF;
typedef struct _INFCONTEXT
{
PVOID Inf;
// PVOID CurrentInf;
PVOID Section;
PVOID Line;
} INFCONTEXT, *PINFCONTEXT;
/* FUNCTIONS ****************************************************************/
BOOLEAN
InfOpenFile (PHINF InfHandle,
PCHAR FileName,
PU32 ErrorLine);
VOID
InfCloseFile (HINF InfHandle);
BOOLEAN
InfFindFirstLine (HINF InfHandle,
PCHAR Section,
PCHAR Key,
PINFCONTEXT Context);
BOOLEAN
InfFindNextLine (PINFCONTEXT ContextIn,
PINFCONTEXT ContextOut);
BOOLEAN
InfFindFirstMatchLine (PINFCONTEXT ContextIn,
PCHAR Key,
PINFCONTEXT ContextOut);
BOOLEAN
InfFindNextMatchLine (PINFCONTEXT ContextIn,
PCHAR Key,
PINFCONTEXT ContextOut);
S32
InfGetLineCount (HINF InfHandle,
PCHAR Section);
S32
InfGetFieldCount (PINFCONTEXT Context);
BOOLEAN
InfGetBinaryField (PINFCONTEXT Context,
U32 FieldIndex,
PU8 ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetIntField (PINFCONTEXT Context,
U32 FieldIndex,
S32 *IntegerValue);
BOOLEAN
InfGetMultiSzField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetStringField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetData (PINFCONTEXT Context,
PCHAR *Key,
PCHAR *Data);
BOOLEAN
InfGetDataField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR *Data);
#endif /* __INFCACHE_H__ */
/* EOF */

View File

@@ -1,35 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __PARSEINI_H
#define __PARSEINI_H
BOOL IniFileInitialize(VOID);
BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId);
U32 IniGetNumSectionItems(U32 SectionId);
U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex);
U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex);
BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize);
BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize);
BOOL IniAddSection(PUCHAR SectionName, U32* SectionId);
BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue);
#endif // defined __PARSEINI_H

View File

@@ -1,46 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KEYCODES_H
#define __KEYCODES_H
// Key codes
#define KEY_EXTENDED 0x00
#define KEY_ENTER 0x0D
#define KEY_BACKSPACE 0x08
#define KEY_SPACE 0x20
#define KEY_UP 0x48
#define KEY_DOWN 0x50
#define KEY_LEFT 0x4B
#define KEY_RIGHT 0x4D
#define KEY_ESC 0x1B
#define KEY_F1 0x3B
#define KEY_F2 0x3C
#define KEY_F3 0x3D
#define KEY_F4 0x3E
#define KEY_F5 0x3F
#define KEY_F6 0x40
#define KEY_F7 0x41
#define KEY_F8 0x42
#define KEY_F9 0x43
#define KEY_F10 0x44
#endif // #defined __KEYCODES_H

View File

@@ -1,139 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <fs.h>
#ifndef __LINUX_H
#define __LINUX_H
#define LINUX_LOADER_TYPE_LILO 0x01
#define LINUX_LOADER_TYPE_LOADLIN 0x11
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
#define LINUX_LOADER_TYPE_SYSLINUX 0x31
#define LINUX_LOADER_TYPE_ETHERBOOT 0x41
#define LINUX_LOADER_TYPE_FREELOADER 0x81
#define LINUX_COMMAND_LINE_MAGIC 0xA33F
#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS'
#define LINUX_BOOT_SECTOR_MAGIC 0xAA55
#define LINUX_KERNEL_LOAD_ADDRESS 0x100000
#define LINUX_FLAG_LOAD_HIGH 0x01
#define LINUX_FLAG_CAN_USE_HEAP 0x80
#define LINUX_MAX_INITRD_ADDRESS 0x38000000
typedef struct
{
U8 BootCode1[0x20];
U16 CommandLineMagic;
U16 CommandLineOffset;
U8 BootCode2[0x1CD];
U8 SetupSectors;
U16 RootFlags;
U16 SystemSize;
U16 SwapDevice;
U16 RamSize;
U16 VideoMode;
U16 RootDevice;
U16 BootFlag; // 0xAA55
} PACKED LINUX_BOOTSECTOR, *PLINUX_BOOTSECTOR;
typedef struct
{
U8 JumpInstruction[2];
U32 SetupHeaderSignature; // Signature for SETUP-header
U16 Version; // Version number of header format
U16 RealModeSwitch; // Default switch
U16 SetupSeg; // SETUPSEG
U16 StartSystemSeg;
U16 KernelVersion; // Offset to kernel version string
U8 TypeOfLoader; // Loader ID
// =0, old one (LILO, Loadlin,
// Bootlin, SYSLX, bootsect...)
// else it is set by the loader:
// 0xTV: T=0 for LILO
// T=1 for Loadlin
// T=2 for bootsect-loader
// T=3 for SYSLX
// T=4 for ETHERBOOT
// V = version
U8 LoadFlags; // flags, unused bits must be zero (RFU)
// LOADED_HIGH = 1
// bit within loadflags,
// if set, then the kernel is loaded high
// CAN_USE_HEAP = 0x80
// if set, the loader also has set heap_end_ptr
// to tell how much space behind setup.S
// can be used for heap purposes.
// Only the loader knows what is free!
U16 SetupMoveSize; // size to move, when we (setup) are not
// loaded at 0x90000. We will move ourselves
// to 0x90000 then just before jumping into
// the kernel. However, only the loader
// know how much of data behind us also needs
// to be loaded.
U32 Code32Start; // here loaders can put a different
// start address for 32-bit code.
//
// 0x1000 = default for zImage
//
// 0x100000 = default for big kernel
U32 RamdiskAddress; // address of loaded ramdisk image
// Here the loader (or kernel generator) puts
// the 32-bit address were it loaded the image.
U32 RamdiskSize; // its size in bytes
U16 BootSectKludgeOffset;
U16 BootSectKludgeSegment;
U16 HeapEnd; // space from here (exclusive) down to
// end of setup code can be used by setup
// for local heap purposes.
U16 Pad1;
U32 CommandLinePointer; // 32-bit pointer to the kernel command line
U32 InitrdAddressMax; // Highest legal initrd address
} PACKED LINUX_SETUPSECTOR, *PLINUX_SETUPSECTOR;
VOID BootNewLinuxKernel(VOID); // Implemented in linux.S
VOID BootOldLinuxKernel(U32 KernelSize); // Implemented in linux.S
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description);
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName);
BOOL LinuxReadBootSector(PFILE LinuxKernelFile);
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile);
BOOL LinuxReadKernel(PFILE LinuxKernelFile);
BOOL LinuxCheckKernelVersion(VOID);
BOOL LinuxReadInitrd(PFILE LinuxInitrdFile);
#endif // defined __LINUX_H

View File

@@ -1,27 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __BOOT_H
#define __BOOT_H
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName);
VOID LoadAndBootPartition(PUCHAR OperatingSystemName);
VOID LoadAndBootDrive(PUCHAR OperatingSystemName);
#endif // defined __BOOT_H

View File

@@ -1,58 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __MEMORY_H
#define __MEMORY_H
#define MEMTYPE_USABLE 0x01
#define MEMTYPE_RESERVED 0x02
#define MEMTYPE_ACPI_RECLAIM 0x03
#define MEMTYPE_ACPI_NVS 0x04
typedef struct
{
U64 BaseAddress;
U64 Length;
U32 Type;
U32 Reserved;
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
U32 GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
// These functions are implemented in mem.S
U32 GetExtendedMemorySize(VOID); // Returns extended memory size in KB
U32 GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); // Fills structure with BIOS memory map and returns memory map item count
//BOOL MmInitializeMemoryManager(U32 LowMemoryStart, U32 LowMemoryLength);
BOOL MmInitializeMemoryManager(VOID);
PVOID MmAllocateMemory(U32 MemorySize);
VOID MmFreeMemory(PVOID MemoryPointer);
//PVOID MmAllocateLowMemory(U32 MemorySize);
//VOID MmFreeLowMemory(PVOID MemoryPointer);
PVOID MmAllocateMemoryAtAddress(U32 MemorySize, PVOID DesiredAddress);
PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress);
#endif // defined __MEMORY_H

View File

@@ -1,164 +0,0 @@
/* multiboot.h - the header for Multiboot */
/* Copyright (C) 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef __MULTIBOOT_H
#define __MULTIBOOT_H
/* Macros. */
/* The magic number for the Multiboot header. */
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
/* The flags for the Multiboot header. */
#define MULTIBOOT_HEADER_FLAGS 0x00010003
/* The magic number passed by a Multiboot-compliant boot loader. */
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
/* The size of our stack (16KB). */
#define STACK_SIZE 0x4000
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
#ifdef HAVE_ASM_USCORE
# define EXT_C(sym) _ ## sym
#else
# define EXT_C(sym) sym
#endif
#define MB_INFO_FLAG_MEM_SIZE 0x00000001
#define MB_INFO_FLAG_BOOT_DEVICE 0x00000002
#define MB_INFO_FLAG_COMMAND_LINE 0x00000004
#define MB_INFO_FLAG_MODULES 0x00000008
#define MB_INFO_FLAG_AOUT_SYMS 0x00000010
#define MB_INFO_FLAG_ELF_SYMS 0x00000020
#define MB_INFO_FLAG_MEMORY_MAP 0x00000040
#define MB_INFO_FLAG_DRIVES 0x00000080
#define MB_INFO_FLAG_CONFIG_TABLE 0x00000100
#define MB_INFO_FLAG_BOOT_LOADER_NAME 0x00000200
#define MB_INFO_FLAG_APM_TABLE 0x00000400
#define MB_INFO_FLAG_GRAPHICS_TABLE 0x00000800
#ifndef ASM
/* Do not include here in boot.S. */
/* Types. */
/* The Multiboot header. */
typedef struct multiboot_header
{
unsigned long magic;
unsigned long flags;
unsigned long checksum;
unsigned long header_addr;
unsigned long load_addr;
unsigned long load_end_addr;
unsigned long bss_end_addr;
unsigned long entry_addr;
} multiboot_header_t;
/* The symbol table for a.out. */
typedef struct aout_symbol_table
{
unsigned long tabsize;
unsigned long strsize;
unsigned long addr;
unsigned long reserved;
} aout_symbol_table_t;
/* The section header table for ELF. */
typedef struct elf_section_header_table
{
unsigned long num;
unsigned long size;
unsigned long addr;
unsigned long shndx;
} elf_section_header_table_t;
/* The Multiboot information. */
typedef struct multiboot_info
{
unsigned long flags;
unsigned long mem_lower;
unsigned long mem_upper;
unsigned long boot_device;
unsigned long cmdline;
unsigned long mods_count;
unsigned long mods_addr;
#if 0
/* reactos and loadros define this entry with a size of 12 byte but the union is 16 byte */
union
{
aout_symbol_table_t aout_sym;
elf_section_header_table_t elf_sec;
} u;
#else
char syms[12];
#endif
unsigned long mmap_length;
unsigned long mmap_addr;
} multiboot_info_t;
/* The module structure. */
typedef struct module
{
unsigned long mod_start;
unsigned long mod_end;
unsigned long string;
unsigned long reserved;
} module_t;
/* The memory map. Be careful that the offset 0 is base_addr_low
but no size. */
typedef struct memory_map
{
//unsigned long size;
unsigned long base_addr_low;
unsigned long base_addr_high;
unsigned long length_low;
unsigned long length_high;
unsigned long type;
unsigned long reserved;
} memory_map_t;
multiboot_header_t mb_header; // Multiboot header structure defined in kernel image file
multiboot_info_t mb_info; // Multiboot info structure passed to kernel
char multiboot_kernel_cmdline[255]; // Command line passed to kernel
module_t multiboot_modules[64]; // Array to hold boot module info loaded for the kernel
char multiboot_module_strings[64][256]; // Array to hold module names
unsigned long multiboot_memory_map_descriptor_size;
memory_map_t multiboot_memory_map[32]; // Memory map
void boot_reactos(void);
#include "fs.h" // Included FILE structure definition
BOOL MultiBootLoadKernel(FILE *KernelImage);
//BOOL MultiBootLoadModule(FILE *ModuleImage, char *ModuleName);
PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, U32* ModuleSize);
int GetBootPartition(char *OperatingSystemName);
PVOID MultiBootCreateModule(char *ModuleName);
BOOL MultiBootCloseModule(PVOID ModuleBase, U32 dwModuleSize);
#endif /* ! ASM */
#endif // defined __MULTIBOOT_H

View File

@@ -1,34 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __OPTIONS_H
#define __OPTIONS_H
VOID DoOptionsMenu(VOID);
VOID OptionMenuReboot(VOID);
VOID OptionMenuCustomBoot(VOID);
VOID OptionMenuCustomBootDisk(VOID);
VOID OptionMenuCustomBootPartition(VOID);
VOID OptionMenuCustomBootBootSectorFile(VOID);
VOID OptionMenuCustomBootReactOS(VOID);
VOID OptionMenuCustomBootLinux(VOID);
#endif // #defined __OPTIONS_H

View File

@@ -1,28 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __OSLIST_H
#define __OSLIST_H
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32* OperatingSystemCountPointer);
U32 CountOperatingSystems(U32 SectionId);
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32 OperatingSystemCount);
BOOL RemoveQuotes(PUCHAR QuotedString);
#endif // #defined __OSLIST_H

View File

@@ -1,78 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __PORTIO_H
#define __PORTIO_H
/*
* Port I/O functions
*/
VOID
/*STDCALL*/
READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count);
UCHAR
/*STDCALL*/
READ_PORT_UCHAR (PUCHAR Port);
U32
/*STDCALL*/
READ_PORT_ULONG (U32* Port);
U16
/*STDCALL*/
READ_PORT_USHORT (U16* Port);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value);
VOID
/*STDCALL*/
WRITE_PORT_ULONG (U32* Port, U32 Value);
VOID
/*STDCALL*/
WRITE_PORT_USHORT (U16* Port, U16 Value);
#endif // defined __PORTIO_H

View File

@@ -1,48 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __REACTOS_H
#define __REACTOS_H
///////////////////////////////////////////////////////////////////////////////////////
//
// ReactOS Loading Functions
//
///////////////////////////////////////////////////////////////////////////////////////
void LoadAndBootReactOS(PUCHAR OperatingSystemName);
///////////////////////////////////////////////////////////////////////////////////////
//
// ReactOS Setup Loader Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID ReactOSRunSetupLoader(VOID);
///////////////////////////////////////////////////////////////////////////////////////
//
// ARC Path Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DissectArcPath(char *ArcPath, char *BootPath, U32* BootDrive, U32* BootPartition);
void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, U32 Disk, U32 Partition);
U32 ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath);
#endif // defined __REACTOS_H

View File

@@ -1,135 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __STDLIB_H
#define __STDLIB_H
#include <freeldr.h>
///////////////////////////////////////////////////////////////////////////////////////
//
// String Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int strlen(char *str);
char * strcpy(char *dest, char *src);
char * strncpy(char *dest, char *src, size_t count);
char * strcat(char *dest, char *src);
char * strncat(char *dst, const char *src, size_t n);
char * strchr(const char *s, int c);
char * strrchr(const char *s, int c);
int strcmp(const char *string1, const char *string2);
int stricmp(const char *string1, const char *string2);
int strncmp(const char *string1, const char *string2, size_t length);
int strnicmp(const char *string1, const char *string2, size_t length);
///////////////////////////////////////////////////////////////////////////////////////
//
// Memory Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int memcmp(const void *buf1, const void *buf2, size_t count);
void * memcpy(void *to, const void *from, size_t count);
void * memmove(void *dest, const void *src, size_t count);
void * memset(void *src, int val, size_t count);
#define RtlCompareMemory(Source1, Source2, Length) memcmp(Source1, Source2, Length)
#define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
#define RtlFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length)
#define RtlMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length)
///////////////////////////////////////////////////////////////////////////////////////
//
// Standard Library Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int atoi(char *string);
char * itoa(int value, char *string, int radix);
int toupper(int c);
int tolower(int c);
int isspace(int c);
int isdigit(int c);
int isxdigit(int c);
char * convert_to_ascii(char *buf, int c, ...);
void putchar(int ch); // Implemented in asmcode.S
int kbhit(void); // Implemented in asmcode.S
int getch(void); // Implemented in asmcode.S
int getyear(void); // Implemented in asmcode.S
int getday(void); // Implemented in asmcode.S
int getmonth(void); // Implemented in asmcode.S
int gethour(void); // Implemented in asmcode.S
int getminute(void); // Implemented in asmcode.S
int getsecond(void); // Implemented in asmcode.S
void beep(void);
void delay(unsigned msec);
void sound(int freq);
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
///////////////////////////////////////////////////////////////////////////////////////
//
// Screen Output Functions
//
///////////////////////////////////////////////////////////////////////////////////////
void print(char *str);
void printf(char *fmt, ...);
void sprintf(char *buffer, char *format, ...);
///////////////////////////////////////////////////////////////////////////////////////
//
// List Functions
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct _LIST_ITEM
{
struct _LIST_ITEM* ListPrev;
struct _LIST_ITEM* ListNext;
} LIST_ITEM, *PLIST_ITEM;
VOID RtlListInitializeHead(PLIST_ITEM ListHead); // Initializes a doubly linked list
VOID RtlListInsertHead(PLIST_ITEM ListHead, PLIST_ITEM Entry); // Inserts an entry at the head of the list
VOID RtlListInsertTail(PLIST_ITEM ListHead, PLIST_ITEM Entry); // Inserts an entry at the tail of the list
PLIST_ITEM RtlListRemoveHead(PLIST_ITEM ListHead); // Removes the entry at the head of the list
PLIST_ITEM RtlListRemoveTail(PLIST_ITEM ListHead); // Removes the entry at the tail of the list
PLIST_ITEM RtlListGetHead(PLIST_ITEM ListHead); // Returns the entry at the head of the list
PLIST_ITEM RtlListGetTail(PLIST_ITEM ListHead); // Returns the entry at the tail of the list
BOOL RtlListIsEmpty(PLIST_ITEM ListHead); // Indicates whether a doubly linked list is empty
U32 RtlListCountEntries(PLIST_ITEM ListHead); // Counts the entries in a doubly linked list
PLIST_ITEM RtlListGetPrevious(PLIST_ITEM ListEntry); // Returns the previous item in the list
PLIST_ITEM RtlListGetNext(PLIST_ITEM ListEntry); // Returns the next item in the list
PLIST_ITEM RtlListRemoveEntry(PLIST_ITEM ListEntry); // Removes the entry from the list
VOID RtlListInsertEntry(PLIST_ITEM InsertAfter, PLIST_ITEM ListEntry); // Inserts a new list entry right after the specified one
VOID RtlListMoveEntryPrevious(PLIST_ITEM ListEntry); // Moves the list entry to before the previous entry
VOID RtlListMoveEntryNext(PLIST_ITEM ListEntry); // Moves the list entry to after the next entry
#endif // defined __STDLIB_H

View File

@@ -1,95 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __UI_H
#define __UI_H
extern U32 UiScreenWidth; // Screen Width
extern U32 UiScreenHeight; // Screen Height
extern UCHAR UiStatusBarFgColor; // Status bar foreground color
extern UCHAR UiStatusBarBgColor; // Status bar background color
extern UCHAR UiBackdropFgColor; // Backdrop foreground color
extern UCHAR UiBackdropBgColor; // Backdrop background color
extern UCHAR UiBackdropFillStyle; // Backdrop fill style
extern UCHAR UiTitleBoxFgColor; // Title box foreground color
extern UCHAR UiTitleBoxBgColor; // Title box background color
extern UCHAR UiMessageBoxFgColor; // Message box foreground color
extern UCHAR UiMessageBoxBgColor; // Message box background color
extern UCHAR UiMenuFgColor; // Menu foreground color
extern UCHAR UiMenuBgColor; // Menu background color
extern UCHAR UiTextColor; // Normal text color
extern UCHAR UiSelectedTextColor; // Selected text color
extern UCHAR UiSelectedTextBgColor; // Selected text background color
extern UCHAR UiEditBoxTextColor; // Edit box text color
extern UCHAR UiEditBoxBgColor; // Edit box text background color
extern UCHAR UiTitleBoxTitleText[260]; // Title box's title text
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects
extern UCHAR UiMonthNames[12][15];
///////////////////////////////////////////////////////////////////////////////////////
//
// User Interface Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL UiInitialize(VOID); // Initialize User-Interface
VOID UiUnInitialize(PUCHAR BootText); // Un-initialize User-Interface
VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
VOID UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID UiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom); // Draws a shadow on the bottom and right sides of the area specified
VOID UiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
VOID UiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID UiDrawCenteredText(U32 Left, U32 Top, U32 Right, U32 Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID UiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen
VOID UiUpdateDateTime(VOID); // Updates the date and time
VOID UiInfoBox(PUCHAR MessageText); // Displays a info box on the screen
VOID UiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button
VOID UiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiShowMessageBoxesInSection(PUCHAR SectionName); // Displays all the message boxes in a given section
VOID UiEscapeString(PUCHAR String); // Processes a string and changes all occurances of "\n" to '\n'
BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, U32 Length);
UCHAR UiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR UiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
VOID UiTruncateStringEllipsis(PUCHAR StringText, U32 MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...'
VOID UiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
VOID UiFadeOut(VOID); // Fades the screen out
///////////////////////////////////////////////////////////////////////////////////////
//
// Menu Functions
//
///////////////////////////////////////////////////////////////////////////////////////
typedef BOOL (*UiMenuKeyPressFilterCallback)(U32 KeyPress);
BOOL UiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
#endif // #defined __UI_H

View File

@@ -1,49 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __VERSION_H
#define __VERSION_H
/* just some stuff */
#define VERSION "FreeLoader v1.8.17"
#define COPYRIGHT "Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>"
#define AUTHOR_EMAIL "<brianp@sginet.com>"
#define BY_AUTHOR "by Brian Palmer"
// FreeLoader version defines
//
// NOTE:
// If you fix bugs then you increment the patch version
// If you add features then you increment the minor version and zero the patch version
// If you add major functionality then you increment the major version and zero the minor & patch versions
//
#define FREELOADER_MAJOR_VERSION 1
#define FREELOADER_MINOR_VERSION 8
#define FREELOADER_PATCH_VERSION 17
#ifndef ASM
PUCHAR GetFreeLoaderVersionString(VOID);
#endif // ASM
#endif // defined __VERSION_H

View File

@@ -1,197 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __VIDEO_H
#define __VIDEO_H
#define VIDEOCARD_CGA_OR_OTHER 0
#define VIDEOCARD_EGA 1
#define VIDEOCARD_VGA 2
#define VERTRES_200_SCANLINES 0x00
#define VERTRES_350_SCANLINES 0x01
#define VERTRES_400_SCANLINES 0x02
#define MODETYPE_TEXT 0
#define MODETYPE_GRAPHICS 1
#define VIDEOMODE_NORMAL_TEXT 0
#define VIDEOMODE_EXTENDED_TEXT 1
#define VIDEOMODE_80X28 0x501C
#define VIDEOMODE_80X30 0x501E
#define VIDEOMODE_80X34 0x5022
#define VIDEOMODE_80X43 0x502B
#define VIDEOMODE_80X60 0x503C
#define VIDEOMODE_132X25 0x8419
#define VIDEOMODE_132X43 0x842B
#define VIDEOMODE_132X50 0x8432
#define VIDEOMODE_132X60 0x843C
#define VIDEOPORT_PALETTE_READ 0x03C7
#define VIDEOPORT_PALETTE_WRITE 0x03C8
#define VIDEOPORT_PALETTE_DATA 0x03C9
#define VIDEOPORT_VERTICAL_RETRACE 0x03DA
#define VIDEOVGA_MEM_ADDRESS 0xA0000
#define VIDEOTEXT_MEM_ADDRESS 0xB8000
typedef struct
{
U8 Red;
U8 Green;
U8 Blue;
} PACKED PALETTE_ENTRY, *PPALETTE_ENTRY;
typedef struct
{
U16 ModeAttributes; // mode attributes (see #00080)
U8 WindowAttributesA; // window attributes, window A (see #00081)
U8 WindowsAttributesB; // window attributes, window B (see #00081)
U16 WindowGranularity; // window granularity in KB
U16 WindowSize; // window size in KB
U16 WindowAStartSegment; // start segment of window A (0000h if not supported)
U16 WindowBStartSegment; // start segment of window B (0000h if not supported)
U32 WindowPositioningFunction; // -> FAR window positioning function (equivalent to AX=4F05h)
U16 BytesPerScanLine; // bytes per scan line
//---remainder is optional for VESA modes in v1.0/1.1, needed for OEM modes---
U16 WidthInPixels; // width in pixels (graphics) or characters (text)
U16 HeightInPixels; // height in pixels (graphics) or characters (text)
U8 CharacterWidthInPixels; // width of character cell in pixels
U8 CharacterHeightInPixels; // height of character cell in pixels
U8 NumberOfMemoryPlanes; // number of memory planes
U8 BitsPerPixel; // number of bits per pixel
U8 NumberOfBanks; // number of banks
U8 MemoryModel; // memory model type (see #00082)
U8 BankSize; // size of bank in KB
U8 NumberOfImagePanes; // number of image pages (less one) that will fit in video RAM
U8 Reserved1; // reserved (00h for VBE 1.0-2.0, 01h for VBE 3.0)
//---VBE v1.2+ ---
U8 RedMaskSize; // red mask size
U8 RedMaskPosition; // red field position
U8 GreenMaskSize; // green mask size
U8 GreenMaskPosition; // green field size
U8 BlueMaskSize; // blue mask size
U8 BlueMaskPosition; // blue field size
U8 ReservedMaskSize; // reserved mask size
U8 ReservedMaskPosition; // reserved mask position
U8 DirectColorModeInfo; // direct color mode info
// bit 0:Color ramp is programmable
// bit 1:Bytes in reserved field may be used by application
//---VBE v2.0+ ---
U32 LinearVideoBufferAddress; // physical address of linear video buffer
U32 OffscreenMemoryPointer; // pointer to start of offscreen memory
U16 OffscreenMemorySize; // KB of offscreen memory
//---VBE v3.0 ---
U16 LinearBytesPerScanLine; // bytes per scan line in linear modes
U8 BankedNumberOfImages; // number of images (less one) for banked video modes
U8 LinearNumberOfImages; // number of images (less one) for linear video modes
U8 LinearRedMaskSize; // linear modes:Size of direct color red mask (in bits)
U8 LinearRedMaskPosition; // linear modes:Bit position of red mask LSB (e.g. shift count)
U8 LinearGreenMaskSize; // linear modes:Size of direct color green mask (in bits)
U8 LinearGreenMaskPosition; // linear modes:Bit position of green mask LSB (e.g. shift count)
U8 LinearBlueMaskSize; // linear modes:Size of direct color blue mask (in bits)
U8 LinearBlueMaskPosition; // linear modes:Bit position of blue mask LSB (e.g. shift count)
U8 LinearReservedMaskSize; // linear modes:Size of direct color reserved mask (in bits)
U8 LinearReservedMaskPosition; // linear modes:Bit position of reserved mask LSB
U32 MaximumPixelClock; // maximum pixel clock for graphics video mode, in Hz
U8 Reserved2[190]; // 190 BYTEs reserved (0)
} PACKED SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
extern U32 CurrentMemoryBank;
extern SVGA_MODE_INFORMATION VesaVideoModeInformation;
extern PVOID VideoOffScreenBuffer;
VOID BiosSetVideoMode(U32 VideoMode); // Implemented in i386vid.S
VOID BiosSetVideoFont8x8(VOID); // Implemented in i386vid.S
VOID BiosSetVideoFont8x14(VOID); // Implemented in i386vid.S
VOID BiosSetVideoFont8x16(VOID); // Implemented in i386vid.S
VOID BiosSelectAlternatePrintScreen(VOID); // Implemented in i386vid.S
VOID BiosDisableCursorEmulation(VOID); // Implemented in i386vid.S
VOID BiosDefineCursor(U32 StartScanLine, U32 EndScanLine); // Implemented in i386vid.S
U32 BiosDetectVideoCard(VOID); // Implemented in i386vid.S
VOID BiosSetVerticalResolution(U32 ScanLines); // Implemented in i386vid.S, must be called right before BiosSetVideoMode()
VOID BiosSet480ScanLines(VOID); // Implemented in i386vid.S, must be called right after BiosSetVideoMode()
VOID BiosSetVideoDisplayEnd(VOID); // Implemented in i386vid.S
VOID BiosVideoDisableBlinkBit(VOID); // Implemented in i386vid.S
VOID BiosVideoEnableBlinkBit(VOID); // Implemented in i386vid.S
U16 BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version
BOOL BiosVesaSetBank(U16 Bank); // Implemented in i386vid.S
BOOL BiosVesaSetVideoMode(U16 Mode); // Implemented in i386vid.S
BOOL BiosVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformation); // Implemented in i386vid.S
VOID VideoSetTextCursorPosition(U32 X, U32 Y); // Implemented in i386vid.S
VOID VideoHideTextCursor(VOID); // Implemented in i386vid.S
VOID VideoShowTextCursor(VOID); // Implemented in i386vid.S
U32 VideoGetTextCursorPositionX(VOID); // Implemented in i386vid.S
U32 VideoGetTextCursorPositionY(VOID); // Implemented in i386vid.S
BOOL VideoSetMode(U32 VideoMode);
BOOL VideoSetMode80x25(VOID); // Sets 80x25
BOOL VideoSetMode80x50_80x43(VOID); // Sets 80x50 (VGA) or 80x43 (EGA) 8-pixel mode
BOOL VideoSetMode80x28(VOID); // Sets 80x28. Works on all VGA's. Standard 80x25 with 14-point font
BOOL VideoSetMode80x43(VOID); // Sets 80x43. Works on all VGA's. It's a 350-scanline mode with 8-pixel font.
BOOL VideoSetMode80x30(VOID); // Sets 80x30. Works on all VGA's. 480 scanlines, 16-pixel font.
BOOL VideoSetMode80x34(VOID); // Sets 80x34. Works on all VGA's. 480 scanlines, 14-pixel font.
BOOL VideoSetMode80x60(VOID); // Sets 80x60. Works on all VGA's. 480 scanlines, 8-pixel font.
U32 VideoGetCurrentModeResolutionX(VOID);
U32 VideoGetCurrentModeResolutionY(VOID);
U32 VideoGetBytesPerScanLine(VOID);
U32 VideoGetCurrentMode(VOID);
U32 VideoGetCurrentModeType(VOID); // MODETYPE_TEXT or MODETYPE_GRAPHICS
BOOL VideoIsCurrentModeVesa(VOID);
U32 VideoGetCurrentModeColorDepth(VOID); // Returns 0 for text mode, 16 for 4-bit, 256 for 8-bit, 32768 for 15-bit, 65536 for 16-bit, etc.
VOID VideoClearScreen(VOID);
VOID VideoWaitForVerticalRetrace(VOID);
PVOID VideoAllocateOffScreenBuffer(VOID); // Returns a pointer to an off-screen buffer sufficient for the current video mode
U32 VideoGetMemoryBankForPixel(U32 X, U32 Y);
U32 VideoGetMemoryBankForPixel16(U32 X, U32 Y);
U32 VideoGetBankOffsetForPixel(U32 X, U32 Y);
U32 VideoGetBankOffsetForPixel16(U32 X, U32 Y);
VOID VideoSetMemoryBank(U16 BankNumber);
U32 VideoGetOffScreenMemoryOffsetForPixel(U32 X, U32 Y);
VOID VideoCopyOffScreenBufferToVRAM(VOID);
VOID VideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue);
VOID VideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue);
VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoRestorePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoSetPixel16(U32 X, U32 Y, U8 Color);
VOID VideoSetPixel256(U32 X, U32 Y, U8 Color);
VOID VideoSetPixelRGB(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue);
VOID VideoSetPixel16_OffScreen(U32 X, U32 Y, U8 Color);
VOID VideoSetPixel256_OffScreen(U32 X, U32 Y, U8 Color);
VOID VideoSetPixelRGB_OffScreen(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue);
VOID VideoSetAllColorsToBlack(U32 ColorCount);
VOID VideoFadeIn(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoFadeOut(U32 ColorCount);
#endif // defined __VIDEO_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __INI_H
#define __INI_H
#include <rtl.h>
#include <fs.h>
#define INI_FILE_COMMENT_CHAR ';'
// This structure describes a single .ini file item
// The item format in the .ini file is:
// Name=Value
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR ItemName;
PUCHAR ItemValue;
} INI_SECTION_ITEM, *PINI_SECTION_ITEM;
// This structure describes a .ini file section
// The section format in the .ini file is:
// [Section Name]
// This structure has a list of section items with
// one INI_SECTION_ITEM for each line in the section
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR SectionName;
U32 SectionItemCount;
PINI_SECTION_ITEM SectionItemList;
} INI_SECTION, *PINI_SECTION;
extern PINI_SECTION IniFileSectionListHead;
extern U32 IniFileSectionCount;
extern U32 IniFileSettingCount;
PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber);
BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize);
U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset);
U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset);
BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength);
BOOL IniIsCommentLine(PUCHAR LineOfText, U32 TextLength);
BOOL IniIsSectionName(PUCHAR LineOfText, U32 TextLength);
U32 IniGetSectionNameSize(PUCHAR SectionNameLine, U32 LineLength);
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, U32 LineLength);
BOOL IniIsSetting(PUCHAR LineOfText, U32 TextLength);
U32 IniGetSettingNameSize(PUCHAR SettingNameLine, U32 LineLength);
U32 IniGetSettingValueSize(PUCHAR SettingValueLine, U32 LineLength);
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, U32 LineLength);
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, U32 LineLength);
#endif // defined __INI_H

View File

@@ -1,112 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <fs.h>
#include <rtl.h>
#include <mm.h>
#include <debug.h>
BOOL IniFileInitialize(VOID)
{
PFILE Freeldr_Ini; // File handle for freeldr.ini
PUCHAR FreeLoaderIniFileData;
U32 FreeLoaderIniFileSize;
BOOL Success;
// Open freeldr.ini
// BootDrive & BootPartition are passed
// in from the boot sector code in the
// DL & DH registers.
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
// If we couldn't open freeldr.ini on the partition
// they specified in the boot sector then try
// opening the active (boot) partition.
if ((Freeldr_Ini == NULL) && (BootPartition != 0))
{
BootPartition = 0;
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
return FALSE;
}
if (Freeldr_Ini == NULL)
{
printf("Error opening freeldr.ini or file not found.\n");
printf("You need to re-install FreeLoader.\n");
return FALSE;
}
// Get the file size & allocate enough memory for it
FreeLoaderIniFileSize = FsGetFileSize(Freeldr_Ini);
FreeLoaderIniFileData = MmAllocateMemory(FreeLoaderIniFileSize);
// If we are out of memory then return FALSE
if (FreeLoaderIniFileData == NULL)
{
printf("Out of memory while loading freeldr.ini.\n");
FsCloseFile(Freeldr_Ini);
return FALSE;
}
// Read freeldr.ini off the disk
if (!FsReadFile(Freeldr_Ini, FreeLoaderIniFileSize, NULL, FreeLoaderIniFileData))
{
FsCloseFile(Freeldr_Ini);
MmFreeMemory(FreeLoaderIniFileData);
return FALSE;
}
FsCloseFile(Freeldr_Ini);
// Parse the .ini file data
Success = IniParseFile(FreeLoaderIniFileData, FreeLoaderIniFileSize);
MmFreeMemory(FreeLoaderIniFileData);
return Success;
}
PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber)
{
PFILE IniFileHandle; // File handle for freeldr.ini
if (!FsOpenVolume(BootDriveNumber, BootPartitionNumber))
{
if (BootPartitionNumber == 0)
{
printf("Error opening active (bootable) partition on boot drive 0x%x for file access.\n", BootDriveNumber);
}
else
{
printf("Error opening partition %d on boot drive 0x%x for file access.\n", BootPartitionNumber, BootDriveNumber);
}
return NULL;
}
// Try to open freeldr.ini
IniFileHandle = FsOpenFile("freeldr.ini");
return IniFileHandle;
}

View File

@@ -1,252 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <ui.h>
#include <rtl.h>
#include <debug.h>
#include <mm.h>
BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId)
{
PINI_SECTION Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() SectionName = %s\n", SectionName));
if (!IniFileSectionListHead)
return FALSE;
// Loop through each section and find the one they want
Section = (PINI_SECTION)RtlListGetHead((PLIST_ITEM)IniFileSectionListHead);
while (Section != NULL)
{
// Compare against the section name
if (stricmp(SectionName, Section->SectionName) == 0)
{
// We found it
*SectionId = (U32)Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n", SectionId));
return TRUE;
}
// Get the next section in the list
Section = (PINI_SECTION)RtlListGetNext((PLIST_ITEM)Section);
}
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Section not found.\n"));
return FALSE;
}
U32 IniGetNumSectionItems(U32 SectionId)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
DbgPrint((DPRINT_INIFILE, "IniGetNumSectionItems() SectionId = 0x%x\n", SectionId));
DbgPrint((DPRINT_INIFILE, "IniGetNumSectionItems() Item count = %d\n", Section->SectionItemCount));
return Section->SectionItemCount;
}
U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
// Return the size of the string plus 1 for the null-terminator
return (strlen(Section->SectionItemList[SettingIndex].ItemName) + 1);
}
U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
// Return the size of the string plus 1 for the null-terminator
return (strlen(Section->SectionItemList[SettingIndex].ItemValue) + 1);
}
BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
#ifdef DEBUG
U32 RealSettingNumber = SettingNumber;
#endif
DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() SectionId = 0x%x\n", SectionId));
// Loop through each section item and find the one they want
DbgPrint((DPRINT_INIFILE, ".01 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
SectionItem = (PINI_SECTION_ITEM)RtlListGetHead((PLIST_ITEM)Section->SectionItemList);
while (SectionItem != NULL)
{
DbgPrint((DPRINT_INIFILE, ".1 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
// Check to see if this is the setting they want
if (SettingNumber == 0)
{
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting number %d found.\n", RealSettingNumber));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting name = %s\n", SectionItem->ItemName));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting value = %s\n", SectionItem->ItemValue));
DbgPrint((DPRINT_INIFILE, "1 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
RtlZeroMemory(SettingName, NameSize);
RtlZeroMemory(SettingValue, ValueSize);
DbgPrint((DPRINT_INIFILE, "2 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
strncpy(SettingName, SectionItem->ItemName, NameSize);
DbgPrint((DPRINT_INIFILE, "3 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
strncpy(SettingValue, SectionItem->ItemValue, ValueSize);
DbgPrint((DPRINT_INIFILE, "4 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
DbgDumpBuffer(DPRINT_INIFILE, SettingName, NameSize);
DbgDumpBuffer(DPRINT_INIFILE, SettingValue, ValueSize);
return TRUE;
}
// Nope, keep going
SettingNumber--;
// Get the next section item in the list
SectionItem = (PINI_SECTION_ITEM)RtlListGetNext((PLIST_ITEM)SectionItem);
}
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting number %d not found.\n", RealSettingNumber));
return FALSE;
}
BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() SectionId = 0x%x\n", SectionId));
// Loop through each section item and find the one they want
SectionItem = (PINI_SECTION_ITEM)RtlListGetHead((PLIST_ITEM)Section->SectionItemList);
while (SectionItem != NULL)
{
// Check to see if this is the setting they want
if (stricmp(SettingName, SectionItem->ItemName) == 0)
{
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting \'%s\' found.\n", SettingName));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting value = %s\n", SectionItem->ItemValue));
RtlZeroMemory(Buffer, BufferSize);
strncpy(Buffer, SectionItem->ItemValue, BufferSize);
return TRUE;
}
// Get the next section item in the list
SectionItem = (PINI_SECTION_ITEM)RtlListGetNext((PLIST_ITEM)SectionItem);
}
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting \'%s\' not found.\n", SettingName));
return FALSE;
}
BOOL IniAddSection(PUCHAR SectionName, U32* SectionId)
{
PINI_SECTION Section;
// Allocate a new section structure
Section = MmAllocateMemory(sizeof(INI_SECTION));
if (!Section)
{
return FALSE;
}
RtlZeroMemory(Section, sizeof(INI_SECTION));
// Allocate the section name buffer
Section->SectionName = MmAllocateMemory(strlen(SectionName));
if (!Section->SectionName)
{
MmFreeMemory(Section);
return FALSE;
}
// Get the section name
strcpy(Section->SectionName, SectionName);
// Add it to the section list head
IniFileSectionCount++;
if (IniFileSectionListHead == NULL)
{
IniFileSectionListHead = Section;
}
else
{
RtlListInsertTail((PLIST_ITEM)IniFileSectionListHead, (PLIST_ITEM)Section);
}
*SectionId = (U32)Section;
return TRUE;
}
BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
// Allocate a new item structure
SectionItem = MmAllocateMemory(sizeof(INI_SECTION_ITEM));
if (!SectionItem)
{
return FALSE;
}
RtlZeroMemory(SectionItem, sizeof(INI_SECTION_ITEM));
// Allocate the setting name buffer
SectionItem->ItemName = MmAllocateMemory(strlen(SettingName));
if (!SectionItem->ItemName)
{
MmFreeMemory(SectionItem);
return FALSE;
}
// Allocate the setting value buffer
SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue));
if (!SectionItem->ItemValue)
{
MmFreeMemory(SectionItem->ItemName);
MmFreeMemory(SectionItem);
return FALSE;
}
strcpy(SectionItem->ItemName, SettingName);
strcpy(SectionItem->ItemValue, SettingValue);
// Add it to the current section
Section->SectionItemCount++;
if (Section->SectionItemList == NULL)
{
Section->SectionItemList = SectionItem;
}
else
{
RtlListInsertTail((PLIST_ITEM)Section->SectionItemList, (PLIST_ITEM)SectionItem);
}
return TRUE;
}

View File

@@ -1,605 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <rtl.h>
#include <mm.h>
#include <debug.h>
PINI_SECTION IniFileSectionListHead = NULL;
U32 IniFileSectionCount = 0;
U32 IniFileSettingCount = 0;
BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize)
{
U32 CurrentOffset;
U32 CurrentLineNumber;
PUCHAR IniFileLine;
U32 IniFileLineSize;
U32 LineLength;
PINI_SECTION CurrentSection = NULL;
PINI_SECTION_ITEM CurrentItem = NULL;
DbgPrint((DPRINT_INIFILE, "IniParseFile() IniFileSize: %d\n", IniFileSize));
// Start with an 80-byte buffer
IniFileLineSize = 80;
IniFileLine = MmAllocateMemory(IniFileLineSize);
if (!IniFileLine)
{
return FALSE;
}
// Loop through each line and parse it
CurrentLineNumber = 0;
CurrentOffset = 0;
while (CurrentOffset < IniFileSize)
{
// First check the line size and increase our buffer if necessary
if (IniFileLineSize < IniGetNextLineSize(IniFileData, IniFileSize, CurrentOffset))
{
IniFileLineSize = IniGetNextLineSize(IniFileData, IniFileSize, CurrentOffset);
MmFreeMemory(IniFileLine);
IniFileLine = MmAllocateMemory(IniFileLineSize);
if (!IniFileLine)
{
return FALSE;
}
}
// Get the line of data
CurrentOffset = IniGetNextLine(IniFileData, IniFileSize, IniFileLine, IniFileLineSize, CurrentOffset);
LineLength = strlen(IniFileLine);
// If it is a blank line or a comment then skip it
if (IniIsLineEmpty(IniFileLine, LineLength) || IniIsCommentLine(IniFileLine, LineLength))
{
CurrentLineNumber++;
continue;
}
// Check if it is a new section
if (IniIsSectionName(IniFileLine, LineLength))
{
// Allocate a new section structure
CurrentSection = MmAllocateMemory(sizeof(INI_SECTION));
if (!CurrentSection)
{
MmFreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentSection, sizeof(INI_SECTION));
// Allocate the section name buffer
CurrentSection->SectionName = MmAllocateMemory(IniGetSectionNameSize(IniFileLine, LineLength));
if (!CurrentSection->SectionName)
{
MmFreeMemory(CurrentSection);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Get the section name
IniExtractSectionName(CurrentSection->SectionName, IniFileLine, LineLength);
// Add it to the section list head
IniFileSectionCount++;
if (IniFileSectionListHead == NULL)
{
IniFileSectionListHead = CurrentSection;
}
else
{
RtlListInsertTail((PLIST_ITEM)IniFileSectionListHead, (PLIST_ITEM)CurrentSection);
}
CurrentLineNumber++;
continue;
}
// Check if it is a setting
if (IniIsSetting(IniFileLine, LineLength))
{
// First check to make sure we're inside a [section]
if (CurrentSection == NULL)
{
printf("Error: freeldr.ini:%ld: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
printf("Press any key to continue...\n");
getch();
CurrentLineNumber++;
continue;
}
// Allocate a new item structure
CurrentItem = MmAllocateMemory(sizeof(INI_SECTION_ITEM));
if (!CurrentItem)
{
MmFreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentItem, sizeof(INI_SECTION_ITEM));
// Allocate the setting name buffer
CurrentItem->ItemName = MmAllocateMemory(IniGetSettingNameSize(IniFileLine, LineLength));
if (!CurrentItem->ItemName)
{
MmFreeMemory(CurrentItem);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Allocate the setting value buffer
CurrentItem->ItemValue = MmAllocateMemory(IniGetSettingValueSize(IniFileLine, LineLength));
if (!CurrentItem->ItemValue)
{
MmFreeMemory(CurrentItem->ItemName);
MmFreeMemory(CurrentItem);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Get the section name
IniExtractSettingName(CurrentItem->ItemName, IniFileLine, LineLength);
IniExtractSettingValue(CurrentItem->ItemValue, IniFileLine, LineLength);
// Add it to the current section
IniFileSettingCount++;
CurrentSection->SectionItemCount++;
if (CurrentSection->SectionItemList == NULL)
{
CurrentSection->SectionItemList = CurrentItem;
}
else
{
RtlListInsertTail((PLIST_ITEM)CurrentSection->SectionItemList, (PLIST_ITEM)CurrentItem);
}
CurrentLineNumber++;
continue;
}
CurrentLineNumber++;
}
DbgPrint((DPRINT_INIFILE, "Parsed %d sections and %d settings.\n", IniFileSectionCount, IniFileSettingCount));
DbgPrint((DPRINT_INIFILE, "IniParseFile() done.\n"));
return TRUE;
}
U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset)
{
U32 Idx;
U32 LineCharCount = 0;
// Loop through counting chars until we hit the end of the
// file or we encounter a new line char
for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++)
{
// Increment the line character count
LineCharCount++;
// Check for new line char
if (IniFileData[CurrentOffset] == '\n')
{
CurrentOffset++;
break;
}
}
// Add one for the NULL-terminator
LineCharCount++;
// Send back line character count
return LineCharCount;
}
U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset)
{
U32 Idx;
// Loop through grabbing chars until we hit the end of the
// file or we encounter a new line char
for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++)
{
// If we haven't exceeded our buffer size yet
// then store another char
if (Idx < (BufferSize - 1))
{
Buffer[Idx++] = IniFileData[CurrentOffset];
}
// Check for new line char
if (IniFileData[CurrentOffset] == '\n')
{
CurrentOffset++;
break;
}
}
// Terminate the string
Buffer[Idx] = '\0';
// Get rid of newline & linefeed characters (if any)
if((Buffer[strlen(Buffer)-1] == '\n') || (Buffer[strlen(Buffer)-1] == '\r'))
Buffer[strlen(Buffer)-1] = '\0';
if((Buffer[strlen(Buffer)-1] == '\n') || (Buffer[strlen(Buffer)-1] == '\r'))
Buffer[strlen(Buffer)-1] = '\0';
// Send back new offset
return CurrentOffset;
}
BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check for text (skipping whitespace)
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t') ||
(LineOfText[Idx] == '\n') ||
(LineOfText[Idx] == '\r'))
{
continue;
}
else
{
return FALSE;
}
}
return TRUE;
}
BOOL IniIsCommentLine(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check the first character (skipping whitespace)
// and make sure that it is an opening bracket
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t'))
{
continue;
}
else if (LineOfText[Idx] == INI_FILE_COMMENT_CHAR)
{
return TRUE;
}
else
{
break;
}
}
return FALSE;
}
BOOL IniIsSectionName(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check the first character (skipping whitespace)
// and make sure that it is an opening bracket
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t'))
{
continue;
}
else if (LineOfText[Idx] == '[')
{
return TRUE;
}
else
{
break;
}
}
return FALSE;
}
U32 IniGetSectionNameSize(PUCHAR SectionNameLine, U32 LineLength)
{
U32 Idx;
U32 NameSize;
// Find the opening bracket (skipping whitespace)
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ' ') ||
(SectionNameLine[Idx] == '\t'))
{
continue;
}
else //if (SectionNameLine[Idx] == '[')
{
break;
}
}
// Skip past the opening bracket
Idx++;
// Count the characters up until the closing bracket or EOL
for (NameSize=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ']') ||
(SectionNameLine[Idx] == '\0'))
{
break;
}
// Increment the count
NameSize++;
}
// Add one for the NULL-terminator
NameSize++;
return NameSize;
}
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Find the opening bracket (skipping whitespace)
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ' ') ||
(SectionNameLine[Idx] == '\t'))
{
continue;
}
else //if (SectionNameLine[Idx] == '[')
{
break;
}
}
// Skip past the opening bracket
Idx++;
// Count the characters up until the closing bracket or EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ']') ||
(SectionNameLine[Idx] == '\0'))
{
break;
}
// Grab a character and increment DestIdx
SectionName[DestIdx] = SectionNameLine[Idx];
DestIdx++;
}
// Terminate the string
SectionName[DestIdx] = '\0';
}
BOOL IniIsSetting(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Basically just check for an '=' equals sign
for (Idx=0; Idx<TextLength; Idx++)
{
if (LineOfText[Idx] == '=')
{
return TRUE;
}
}
return FALSE;
}
U32 IniGetSettingNameSize(PUCHAR SettingNameLine, U32 LineLength)
{
U32 Idx;
U32 NameSize;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == ' ') ||
(SettingNameLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Count the characters up until the '=' equals sign or EOL
for (NameSize=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == '=') ||
(SettingNameLine[Idx] == '\0'))
{
break;
}
// Increment the count
NameSize++;
}
// Add one for the NULL-terminator
NameSize++;
return NameSize;
}
U32 IniGetSettingValueSize(PUCHAR SettingValueLine, U32 LineLength)
{
U32 Idx;
U32 ValueSize;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingValueLine[Idx] == ' ') ||
(SettingValueLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Skip the characters up until the '=' equals sign or EOL
for (; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '=')
{
Idx++;
break;
}
// If we hit EOL then obviously the value size is zero
if (SettingValueLine[Idx] == '\0')
{
return 0;
}
}
// Count the characters up until the EOL
for (ValueSize=0; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '\0')
{
break;
}
// Increment the count
ValueSize++;
}
// Add one for the NULL-terminator
ValueSize++;
return ValueSize;
}
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == ' ') ||
(SettingNameLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Get the characters up until the '=' equals sign or EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == '=') ||
(SettingNameLine[Idx] == '\0'))
{
break;
}
// Grab a character and increment DestIdx
SettingName[DestIdx] = SettingNameLine[Idx];
DestIdx++;
}
// Terminate the string
SettingName[DestIdx] = '\0';
}
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingValueLine[Idx] == ' ') ||
(SettingValueLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Skip the characters up until the '=' equals sign or EOL
for (; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '=')
{
Idx++;
break;
}
// If we hit EOL then obviously the value size is zero
if (SettingValueLine[Idx] == '\0')
{
SettingValue[0] = '\0';
return;
}
}
// Get the characters up until the EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '\0')
{
break;
}
// Grab a character and increment DestIdx
SettingValue[DestIdx] = SettingValueLine[Idx];
DestIdx++;
}
// Terminate the string
SettingValue[DestIdx] = '\0';
}

View File

@@ -1,508 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <disk.h>
#include <miscboot.h>
#include <rtl.h>
#include <fs.h>
#include <ui.h>
#include <linux.h>
#include <debug.h>
#include <mm.h>
#include <inifile.h>
#include <oslist.h> // For RemoveQuotes()
#include <video.h>
#include <drivemap.h>
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
PLINUX_BOOTSECTOR LinuxBootSector = NULL;
PLINUX_SETUPSECTOR LinuxSetupSector = NULL;
U32 SetupSectorSize = 0;
BOOL NewStyleLinuxKernel = FALSE;
U32 LinuxKernelSize = 0;
U32 LinuxInitrdSize = 0;
UCHAR LinuxKernelName[260];
UCHAR LinuxInitrdName[260];
BOOL LinuxHasInitrd = FALSE;
UCHAR LinuxCommandLine[260] = "";
U32 LinuxCommandLineSize = 0;
PVOID LinuxKernelLoadAddress = NULL;
PVOID LinuxInitrdLoadAddress = NULL;
UCHAR LinuxBootDescription[80];
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
{
PFILE LinuxKernel = NULL;
PFILE LinuxInitrdFile = NULL;
UCHAR TempString[260];
UiDrawBackdrop();
if (Description)
{
sprintf(LinuxBootDescription, "Loading %s...", Description);
}
else
{
strcpy(LinuxBootDescription, "Loading Linux...");
}
UiDrawStatusText(LinuxBootDescription);
UiDrawProgressBarCenter(0, 100, LinuxBootDescription);
// Parse the .ini file section
if (!LinuxParseIniSection(OperatingSystemName))
{
goto LinuxBootFailed;
}
// Open the boot volume
if (!FsOpenVolume(BootDrive, BootPartition))
{
UiMessageBox("Failed to open boot drive.");
goto LinuxBootFailed;
}
// Open the kernel
LinuxKernel = FsOpenFile(LinuxKernelName);
if (LinuxKernel == NULL)
{
sprintf(TempString, "Linux kernel \'%s\' not found.", LinuxKernelName);
UiMessageBox(TempString);
goto LinuxBootFailed;
}
// Open the initrd file image (if necessary)
if (LinuxHasInitrd)
{
LinuxInitrdFile = FsOpenFile(LinuxInitrdName);
if (LinuxInitrdFile == NULL)
{
sprintf(TempString, "Linux initrd image \'%s\' not found.", LinuxInitrdName);
UiMessageBox(TempString);
goto LinuxBootFailed;
}
}
// Read the boot sector
if (!LinuxReadBootSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the setup sector
if (!LinuxReadSetupSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Calc kernel size
LinuxKernelSize = FsGetFileSize(LinuxKernel) - (512 + SetupSectorSize);
// Get the file size
LinuxInitrdSize = FsGetFileSize(LinuxInitrdFile);
// Read the kernel
if (!LinuxReadKernel(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the initrd (if necessary)
if (LinuxHasInitrd)
{
if (!LinuxReadInitrd(LinuxInitrdFile))
{
goto LinuxBootFailed;
}
}
// If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h)
if (LinuxBootSector->RootDevice == 0x0000)
{
LinuxBootSector->RootDevice = 0x0200;
}
if (LinuxSetupSector->Version >= 0x0202)
{
LinuxSetupSector->CommandLinePointer = 0x99000;
}
else
{
LinuxBootSector->CommandLineMagic = LINUX_COMMAND_LINE_MAGIC;
LinuxBootSector->CommandLineOffset = 0x9000;
}
if (NewStyleLinuxKernel)
{
LinuxSetupSector->TypeOfLoader = LINUX_LOADER_TYPE_FREELOADER;
}
else
{
LinuxSetupSector->LoadFlags = 0;
}
RtlCopyMemory((PVOID)0x90000, LinuxBootSector, 512);
RtlCopyMemory((PVOID)0x90200, LinuxSetupSector, SetupSectorSize);
RtlCopyMemory((PVOID)0x99000, LinuxCommandLine, LinuxCommandLineSize);
UiUnInitialize("Booting Linux...");
DiskStopFloppyMotor();
if (LinuxSetupSector->LoadFlags & LINUX_FLAG_LOAD_HIGH)
{
BootNewLinuxKernel();
}
else
{
BootOldLinuxKernel(LinuxKernelSize);
}
LinuxBootFailed:
if (LinuxKernel != NULL)
{
FsCloseFile(LinuxKernel);
}
if (LinuxInitrdFile != NULL)
{
FsCloseFile(LinuxInitrdFile);
}
if (LinuxBootSector != NULL)
{
MmFreeMemory(LinuxBootSector);
}
if (LinuxSetupSector != NULL)
{
MmFreeMemory(LinuxSetupSector);
}
if (LinuxKernelLoadAddress != NULL)
{
MmFreeMemory(LinuxKernelLoadAddress);
}
if (LinuxInitrdLoadAddress != NULL)
{
MmFreeMemory(LinuxInitrdLoadAddress);
}
LinuxBootSector = NULL;
LinuxSetupSector = NULL;
LinuxKernelLoadAddress = NULL;
LinuxInitrdLoadAddress = NULL;
SetupSectorSize = 0;
NewStyleLinuxKernel = FALSE;
LinuxKernelSize = 0;
LinuxHasInitrd = FALSE;
strcpy(LinuxCommandLine, "");
LinuxCommandLineSize = 0;
}
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
{
UCHAR SettingName[260];
UCHAR SettingValue[260];
U32 SectionId;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return FALSE;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 260))
{
UiMessageBox("Boot drive not specified for selected OS!");
return FALSE;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 260))
{
BootPartition = atoi(SettingValue);
}
// Get the kernel name
if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, 260))
{
UiMessageBox("Linux kernel filename not specified for selected OS!");
return FALSE;
}
// Get the initrd name
if (IniReadSettingByName(SectionId, "Initrd", LinuxInitrdName, 260))
{
LinuxHasInitrd = TRUE;
}
// Get the command line
if (IniReadSettingByName(SectionId, "CommandLine", LinuxCommandLine, 260))
{
RemoveQuotes(LinuxCommandLine);
LinuxCommandLineSize = strlen(LinuxCommandLine) + 1;
}
return TRUE;
}
BOOL LinuxReadBootSector(PFILE LinuxKernelFile)
{
// Allocate memory for boot sector
LinuxBootSector = (PLINUX_BOOTSECTOR)MmAllocateMemory(512);
if (LinuxBootSector == NULL)
{
return FALSE;
}
// Read linux boot sector
FsSetFilePointer(LinuxKernelFile, 0);
if (!FsReadFile(LinuxKernelFile, 512, NULL, LinuxBootSector))
{
return FALSE;
}
// Check for validity
if (LinuxBootSector->BootFlag != LINUX_BOOT_SECTOR_MAGIC)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
DbgPrint((DPRINT_LINUX, "SetupSectors: %d\n", LinuxBootSector->SetupSectors));
DbgPrint((DPRINT_LINUX, "RootFlags: 0x%x\n", LinuxBootSector->RootFlags));
DbgPrint((DPRINT_LINUX, "SystemSize: 0x%x\n", LinuxBootSector->SystemSize));
DbgPrint((DPRINT_LINUX, "SwapDevice: 0x%x\n", LinuxBootSector->SwapDevice));
DbgPrint((DPRINT_LINUX, "RamSize: 0x%x\n", LinuxBootSector->RamSize));
DbgPrint((DPRINT_LINUX, "VideoMode: 0x%x\n", LinuxBootSector->VideoMode));
DbgPrint((DPRINT_LINUX, "RootDevice: 0x%x\n", LinuxBootSector->RootDevice));
DbgPrint((DPRINT_LINUX, "BootFlag: 0x%x\n", LinuxBootSector->BootFlag));
return TRUE;
}
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile)
{
U8 TempLinuxSetupSector[512];
LinuxSetupSector = (PLINUX_SETUPSECTOR)TempLinuxSetupSector;
// Read first linux setup sector
FsSetFilePointer(LinuxKernelFile, 512);
if (!FsReadFile(LinuxKernelFile, 512, NULL, TempLinuxSetupSector))
{
return FALSE;
}
// Check the kernel version
if (!LinuxCheckKernelVersion())
{
return FALSE;
}
if (NewStyleLinuxKernel)
{
SetupSectorSize = 512 * LinuxBootSector->SetupSectors;
}
else
{
SetupSectorSize = 4 * 512; // Always 4 setup sectors
}
// Allocate memory for setup sectors
LinuxSetupSector = (PLINUX_SETUPSECTOR)MmAllocateMemory(SetupSectorSize);
if (LinuxSetupSector == NULL)
{
return FALSE;
}
// Copy over first setup sector
RtlCopyMemory(LinuxSetupSector, TempLinuxSetupSector, 512);
// Read in the rest of the linux setup sectors
FsSetFilePointer(LinuxKernelFile, 1024);
if (!FsReadFile(LinuxKernelFile, SetupSectorSize - 512, NULL, ((PVOID)LinuxSetupSector) + 512))
{
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
DbgPrint((DPRINT_LINUX, "SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature));
DbgPrint((DPRINT_LINUX, "Version: 0x%x\n", LinuxSetupSector->Version));
DbgPrint((DPRINT_LINUX, "RealModeSwitch: 0x%x\n", LinuxSetupSector->RealModeSwitch));
DbgPrint((DPRINT_LINUX, "SetupSeg: 0x%x\n", LinuxSetupSector->SetupSeg));
DbgPrint((DPRINT_LINUX, "StartSystemSeg: 0x%x\n", LinuxSetupSector->StartSystemSeg));
DbgPrint((DPRINT_LINUX, "KernelVersion: 0x%x\n", LinuxSetupSector->KernelVersion));
DbgPrint((DPRINT_LINUX, "TypeOfLoader: 0x%x\n", LinuxSetupSector->TypeOfLoader));
DbgPrint((DPRINT_LINUX, "LoadFlags: 0x%x\n", LinuxSetupSector->LoadFlags));
DbgPrint((DPRINT_LINUX, "SetupMoveSize: 0x%x\n", LinuxSetupSector->SetupMoveSize));
DbgPrint((DPRINT_LINUX, "Code32Start: 0x%x\n", LinuxSetupSector->Code32Start));
DbgPrint((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress));
DbgPrint((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize));
DbgPrint((DPRINT_LINUX, "BootSectKludgeOffset: 0x%x\n", LinuxSetupSector->BootSectKludgeOffset));
DbgPrint((DPRINT_LINUX, "BootSectKludgeSegment: 0x%x\n", LinuxSetupSector->BootSectKludgeSegment));
DbgPrint((DPRINT_LINUX, "HeapEnd: 0x%x\n", LinuxSetupSector->HeapEnd));
return TRUE;
}
BOOL LinuxReadKernel(PFILE LinuxKernelFile)
{
U32 BytesLoaded;
UCHAR StatusText[260];
PVOID LoadAddress;
sprintf(StatusText, "Loading %s", LinuxKernelName);
UiDrawStatusText(StatusText);
// Allocate memory for Linux kernel
LinuxKernelLoadAddress = MmAllocateMemoryAtAddress(LinuxKernelSize, (PVOID)LINUX_KERNEL_LOAD_ADDRESS);
if (LinuxKernelLoadAddress != (PVOID)LINUX_KERNEL_LOAD_ADDRESS)
{
return FALSE;
}
LoadAddress = LinuxKernelLoadAddress;
// Read linux kernel to 0x100000 (1mb)
FsSetFilePointer(LinuxKernelFile, 512 + SetupSectorSize);
for (BytesLoaded=0; BytesLoaded<LinuxKernelSize; )
{
if (!FsReadFile(LinuxKernelFile, LINUX_READ_CHUNK_SIZE, NULL, LoadAddress))
{
return FALSE;
}
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LoadAddress += LINUX_READ_CHUNK_SIZE;
UiDrawProgressBarCenter(BytesLoaded, LinuxKernelSize + LinuxInitrdSize, LinuxBootDescription);
}
return TRUE;
}
BOOL LinuxCheckKernelVersion(VOID)
{
// Just assume old kernel until we find otherwise
NewStyleLinuxKernel = FALSE;
// Check for new style setup header
if (LinuxSetupSector->SetupHeaderSignature != LINUX_SETUP_HEADER_ID)
{
NewStyleLinuxKernel = FALSE;
}
// Check for version below 2.0
else if (LinuxSetupSector->Version < 0x0200)
{
NewStyleLinuxKernel = FALSE;
}
// Check for version 2.0
else if (LinuxSetupSector->Version == 0x0200)
{
NewStyleLinuxKernel = TRUE;
}
// Check for version 2.01+
else if (LinuxSetupSector->Version >= 0x0201)
{
NewStyleLinuxKernel = TRUE;
LinuxSetupSector->HeapEnd = 0x9000;
LinuxSetupSector->LoadFlags |= LINUX_FLAG_CAN_USE_HEAP;
}
if ((NewStyleLinuxKernel == FALSE) && (LinuxHasInitrd == TRUE))
{
UiMessageBox("Error: Cannot load a ramdisk (initrd) with an old kernel image.");
return FALSE;
}
return TRUE;
}
BOOL LinuxReadInitrd(PFILE LinuxInitrdFile)
{
U32 BytesLoaded;
UCHAR StatusText[260];
sprintf(StatusText, "Loading %s", LinuxInitrdName);
UiDrawStatusText(StatusText);
// Allocate memory for the ramdisk
//LinuxInitrdLoadAddress = MmAllocateMemory(LinuxInitrdSize);
// Try to align it at the next MB boundary after the kernel
//LinuxInitrdLoadAddress = MmAllocateMemoryAtAddress(LinuxInitrdSize, (PVOID)ROUND_UP((LINUX_KERNEL_LOAD_ADDRESS + LinuxKernelSize), 0x100000));
if (LinuxSetupSector->Version <= 0x0202)
{
LinuxInitrdLoadAddress = MmAllocateHighestMemoryBelowAddress(LinuxInitrdSize, (PVOID)LINUX_MAX_INITRD_ADDRESS);
}
else
{
LinuxInitrdLoadAddress = MmAllocateHighestMemoryBelowAddress(LinuxInitrdSize, (PVOID)LinuxSetupSector->InitrdAddressMax);
}
if (LinuxInitrdLoadAddress == NULL)
{
return FALSE;
}
// Set the information in the setup struct
LinuxSetupSector->RamdiskAddress = (U32)LinuxInitrdLoadAddress;
LinuxSetupSector->RamdiskSize = LinuxInitrdSize;
DbgPrint((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress));
DbgPrint((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize));
if (LinuxSetupSector->Version >= 0x0203)
{
DbgPrint((DPRINT_LINUX, "InitrdAddressMax: 0x%x\n", LinuxSetupSector->InitrdAddressMax));
}
// Read in the ramdisk
for (BytesLoaded=0; BytesLoaded<LinuxInitrdSize; )
{
if (!FsReadFile(LinuxInitrdFile, LINUX_READ_CHUNK_SIZE, NULL, (PVOID)LinuxInitrdLoadAddress))
{
return FALSE;
}
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LinuxInitrdLoadAddress += LINUX_READ_CHUNK_SIZE;
UiDrawProgressBarCenter(BytesLoaded + LinuxKernelSize, LinuxInitrdSize + LinuxKernelSize, LinuxBootDescription);
}
return TRUE;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,301 +0,0 @@
/* Header file for libgcc2.c. */
/* Copyright (C) 2000, 2001
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_LIBGCC2_H
#define GCC_LIBGCC2_H
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
extern void __clear_cache (char *, char *);
extern void __eprintf (const char *, const char *, unsigned int, const char *)
__attribute__ ((__noreturn__));
struct bb;
extern void __bb_exit_func (void);
extern void __bb_init_func (struct bb *);
extern void __bb_fork_func (void);
extern void __bb_trace_func (void);
extern void __bb_trace_ret (void);
extern void __bb_init_trace_func (struct bb *, unsigned long);
struct exception_descriptor;
extern short int __get_eh_table_language (struct exception_descriptor *);
extern short int __get_eh_table_version (struct exception_descriptor *);
/* Permit the tm.h file to select the endianness to use just for this
file. This is used when the endianness is determined when the
compiler is run. */
#ifndef LIBGCC2_WORDS_BIG_ENDIAN
#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
#endif
#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
#ifndef MIN_UNITS_PER_WORD
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
#endif
/* In the first part of this file, we are interfacing to calls generated
by the compiler itself. These calls pass values into these routines
which have very specific modes (rather than very specific types), and
these compiler-generated calls also expect any return values to have
very specific modes (rather than very specific types). Thus, we need
to avoid using regular C language type names in this part of the file
because the sizes for those types can be configured to be anything.
Instead we use the following special type names. */
typedef int QItype __attribute__ ((mode (QI)));
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef int HItype __attribute__ ((mode (HI)));
typedef unsigned int UHItype __attribute__ ((mode (HI)));
#if MIN_UNITS_PER_WORD > 1
/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1 */
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
#if LONG_LONG_TYPE_SIZE > 32
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
#if MIN_UNITS_PER_WORD > 4
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4 */
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
#endif
#endif
#if BITS_PER_UNIT == 8
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
typedef float XFtype __attribute__ ((mode (XF)));
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
typedef float TFtype __attribute__ ((mode (TF)));
#endif
#else /* BITS_PER_UNIT != 8 */
/* On dsp's there are usually qf/hf/tqf modes used instead of the above.
For now we don't support them in libgcc2.c. */
#undef L_fixdfdi
#undef L_fixsfdi
#undef L_fixtfdi
#undef L_fixunsdfdi
#undef L_fixunsdfsi
#undef L_fixunssfdi
#undef L_fixunssfsi
#undef L_fixunstfdi
#undef L_fixunsxfdi
#undef L_fixunsxfsi
#undef L_fixxfdi
#undef L_floatdidf
#undef L_floatdisf
#undef L_floatditf
#undef L_floatdixf
#endif /* BITS_PER_UNIT != 8 */
typedef int word_type __attribute__ ((mode (__word__)));
/* Make sure that we don't accidentally use any normal C language built-in
type names in the first part of this file. Instead we want to use *only*
the type names defined above. The following macro definitions insure
that if we *do* accidentally use some normal C language built-in type name,
we will get a syntax error. */
#define char bogus_type
#define short bogus_type
#define int bogus_type
#define long bogus_type
#define unsigned bogus_type
#define float bogus_type
#define double bogus_type
#if MIN_UNITS_PER_WORD > 4
#define W_TYPE_SIZE (8 * BITS_PER_UNIT)
#define Wtype DItype
#define UWtype UDItype
#define HWtype DItype
#define UHWtype UDItype
#define DWtype TItype
#define UDWtype UTItype
#define __NW(a,b) __ ## a ## di ## b
#define __NDW(a,b) __ ## a ## ti ## b
#elif MIN_UNITS_PER_WORD > 2 \
|| (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32)
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
#define Wtype SItype
#define UWtype USItype
#define HWtype SItype
#define UHWtype USItype
#define DWtype DItype
#define UDWtype UDItype
#define __NW(a,b) __ ## a ## si ## b
#define __NDW(a,b) __ ## a ## di ## b
#elif MIN_UNITS_PER_WORD > 1
#define W_TYPE_SIZE (2 * BITS_PER_UNIT)
#define Wtype HItype
#define UWtype UHItype
#define HWtype HItype
#define UHWtype UHItype
#define DWtype SItype
#define UDWtype USItype
#define __NW(a,b) __ ## a ## hi ## b
#define __NDW(a,b) __ ## a ## si ## b
#else
#define W_TYPE_SIZE BITS_PER_UNIT
#define Wtype QItype
#define UWtype UQItype
#define HWtype QItype
#define UHWtype UQItype
#define DWtype HItype
#define UDWtype UHItype
#define __NW(a,b) __ ## a ## qi ## b
#define __NDW(a,b) __ ## a ## hi ## b
#endif
#define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
#define Wtype_MIN (- Wtype_MAX - 1)
#define __muldi3 __NDW(mul,3)
#define __divdi3 __NDW(div,3)
#define __udivdi3 __NDW(udiv,3)
#define __moddi3 __NDW(mod,3)
#define __umoddi3 __NDW(umod,3)
#define __negdi2 __NDW(neg,2)
#define __lshrdi3 __NDW(lshr,3)
#define __ashldi3 __NDW(ashl,3)
#define __ashrdi3 __NDW(ashr,3)
#define __ffsdi2 __NDW(ffs,2)
#define __cmpdi2 __NDW(cmp,2)
#define __ucmpdi2 __NDW(ucmp,2)
#define __udivmoddi4 __NDW(udivmod,4)
#define __fixunstfDI __NDW(fixunstf,)
#define __fixtfdi __NDW(fixtf,)
#define __fixunsxfDI __NDW(fixunsxf,)
#define __fixxfdi __NDW(fixxf,)
#define __fixunsdfDI __NDW(fixunsdf,)
#define __fixdfdi __NDW(fixdf,)
#define __fixunssfDI __NDW(fixunssf,)
#define __fixsfdi __NDW(fixsf,)
#define __floatdixf __NDW(float,xf)
#define __floatditf __NDW(float,tf)
#define __floatdidf __NDW(float,df)
#define __floatdisf __NDW(float,sf)
#define __fixunsxfSI __NW(fixunsxf,)
#define __fixunstfSI __NW(fixunstf,)
#define __fixunsdfSI __NW(fixunsdf,)
#define __fixunssfSI __NW(fixunssf,)
extern DWtype __muldi3 (DWtype, DWtype);
extern DWtype __divdi3 (DWtype, DWtype);
extern UDWtype __udivdi3 (UDWtype, UDWtype);
extern UDWtype __umoddi3 (UDWtype, UDWtype);
extern DWtype __moddi3 (DWtype, DWtype);
/* __udivmoddi4 is static inline when building other libgcc2 portions. */
#if (!defined (L_udivdi3) && !defined (L_divdi3) && \
!defined (L_umoddi3) && !defined (L_moddi3))
extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *);
#endif
/* __negdi2 is static inline when building other libgcc2 portions. */
#if !defined(L_divdi3) && !defined(L_moddi3)
extern DWtype __negdi2 (DWtype);
#endif
extern DWtype __lshrdi3 (DWtype, word_type);
extern DWtype __ashldi3 (DWtype, word_type);
extern DWtype __ashrdi3 (DWtype, word_type);
extern DWtype __ffsdi2 (DWtype);
/* __udiv_w_sdiv is static inline when building other libgcc2 portions. */
#if (!defined(L_udivdi3) && !defined(L_divdi3) && \
!defined(L_umoddi3) && !defined(L_moddi3))
extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype);
#endif
extern word_type __cmpdi2 (DWtype, DWtype);
extern word_type __ucmpdi2 (DWtype, DWtype);
extern Wtype __absvsi2 (Wtype);
extern DWtype __absvdi2 (DWtype);
extern Wtype __addvsi3 (Wtype, Wtype);
extern DWtype __addvdi3 (DWtype, DWtype);
extern Wtype __subvsi3 (Wtype, Wtype);
extern DWtype __subvdi3 (DWtype, DWtype);
extern Wtype __mulvsi3 (Wtype, Wtype);
extern DWtype __mulvdi3 (DWtype, DWtype);
extern Wtype __negvsi2 (Wtype);
extern DWtype __negvdi2 (DWtype);
#if BITS_PER_UNIT == 8
extern DWtype __fixdfdi (DFtype);
extern DWtype __fixsfdi (SFtype);
extern DFtype __floatdidf (DWtype);
extern SFtype __floatdisf (DWtype);
extern UWtype __fixunsdfSI (DFtype);
extern UWtype __fixunssfSI (SFtype);
extern DWtype __fixunsdfDI (DFtype);
extern DWtype __fixunssfDI (SFtype);
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
extern DWtype __fixxfdi (XFtype);
extern DWtype __fixunsxfDI (XFtype);
extern XFtype __floatdixf (DWtype);
extern UWtype __fixunsxfSI (XFtype);
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
extern DWtype __fixunstfDI (TFtype);
extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype);
#endif
#endif /* BITS_PER_UNIT == 8 */
/* DWstructs are pairs of Wtype values in the order determined by
LIBGCC2_WORDS_BIG_ENDIAN. */
#if LIBGCC2_WORDS_BIG_ENDIAN
struct DWstruct {Wtype high, low;};
#else
struct DWstruct {Wtype low, high;};
#endif
/* We need this union to unpack/pack DImode values, since we don't have
any arithmetic yet. Incoming DImode parameters are stored into the
`ll' field, and the unpacked result is read from the struct `s'. */
typedef union
{
struct DWstruct s;
DWtype ll;
} DWunion;
#include "longlong.h"
#endif /* ! GCC_LIBGCC2_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,230 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <miscboot.h>
#include <rtl.h>
#include <fs.h>
#include <ui.h>
#include <inifile.h>
#include <disk.h>
#include <drivemap.h>
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
{
PFILE FilePointer;
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
UCHAR FileName[260];
U32 BytesRead;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
BootPartition = atoi(SettingValue);
}
if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, 260))
{
UiMessageBox("Boot sector file not specified for selected OS!");
return;
}
if (!FsOpenVolume(BootDrive, BootPartition))
{
UiMessageBox("Failed to open boot drive.");
return;
}
FilePointer = FsOpenFile(FileName);
if (FilePointer == NULL)
{
strcat(FileName, " not found.");
UiMessageBox(FileName);
return;
}
// Read boot sector
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
PARTITION_TABLE_ENTRY PartitionTableEntry;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
// Read the boot drive
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
// Read the boot partition
if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
UiMessageBox("Boot partition not specified for selected OS!");
return;
}
BootPartition = atoi(SettingValue);
// Get the partition table entry
if (!DiskGetPartitionEntry(BootDrive, BootPartition, &PartitionTableEntry))
{
return;
}
// Now try to read the partition boot sector
// If this fails then abort
if (!DiskReadLogicalSectors(BootDrive, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
// Now try to read the boot sector (or mbr)
// If this fails then abort
if (!DiskReadLogicalSectors(BootDrive, 0, 1, (PVOID)0x7C00))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}

View File

@@ -1,70 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __MEM_H
#define __MEM_H
#ifdef __i386__
#define MM_PAGE_SIZE 4096
#endif // defined __i386__
typedef struct
{
U32 PageAllocated; // Zero = free, non-zero = allocated
U32 PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain)
} PACKED PAGE_LOOKUP_TABLE_ITEM, *PPAGE_LOOKUP_TABLE_ITEM;
//
// Define this to 1 if you want the entire contents
// of the memory allocation bitmap displayed
// when a chunk is allocated or freed
//
#define DUMP_MEM_MAP_ON_VERIFY 0
extern PVOID PageLookupTableAddress;
extern U32 TotalPagesInLookupTable;
extern U32 FreePagesInLookupTable;
extern U32 LastFreePageHint;
#ifdef DEBUG
PUCHAR MmGetSystemMemoryMapTypeString(U32 Type);
#endif
U32 MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address
PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the last address of memory from the memory map
U32 MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions
PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory)
VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory
VOID MmInitPageLookupTable(PVOID PageLookupTable, U32 TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Inits the page lookup table according to the memory types in the memory map
VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount, U32 PageAllocated); // Marks the specified pages as allocated or free in the lookup table
VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount); // Allocates the specified pages in the lookup table
U32 MmCountFreePagesInLookupTable(PVOID PageLookupTable, U32 TotalPageCount); // Returns the number of free pages in the lookup table
U32 MmFindAvailablePagesFromEnd(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded); // Returns the page number of the first available page range from the end of memory
U32 MmFindAvailablePagesBeforePage(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded, U32 LastPage); // Returns the page number of the first available page range before the specified page
VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32* MapCount); // Removes entries in the memory map that describe memory above 4G
VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, U32 TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory
BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, U32 TotalPageCount, PVOID PageAddress, U32 PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE
#endif // defined __MEM_H

Some files were not shown because too many files have changed in this diff Show More