git-svn-id: https://spexeah.com:8443/svn/Asuro@653 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
c113935be7
commit
a5bae52f09
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.
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/faults.ppu
BIN
lib/faults.ppu
Binary file not shown.
BIN
lib/fonts.ppu
BIN
lib/fonts.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.
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.
Binary file not shown.
BIN
lib/net.ppu
BIN
lib/net.ppu
Binary file not shown.
BIN
lib/nettypes.ppu
BIN
lib/nettypes.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/system.o
BIN
lib/system.o
Binary file not shown.
BIN
lib/system.ppu
BIN
lib/system.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.
@ -136,6 +136,7 @@ procedure writewordexWND(i: DWORD; attributes: uint32; WND : uint32);
|
||||
procedure writewordlnexWND(i: DWORD; attributes: uint32; WND : uint32);
|
||||
|
||||
procedure writehexpairWND(b : uint8; WND : uint32);
|
||||
procedure writehexpairExWND(b : uint8; Attributes : uint32; WND : uint32);
|
||||
procedure writehexWND(i: DWORD; WND : uint32);
|
||||
procedure writehexlnWND(i: DWORD; WND : uint32);
|
||||
procedure writehexexWND(i : DWORD; attributes: uint32; WND : uint32);
|
||||
@ -888,7 +889,7 @@ begin
|
||||
Default_Char.visible:= true;
|
||||
|
||||
Window_Border.Character:= ' ';
|
||||
Window_Border.Attributes:= console.combinecolors($01C3, $07EE);//$0000FFFF;
|
||||
Window_Border.Attributes:= console.combinecolors($01C3, $07EE);
|
||||
Window_Border.visible:= true;
|
||||
|
||||
For w:=0 to MAX_WINDOWS-1 do begin
|
||||
@ -1771,6 +1772,11 @@ begin
|
||||
end;
|
||||
|
||||
procedure writehexpairWND(b : uint8; WND : uint32);
|
||||
begin
|
||||
writehexpairExWND(b, Console_Properties.Default_Attribute, WND);
|
||||
end;
|
||||
|
||||
procedure writehexpairExWND(b : uint8; Attributes : uint32; WND : uint32);
|
||||
var
|
||||
bn : Array[0..1] of uint8;
|
||||
i : uint8;
|
||||
@ -1780,22 +1786,22 @@ begin
|
||||
bn[1]:= b AND $0F;
|
||||
for i:=0 to 1 do begin
|
||||
case bn[i] of
|
||||
0 :writestringWND('0', WND);
|
||||
1 :writestringWND('1', WND);
|
||||
2 :writestringWND('2', WND);
|
||||
3 :writestringWND('3', WND);
|
||||
4 :writestringWND('4', WND);
|
||||
5 :writestringWND('5', WND);
|
||||
6 :writestringWND('6', WND);
|
||||
7 :writestringWND('7', WND);
|
||||
8 :writestringWND('8', WND);
|
||||
9 :writestringWND('9', WND);
|
||||
10:writestringWND('A', WND);
|
||||
11:writestringWND('B', WND);
|
||||
12:writestringWND('C', WND);
|
||||
13:writestringWND('D', WND);
|
||||
14:writestringWND('E', WND);
|
||||
15:writestringWND('F', WND);
|
||||
0 :writestringExWND('0', Attributes, WND);
|
||||
1 :writestringExWND('1', Attributes, WND);
|
||||
2 :writestringExWND('2', Attributes, WND);
|
||||
3 :writestringExWND('3', Attributes, WND);
|
||||
4 :writestringExWND('4', Attributes, WND);
|
||||
5 :writestringExWND('5', Attributes, WND);
|
||||
6 :writestringExWND('6', Attributes, WND);
|
||||
7 :writestringExWND('7', Attributes, WND);
|
||||
8 :writestringExWND('8', Attributes, WND);
|
||||
9 :writestringExWND('9', Attributes, WND);
|
||||
10:writestringExWND('A', Attributes, WND);
|
||||
11:writestringExWND('B', Attributes, WND);
|
||||
12:writestringExWND('C', Attributes, WND);
|
||||
13:writestringExWND('D', Attributes, WND);
|
||||
14:writestringExWND('E', Attributes, WND);
|
||||
15:writestringExWND('F', Attributes, WND);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -97,6 +97,19 @@ type
|
||||
TMask = bitpacked array[0..7] of Boolean;
|
||||
PMask = ^TMask;
|
||||
|
||||
TRGB565 = bitpacked record
|
||||
B : UBit5;
|
||||
G : UBit6;
|
||||
R : UBit5
|
||||
end;
|
||||
PRGB565 = ^TRGB565;
|
||||
|
||||
TRGB565Pair = bitpacked record
|
||||
Background : TRGB565;
|
||||
Foreground : TRGB565;
|
||||
end;
|
||||
PRGB565Pair = ^TRGB565Pair;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -346,7 +346,8 @@ var
|
||||
z : uint32;
|
||||
|
||||
begin
|
||||
disable_cursor;
|
||||
console.disable_cursor;
|
||||
console.mouseEnabled(false);
|
||||
console.forceQuitAll;
|
||||
if not BSOD_ENABLE then exit;
|
||||
console.setdefaultattribute(console.combinecolors($FFFF, $F800));
|
||||
|
@ -12,41 +12,95 @@ implementation
|
||||
uses
|
||||
strings, tracer;
|
||||
|
||||
type
|
||||
TMode = (tmHex, tmChar);
|
||||
|
||||
var
|
||||
Handle : HWND = 0;
|
||||
MEM_LOC : uint32;
|
||||
NEW_LOC : Boolean;
|
||||
Colors : uint32;
|
||||
Changed : uint32;
|
||||
Data : Array[0..176] of byte;
|
||||
Mode : TMode;
|
||||
|
||||
procedure mvprintmemory(source : uint32; length : uint32; col : uint32; delim : PChar; offset_row : boolean);
|
||||
procedure printmemoryaschar(source : uint32; length : uint32; col : uint32; delim : PChar; offset_row : boolean);
|
||||
var
|
||||
buf : puint8;
|
||||
i : uint32;
|
||||
|
||||
begin
|
||||
begin
|
||||
tracer.push_trace('memview.printmemory');
|
||||
buf:= puint8(source);
|
||||
console.writestringlnWND(' ', Handle);
|
||||
console.writestringlnWND(' ', Handle);
|
||||
if NEW_LOC then begin
|
||||
NEW_LOC:= false;
|
||||
for i:=0 to length-1 do begin
|
||||
Data[i]:= buf[i];
|
||||
end;
|
||||
end;
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
for i:=0 to length-1 do begin
|
||||
if offset_row and (i = 0) then begin
|
||||
console.writestringWND(' ', Handle);
|
||||
console.writehexWND(source + (i), Handle);
|
||||
console.writestringWND(': ', Handle);
|
||||
console.writestringExWND(' ', Colors, Handle);
|
||||
console.writehexExWND(source + (i), Colors, Handle);
|
||||
console.writestringExWND(': ', Colors, Handle);
|
||||
end;
|
||||
console.writehexpairWND(buf[i], Handle);
|
||||
if buf[i] = Data[i] then console.writecharExWND(char(buf[i]), Colors, Handle) else console.writecharExWND(char(buf[i]), Changed, Handle);
|
||||
console.writecharExWND(' ', Colors, Handle);
|
||||
if i<>length-1 then begin
|
||||
if ((i+1) MOD col) = 0 then begin
|
||||
console.writestringlnWND(' ', Handle);
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
if offset_row then begin
|
||||
console.writestringWND(' ', Handle);
|
||||
console.writehexWND(source + (i + 1), Handle);
|
||||
console.writestringWND(': ', Handle);
|
||||
console.writestringExWND(' ', Colors, Handle);
|
||||
console.writehexExWND(source + (i + 1), Colors, Handle);
|
||||
console.writestringExWND(': ', Colors, Handle);
|
||||
end;
|
||||
end else begin
|
||||
console.writestringWND(delim, Handle);
|
||||
console.writestringExWND(delim, Colors, Handle);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
console.writestringlnWND(' ', Handle);
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
end;
|
||||
|
||||
procedure printmemoryashex(source : uint32; length : uint32; col : uint32; delim : PChar; offset_row : boolean);
|
||||
var
|
||||
buf : puint8;
|
||||
i : uint32;
|
||||
|
||||
begin
|
||||
tracer.push_trace('memview.printmemory');
|
||||
buf:= puint8(source);
|
||||
if NEW_LOC then begin
|
||||
NEW_LOC:= false;
|
||||
for i:=0 to length-1 do begin
|
||||
Data[i]:= buf[i];
|
||||
end;
|
||||
end;
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
for i:=0 to length-1 do begin
|
||||
if offset_row and (i = 0) then begin
|
||||
console.writestringExWND(' ', Colors, Handle);
|
||||
console.writehexExWND(source + (i), Colors, Handle);
|
||||
console.writestringExWND(': ', Colors, Handle);
|
||||
end;
|
||||
if buf[i] = Data[i] then console.writehexpairExWND(buf[i], Colors, Handle) else console.writehexpairExWND(buf[i], Changed, Handle);
|
||||
if i<>length-1 then begin
|
||||
if ((i+1) MOD col) = 0 then begin
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
if offset_row then begin
|
||||
console.writestringExWND(' ', Colors, Handle);
|
||||
console.writehexExWND(source + (i + 1), Colors, Handle);
|
||||
console.writestringExWND(': ', Colors, Handle);
|
||||
end;
|
||||
end else begin
|
||||
console.writestringExWND(delim, Colors, Handle);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
console.writestringlnExWND(' ', Colors, Handle);
|
||||
end;
|
||||
|
||||
procedure OnClose();
|
||||
@ -58,8 +112,12 @@ procedure Draw();
|
||||
begin
|
||||
tracer.push_trace('memview.draw');
|
||||
if Handle <> 0 then begin
|
||||
clearWND(Handle);
|
||||
mvprintmemory(MEM_LOC, 176, 16, ' ', true);
|
||||
clearWNDEx(Handle, Colors);
|
||||
case mode of
|
||||
tmHex:printmemoryashex(MEM_LOC, 176, 16, ' ', true);
|
||||
tmChar:printmemoryaschar(MEM_LOC, 176, 16, ' ', true);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -67,9 +125,17 @@ procedure OnKeyPressed(info : TKeyInfo);
|
||||
begin
|
||||
if info.key_code = 16 then begin
|
||||
dec(MEM_LOC, 16);
|
||||
NEW_LOC:= true;
|
||||
end;
|
||||
if info.key_code = 18 then begin
|
||||
inc(MEM_LOC, 16);
|
||||
NEW_LOC:= true;
|
||||
end;
|
||||
if info.key_code = uint8('c') then begin
|
||||
Mode:= tmChar;
|
||||
end;
|
||||
if info.key_code = uint8('h') then begin
|
||||
Mode:= tmHex;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -100,6 +166,7 @@ begin
|
||||
end;
|
||||
end else begin
|
||||
MEM_LOC:= stringToInt(loc);
|
||||
NEW_LOC:= true;
|
||||
if Handle = 0 then begin
|
||||
Handle:= newWindow(20, 40, 63, 14, 'MEMVIEW');
|
||||
registerEventHandler(Handle, EVENT_DRAW, void(@Draw));
|
||||
@ -118,6 +185,9 @@ procedure init();
|
||||
begin
|
||||
tracer.push_trace('memview.init');
|
||||
terminal.registerCommand('MEMVIEW', @Run, 'View a location in memory [MEMVIEW <Location>]');
|
||||
Colors:= combineColors($0000, $FFFF);
|
||||
Changed:= combineColors($F800, $FFFF);
|
||||
Mode:= tmHex;
|
||||
end;
|
||||
|
||||
end.
|
@ -92,7 +92,7 @@ procedure init();
|
||||
begin
|
||||
Takbar_Colors:= console.combinecolors($0000, $FFFF);
|
||||
Explore_Colors:= console.combinecolors($01C3, $07EE);
|
||||
Desktop_Colors:= console.combinecolors($01C3, $A55F);
|
||||
Desktop_Colors:= console.combinecolors($01C3, $34DB);
|
||||
|
||||
DesktopHandle:= Console.newWindow(0, 0, 159, 63, 'DESKTOP');
|
||||
TaskBarHandle:= Console.newWindow(0, 63, 159, 1, 'SHELL');
|
||||
|
@ -428,6 +428,11 @@ begin
|
||||
resetSystem;
|
||||
end;
|
||||
|
||||
procedure teapot(Params : PParamList);
|
||||
begin
|
||||
console.writestringlnWND('Teapot?', getTerminalHWND);
|
||||
end;
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
console.writestringln('TERMINAL: INIT BEGIN.');
|
||||
@ -440,6 +445,7 @@ begin
|
||||
registerCommand('TIME', @printTime, 'Print the current time.');
|
||||
registerCommandEx('SERIAL', @SendSerial, 'Send ''helloworld'' through COM1.', true);
|
||||
registerCommand('REBOOT', @Reboot, 'Reboot the system.');
|
||||
registerCommandEx('LOLWUT', @teapot, '?', true);
|
||||
console.writestringln('TERMINAL: INIT END.');
|
||||
end;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user