+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
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 UiMessageLine(PUCHAR MessageText); // Adds a line of text to the message box buffer
-VOID UiDrawProgressBarCenter(U32 Position, U32 Range); // Draws the progress bar showing nPos percent filled
-VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range); // Draws the progress bar showing nPos percent filled
+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
UCHAR UiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
/* just some stuff */
-#define VERSION "FreeLoader v1.7.11"
+#define VERSION "FreeLoader v1.7.12"
#define COPYRIGHT "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
#define AUTHOR_EMAIL "<brianp@sginet.com>"
#define BY_AUTHOR "by Brian Palmer"
//
#define FREELOADER_MAJOR_VERSION 1
#define FREELOADER_MINOR_VERSION 7
-#define FREELOADER_PATCH_VERSION 11
+#define FREELOADER_PATCH_VERSION 12
PUCHAR GetFreeLoaderVersionString(VOID);
U32 LinuxCommandLineSize = 0;
PVOID LinuxKernelLoadAddress = NULL;
PVOID LinuxInitrdLoadAddress = NULL;
+UCHAR LinuxBootDescription[80];
VOID LoadAndBootLinux(PUCHAR OperatingSystemName)
{
UiDrawBackdrop();
- UiDrawStatusText("Loading Linux...");
- UiDrawProgressBarCenter(0, 100);
-
// Parse the .ini file section
if (!LinuxParseIniSection(OperatingSystemName))
{
goto LinuxBootFailed;
}
+ UiDrawStatusText(LinuxBootDescription);
+ UiDrawProgressBarCenter(0, 100, LinuxBootDescription);
+
// Open the boot volume
if (!FsOpenVolume(BootDrive, BootPartition))
{
LinuxSetupSector->LoadFlags = 0;
}
+ getch();
RtlCopyMemory((PVOID)0x90000, LinuxBootSector, 512);
RtlCopyMemory((PVOID)0x90200, LinuxSetupSector, SetupSectorSize);
RtlCopyMemory((PVOID)0x99000, LinuxCommandLine, LinuxCommandLineSize);
UiUnInitialize("Booting Linux...");
+ getch();
DiskStopFloppyMotor();
return FALSE;
}
+ if (IniReadSettingByName(SectionId, "Name", SettingValue, 260))
+ {
+ RemoveQuotes(SettingValue);
+ sprintf(LinuxBootDescription, "Loading %s...");
+ }
+ else
+ {
+ strcpy(LinuxBootDescription, "Loading Linux...");
+ }
+
BootDrive = atoi(SettingValue);
BootPartition = 0;
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LoadAddress += LINUX_READ_CHUNK_SIZE;
- UiDrawProgressBarCenter(BytesLoaded, LinuxKernelSize + LinuxInitrdSize);
+ UiDrawProgressBarCenter(BytesLoaded, LinuxKernelSize + LinuxInitrdSize, LinuxBootDescription);
}
return TRUE;
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LinuxInitrdLoadAddress += LINUX_READ_CHUNK_SIZE;
- UiDrawProgressBarCenter(BytesLoaded + LinuxKernelSize, LinuxInitrdSize + LinuxKernelSize);
+ UiDrawProgressBarCenter(BytesLoaded + LinuxKernelSize, LinuxInitrdSize + LinuxKernelSize, LinuxBootDescription);
}
return TRUE;
*/
MultiBootLoadKernel(FilePointer);
- UiDrawProgressBarCenter(nPos, 100);
+ UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS...");
return(TRUE);
}
*/
MultiBootLoadModule(FilePointer, SymbolFileName, NULL);
- UiDrawProgressBarCenter(nPos, 100);
+ UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS...");
return (TRUE);
}
*/
MultiBootLoadModule(FilePointer, szFileName, NULL);
- UiDrawProgressBarCenter(nPos, 100);
+ UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS...");
return(TRUE);
}
UiDrawBackdrop();
UiDrawStatusText("Loading...");
- UiDrawProgressBarCenter(0, 100);
+ UiDrawProgressBarCenter(0, 100, "Loading ReactOS...");
/*
* Try to open boot drive
RegInitializeRegistry();
RegImportHive(Base, Size);
- UiDrawProgressBarCenter(15, 100);
+ UiDrawProgressBarCenter(15, 100, "Loading ReactOS...");
DbgPrint((DPRINT_REACTOS, "SystemHive loaded at 0x%x size %u", (unsigned)Base, (unsigned)Size));
/*
RegExportHive("\\Registry\\Machine\\HARDWARE", Base, &Size);
MultiBootCloseModule(Base, Size);
#endif
- UiDrawProgressBarCenter(20, 100);
+ UiDrawProgressBarCenter(20, 100, "Loading ReactOS...");
/*
* Initialize the 'currentControlSet' link
LoadSymbolFile(szBootPath, szKernelName, 25);
LoadSymbolFile(szBootPath, szHalName, 25);
- UiDrawProgressBarCenter(25, 100);
+ UiDrawProgressBarCenter(25, 100, "Loading ReactOS...");
/*
* Load boot drivers
}
-VOID TuiDrawProgressBarCenter(U32 Position, U32 Range)
+VOID TuiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText)
{
U32 Left, Top, Right, Bottom;
U32 Width = 50; // Allow for 50 "bars"
Top += 2;
Bottom = Top + Height + 1;
- TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range);
+ TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
}
-VOID TuiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range)
+VOID TuiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText)
{
U32 i;
U32 ProgressBarWidth = (Right - Left) - 3;
+ // First make sure the progress bar text fits
+ UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);
+
if (Position > Range)
{
Position = Range;
TuiDrawBox(Left, Top, Right, Bottom, VERT, HORZ, TRUE, TRUE, ATTR(UiMenuFgColor, UiMenuBgColor));
// Draw the "Loading..." text
- TuiDrawText(70/2, Top+1, "Loading...", ATTR(UiTextColor, UiMenuBgColor));
+ //TuiDrawText(70/2, Top+1, "Loading...", ATTR(UiTextColor, UiMenuBgColor));
+ TuiDrawCenteredText(Left + 2, Top + 2, Right - 2, Top + 2, ProgressText, ATTR(UiTextColor, UiMenuBgColor));
// Draw the percent complete
for (i=0; i<(Position*ProgressBarWidth)/Range; i++)
VOID TuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
VOID TuiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button
VOID TuiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
-VOID TuiDrawProgressBarCenter(U32 Position, U32 Range); // Draws the progress bar showing nPos percent filled
-VOID TuiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range); // Draws the progress bar showing nPos percent filled
+VOID TuiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
+VOID TuiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
UCHAR TuiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR TuiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
}
}
-VOID UiDrawProgressBarCenter(U32 Position, U32 Range)
+VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText)
{
if (UiDisplayMode == DISPLAYMODE_TEXT)
{
- TuiDrawProgressBarCenter(Position, Range);
+ TuiDrawProgressBarCenter(Position, Range, ProgressText);
}
else
{
UNIMPLEMENTED();
- //GuiDrawProgressBarCenter(Position, Range);
+ //GuiDrawProgressBarCenter(Position, Range, ProgressText);
}
}
-VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range)
+VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText)
{
if (UiDisplayMode == DISPLAYMODE_TEXT)
{
- TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range);
+ TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
}
else
{
UNIMPLEMENTED();
- //GuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range);
+ //GuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
}
}
// get this code to work and I have absolutely
// no idea why...
//
+// Someone else can take up this portion of the
+// boot loader because my give up...
+//
+// I was going to store the offscreen buffer as
+// a big array of bytes (as opposed to four bits)
+// and that makes it a bit easier to set a pixel
+// on the offscreen buffer, but will have to be
+// handled in the VideoCopyOffScreenBufferToVRAM()
+// function.
+//
VOID VideoSetPixel16(U32 X, U32 Y, U8 Color)
{
U8 CurrentColor;