git-svn-id: https://spexeah.com:8443/svn/Asuro@667 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
bccc36132e
commit
fee4e4d759
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/ACE.ppu
BIN
lib/ACE.ppu
Binary file not shown.
BIN
lib/BPE.ppu
BIN
lib/BPE.ppu
Binary file not shown.
BIN
lib/BTSSE.ppu
BIN
lib/BTSSE.ppu
Binary file not shown.
BIN
lib/CFE.ppu
BIN
lib/CFE.ppu
Binary file not shown.
BIN
lib/CSOE.ppu
BIN
lib/CSOE.ppu
Binary file not shown.
BIN
lib/DBGE.ppu
BIN
lib/DBGE.ppu
Binary file not shown.
BIN
lib/DBZ.ppu
BIN
lib/DBZ.ppu
Binary file not shown.
BIN
lib/DFE.ppu
BIN
lib/DFE.ppu
Binary file not shown.
BIN
lib/E1000.ppu
BIN
lib/E1000.ppu
Binary file not shown.
BIN
lib/GPF.ppu
BIN
lib/GPF.ppu
Binary file not shown.
BIN
lib/IDE.ppu
BIN
lib/IDE.ppu
Binary file not shown.
BIN
lib/IDOE.ppu
BIN
lib/IDOE.ppu
Binary file not shown.
BIN
lib/IOPE.ppu
BIN
lib/IOPE.ppu
Binary file not shown.
BIN
lib/MCE.ppu
BIN
lib/MCE.ppu
Binary file not shown.
BIN
lib/NCE.ppu
BIN
lib/NCE.ppu
Binary file not shown.
BIN
lib/NMIE.ppu
BIN
lib/NMIE.ppu
Binary file not shown.
BIN
lib/OOBE.ppu
BIN
lib/OOBE.ppu
Binary file not shown.
BIN
lib/PCI.ppu
BIN
lib/PCI.ppu
Binary file not shown.
BIN
lib/PF.ppu
BIN
lib/PF.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/RTC.ppu
BIN
lib/RTC.ppu
Binary file not shown.
BIN
lib/SFE.ppu
BIN
lib/SFE.ppu
Binary file not shown.
BIN
lib/SNPE.ppu
BIN
lib/SNPE.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/UIE.ppu
BIN
lib/UIE.ppu
Binary file not shown.
BIN
lib/USB.ppu
BIN
lib/USB.ppu
Binary file not shown.
BIN
lib/arp.ppu
BIN
lib/arp.ppu
Binary file not shown.
BIN
lib/asuro.ppu
BIN
lib/asuro.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/console.o
BIN
lib/console.o
Binary file not shown.
BIN
lib/console.ppu
BIN
lib/console.ppu
Binary file not shown.
BIN
lib/cpu.ppu
BIN
lib/cpu.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/eth2.ppu
BIN
lib/eth2.ppu
Binary file not shown.
BIN
lib/fat32.ppu
BIN
lib/fat32.ppu
Binary file not shown.
BIN
lib/gdt.ppu
BIN
lib/gdt.ppu
Binary file not shown.
BIN
lib/idt.ppu
BIN
lib/idt.ppu
Binary file not shown.
BIN
lib/ipv4.ppu
BIN
lib/ipv4.ppu
Binary file not shown.
BIN
lib/irq.ppu
BIN
lib/irq.ppu
Binary file not shown.
BIN
lib/isr.ppu
BIN
lib/isr.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/kernel.ppu
BIN
lib/kernel.ppu
Binary file not shown.
BIN
lib/keyboard.ppu
BIN
lib/keyboard.ppu
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
BIN
lib/lists.ppu
BIN
lib/lists.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/memview.ppu
BIN
lib/memview.ppu
Binary file not shown.
BIN
lib/mouse.ppu
BIN
lib/mouse.ppu
Binary file not shown.
BIN
lib/net.ppu
BIN
lib/net.ppu
Binary file not shown.
BIN
lib/netutils.ppu
BIN
lib/netutils.ppu
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/serial.ppu
BIN
lib/serial.ppu
Binary file not shown.
BIN
lib/shell.ppu
BIN
lib/shell.ppu
Binary file not shown.
BIN
lib/splash.ppu
BIN
lib/splash.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/strings.ppu
BIN
lib/strings.ppu
Binary file not shown.
BIN
lib/terminal.ppu
BIN
lib/terminal.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/tracer.ppu
BIN
lib/tracer.ppu
Binary file not shown.
BIN
lib/tss.ppu
BIN
lib/tss.ppu
Binary file not shown.
BIN
lib/util.ppu
BIN
lib/util.ppu
Binary file not shown.
Binary file not shown.
@ -200,6 +200,8 @@ procedure _MouseDown();
|
|||||||
procedure _MouseUp();
|
procedure _MouseUp();
|
||||||
procedure _MouseClick(left : boolean);
|
procedure _MouseClick(left : boolean);
|
||||||
|
|
||||||
|
procedure setWindowColors(colors : uint32);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -317,6 +319,11 @@ var
|
|||||||
MouseCursorEnabled : Boolean = true;
|
MouseCursorEnabled : Boolean = true;
|
||||||
OpenTerminal : Boolean = false;
|
OpenTerminal : Boolean = false;
|
||||||
|
|
||||||
|
procedure setWindowColors(colors : uint32);
|
||||||
|
begin
|
||||||
|
Window_Border.Attributes:= colors;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure mouseEnabled(b : boolean);
|
procedure mouseEnabled(b : boolean);
|
||||||
begin
|
begin
|
||||||
MouseCursorEnabled:= b;
|
MouseCursorEnabled:= b;
|
||||||
|
@ -9,14 +9,14 @@ const
|
|||||||
VERSION_SUB = '1';
|
VERSION_SUB = '1';
|
||||||
REVISION = '664';
|
REVISION = '664';
|
||||||
RELEASE = 'ia';
|
RELEASE = 'ia';
|
||||||
LINE_COUNT = 26991;
|
LINE_COUNT = 27151;
|
||||||
FILE_COUNT = 83;
|
FILE_COUNT = 83;
|
||||||
DRIVER_COUNT = 28;
|
DRIVER_COUNT = 28;
|
||||||
FPC_VERSION = '2.6.4';
|
FPC_VERSION = '2.6.4';
|
||||||
NASM_VERSION = '2.10.09';
|
NASM_VERSION = '2.10.09';
|
||||||
MAKE_VERSION = '3.81';
|
MAKE_VERSION = '3.81';
|
||||||
COMPILE_DATE = '05/05/18';
|
COMPILE_DATE = '06/05/18';
|
||||||
COMPILE_TIME = '22:33:57';
|
COMPILE_TIME = '00:38:59';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ function stringSize(str : pchar) : uint32;
|
|||||||
function stringConcat(str1, str2 : pchar) : pchar;
|
function stringConcat(str1, str2 : pchar) : pchar;
|
||||||
function stringContains(str : pchar; sub : pchar) : boolean;
|
function stringContains(str : pchar; sub : pchar) : boolean;
|
||||||
function stringToInt(str : pchar) : uint32;
|
function stringToInt(str : pchar) : uint32;
|
||||||
|
function hexStringToInt(str : pchar) : uint32;
|
||||||
function intToString(i : uint32) : pchar;
|
function intToString(i : uint32) : pchar;
|
||||||
function boolToString(b : boolean; ext : boolean) : pchar;
|
function boolToString(b : boolean; ext : boolean) : pchar;
|
||||||
|
|
||||||
@ -32,6 +33,22 @@ implementation
|
|||||||
uses
|
uses
|
||||||
console;
|
console;
|
||||||
|
|
||||||
|
function hexStringToInt(str : pchar) : uint32;
|
||||||
|
var
|
||||||
|
result : uint32;
|
||||||
|
i : uint32;
|
||||||
|
Shift : uint32;
|
||||||
|
|
||||||
|
begin
|
||||||
|
result:= 0;
|
||||||
|
Shift:= (stringSize(str)-1) * 4;
|
||||||
|
for i:=0 to stringSize(str)-1 do begin
|
||||||
|
result:= result OR (HexCharToDecimal(str[i]) SHL Shift);
|
||||||
|
Shift:= Shift - 4;
|
||||||
|
end;
|
||||||
|
hexStringToInt:= result;
|
||||||
|
end;
|
||||||
|
|
||||||
function stringToUpper(str : pchar) : pchar;
|
function stringToUpper(str : pchar) : pchar;
|
||||||
var
|
var
|
||||||
result : pchar;
|
result : pchar;
|
||||||
|
@ -54,6 +54,8 @@ function getTSC : uint64;
|
|||||||
|
|
||||||
function BCDToUint8(bcd : uint8) : uint8;
|
function BCDToUint8(bcd : uint8) : uint8;
|
||||||
|
|
||||||
|
function HexCharToDecimal(hex : char) : uint8;
|
||||||
|
|
||||||
procedure resetSystem();
|
procedure resetSystem();
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -65,6 +67,35 @@ implementation
|
|||||||
uses
|
uses
|
||||||
console, RTC, cpu;
|
console, RTC, cpu;
|
||||||
|
|
||||||
|
function HexCharToDecimal(hex : char) : uint8;
|
||||||
|
begin
|
||||||
|
case hex of
|
||||||
|
'0':HexCharToDecimal:=0;
|
||||||
|
'1':HexCharToDecimal:=1;
|
||||||
|
'2':HexCharToDecimal:=2;
|
||||||
|
'3':HexCharToDecimal:=3;
|
||||||
|
'4':HexCharToDecimal:=4;
|
||||||
|
'5':HexCharToDecimal:=5;
|
||||||
|
'6':HexCharToDecimal:=6;
|
||||||
|
'7':HexCharToDecimal:=7;
|
||||||
|
'8':HexCharToDecimal:=8;
|
||||||
|
'9':HexCharToDecimal:=9;
|
||||||
|
'a':HexCharToDecimal:=10;
|
||||||
|
'A':HexCharToDecimal:=10;
|
||||||
|
'b':HexCharToDecimal:=11;
|
||||||
|
'B':HexCharToDecimal:=11;
|
||||||
|
'c':HexCharToDecimal:=12;
|
||||||
|
'C':HexCharToDecimal:=12;
|
||||||
|
'd':HexCharToDecimal:=13;
|
||||||
|
'D':HexCharToDecimal:=13;
|
||||||
|
'e':HexCharToDecimal:=14;
|
||||||
|
'E':HexCharToDecimal:=14;
|
||||||
|
'f':HexCharToDecimal:=15;
|
||||||
|
'F':HexCharToDecimal:=15;
|
||||||
|
else HexCharToDecimal:= 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure sleep1;
|
procedure sleep1;
|
||||||
var
|
var
|
||||||
DateTimeStart, DateTimeEnd : TDateTime;
|
DateTimeStart, DateTimeEnd : TDateTime;
|
||||||
|
@ -158,16 +158,13 @@ begin
|
|||||||
{ Management Interfaces }
|
{ Management Interfaces }
|
||||||
tracer.push_trace('kmain.DRVMGMT');
|
tracer.push_trace('kmain.DRVMGMT');
|
||||||
drivermanagement.init();
|
drivermanagement.init();
|
||||||
tracer.pop_trace;
|
|
||||||
tracer.push_trace('kmain.STRMGMT');
|
tracer.push_trace('kmain.STRMGMT');
|
||||||
storagemanagement.init();
|
storagemanagement.init();
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
{ Hook Timer for Ticks }
|
{ Hook Timer for Ticks }
|
||||||
tracer.push_trace('kmain.TMR');
|
tracer.push_trace('kmain.TMR');
|
||||||
STI;
|
STI;
|
||||||
TMR_0_ISR.hook(uint32(@bios_data_area.tick_update));
|
TMR_0_ISR.hook(uint32(@bios_data_area.tick_update));
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
{ Filsystems }
|
{ Filsystems }
|
||||||
fat32.init();
|
fat32.init();
|
||||||
@ -181,7 +178,6 @@ begin
|
|||||||
E1000.init();
|
E1000.init();
|
||||||
IDE.init();
|
IDE.init();
|
||||||
console.outputln('KERNEL', 'DEVICE DRIVERS: INIT END.');
|
console.outputln('KERNEL', 'DEVICE DRIVERS: INIT END.');
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
{ Bus Drivers }
|
{ Bus Drivers }
|
||||||
tracer.push_trace('kmain.BUSDRV');
|
tracer.push_trace('kmain.BUSDRV');
|
||||||
@ -189,12 +185,10 @@ begin
|
|||||||
USB.init();
|
USB.init();
|
||||||
pci.init();
|
pci.init();
|
||||||
console.outputln('KERNEL', 'BUS DRIVERS: INIT END.');
|
console.outputln('KERNEL', 'BUS DRIVERS: INIT END.');
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
{ Network Stack }
|
{ Network Stack }
|
||||||
tracer.push_trace('kmain.NETDRV');
|
tracer.push_trace('kmain.NETDRV');
|
||||||
net.init;
|
net.init;
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
{ End of Boot }
|
{ End of Boot }
|
||||||
tracer.push_trace('kmain.EOB');
|
tracer.push_trace('kmain.EOB');
|
||||||
@ -212,10 +206,6 @@ begin
|
|||||||
|
|
||||||
tracer.push_trace('kmain.END');
|
tracer.push_trace('kmain.END');
|
||||||
|
|
||||||
l:= LL_FromString('/./hhhhhhh/', '/');
|
|
||||||
writestringln(pchar(puint32(LL_Get(l, 0)^)));
|
|
||||||
writestringln(pchar(puint32(LL_Get(l, 1)^)));
|
|
||||||
|
|
||||||
while true do begin
|
while true do begin
|
||||||
console.redrawWindows;
|
console.redrawWindows;
|
||||||
end;
|
end;
|
||||||
|
@ -175,7 +175,7 @@ begin
|
|||||||
writestringlnWND('Memview not open.', getTerminalHWND);
|
writestringlnWND('Memview not open.', getTerminalHWND);
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
MEM_LOC:= stringToInt(loc);
|
if (loc[0] = 'x') or (loc[0] = 'X') then MEM_LOC:= HexStringToInt(@loc[1]) else MEM_LOC:= stringToInt(loc);
|
||||||
NEW_LOC:= true;
|
NEW_LOC:= true;
|
||||||
if Handle = 0 then begin
|
if Handle = 0 then begin
|
||||||
Handle:= newWindow(20, 40, 63, 14, 'MEMVIEW');
|
Handle:= newWindow(20, 40, 63, 14, 'MEMVIEW');
|
||||||
|
@ -104,6 +104,58 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Command_Colors(Params : PParamList);
|
||||||
|
var
|
||||||
|
Command : pchar;
|
||||||
|
Fgs, Bgs : pchar;
|
||||||
|
Fg, Bg : uint32;
|
||||||
|
exists : boolean;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if ParamCount(Params) >= 3 then begin
|
||||||
|
Command:= GetParam(0, Params);
|
||||||
|
Fgs:= GetParam(1, Params);
|
||||||
|
if (Fgs[0] = 'x') or (Fgs[0] = 'X') then Fg:= HexStringToInt(@Fgs[1]) else Fg:= StringToInt(Fgs);
|
||||||
|
Bgs:= GetParam(2, Params);
|
||||||
|
if (Bgs[0] = 'x') or (Bgs[0] = 'X') then Bg:= HexStringToInt(@Bgs[1]) else Bg:= StringToint(Bgs);
|
||||||
|
exists:= false;
|
||||||
|
if StringEquals(Command, 'background') then begin
|
||||||
|
exists:= true;
|
||||||
|
Desktop_Colors:= combinecolors(Fg, Bg);
|
||||||
|
end;
|
||||||
|
if StringEquals(Command, 'taskbar') then begin
|
||||||
|
exists:= true;
|
||||||
|
Takbar_Colors:= combinecolors(Fg, Bg);
|
||||||
|
end;
|
||||||
|
if StringEquals(Command, 'window') then begin
|
||||||
|
exists:= true;
|
||||||
|
setWindowColors(combinecolors(Fg, Bg));
|
||||||
|
end;
|
||||||
|
if StringEquals(Command, 'button') then begin
|
||||||
|
exists:= true;
|
||||||
|
Explore_Colors:= combinecolors(Fg, Bg);
|
||||||
|
end;
|
||||||
|
if exists then begin
|
||||||
|
console.writestringWND('Component:', getTerminalHWND);
|
||||||
|
console.writestringWND(Command, getTerminalHWND);
|
||||||
|
console.writestringWND(' set to FG:', getTerminalHWND);
|
||||||
|
console.writeHexWND(Fg, getTerminalHWND);
|
||||||
|
console.writestringWND(' BG: ', getTerminalHWND);
|
||||||
|
console.writehexlnWND(Bg, getTerminalHWND);
|
||||||
|
end else begin
|
||||||
|
console.writestringWND('Component: ', getTerminalHWND);
|
||||||
|
console.writestringWND(Command, getTerminalHWND);
|
||||||
|
console.writestringlnWND(' not found.', getTerminalHWND);
|
||||||
|
end;
|
||||||
|
end else begin
|
||||||
|
console.writestringlnWND('Usage (Append "x" to a value to treat as Hex): ', getTerminalHWND);
|
||||||
|
console.writestringlnWND(' colors background <foreground> <background>', getTerminalHWND);
|
||||||
|
console.writestringlnWND(' colors taskbar <foreground> <background>', getTerminalHWND);
|
||||||
|
console.writestringlnWND(' colors window <foreground> <background>', getTerminalHWND);
|
||||||
|
console.writestringlnWND(' colors button <foreground> <background>', getTerminalHWND);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Command_Background(Params : PParamList);
|
procedure Command_Background(Params : PParamList);
|
||||||
var
|
var
|
||||||
p1 : PChar;
|
p1 : PChar;
|
||||||
@ -145,6 +197,7 @@ begin
|
|||||||
console.registerEventHandler(DesktopHandle, EVENT_DRAW, void(@onBaseDraw));
|
console.registerEventHandler(DesktopHandle, EVENT_DRAW, void(@onBaseDraw));
|
||||||
|
|
||||||
terminal.registerCommand('BACKGROUND', @Command_Background, 'Hide/Show background - usage: BACKGROUND <hide/show>');
|
terminal.registerCommand('BACKGROUND', @Command_Background, 'Hide/Show background - usage: BACKGROUND <hide/show>');
|
||||||
|
terminal.registerCommand('COLORS', @Command_Colors, 'Set the desktop colors');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
Loading…
x
Reference in New Issue
Block a user