#define DEFAULT_COLOUR (VT_COL_BLACK|(0xAAA<<16))
#define VT_FLAG_HIDECSR 0x01
+#define VT_FLAG_HASFB 0x10 //!< Set if the VTerm has requested the Framebuffer
enum eVT_InModes {
VT_INMODE_TEXT8, // UTF-8 Text Mode (VT100 Emulation)
tVFS_Node Node;
} tVTerm;
+// === IMPORTS ===
+extern void Debug_SetKTerminal(char *File);
+
// === PROTOTYPES ===
int VT_Install(char **Arguments);
char *VT_ReadDir(tVFS_Node *Node, int Pos);
// Add to DevFS
DevFS_AddDevice( &gVT_DrvInfo );
+ // Set kernel output to VT0
+ Debug_SetKTerminal("/Devices/VTerm/0");
+
return 0;
}
void VT_InitOutput()
{
giVT_OutputDevHandle = VFS_Open(gsVT_OutputDevice, VFS_OPENFLAG_WRITE);
- LOG("giVT_OutputDevHandle = %x\n", giVT_OutputDevHandle);
VT_SetTerminal( 0 );
}
void VT_InitInput()
{
giVT_InputDevHandle = VFS_Open(gsVT_InputDevice, VFS_OPENFLAG_READ);
- LOG("giVT_InputDevHandle = %x\n", giVT_InputDevHandle);
if(giVT_InputDevHandle == -1) return ;
VFS_IOCtl(giVT_InputDevHandle, KB_IOCTL_SETCALLBACK, VT_KBCallBack);
}
case KEY_F10: VT_SetTerminal(9); return;
case KEY_F11: VT_SetTerminal(10); return;
case KEY_F12: VT_SetTerminal(11); return;
+ case KEY_PGUP:
+ return;
+ case KEY_PGDOWN:
+ return;
}
}
Uint8 *VT_Font_GetChar(Uint32 Codepoint);
// === GLOBALS ===
-int giVT_CharWidth = FONT_WIDTH;
+int giVT_CharWidth = FONT_WIDTH+1;
int giVT_CharHeight = FONT_HEIGHT;
// === CODE ===
Uint8 *font;
Uint32 *buf = Buffer;
int x, y;
+
font = VT_Font_GetChar(Codepoint);
for(y = 0; y < FONT_HEIGHT; y ++)
{
for(x = 0; x < FONT_WIDTH; x ++)
{
- if(*font & (1 << (FONT_WIDTH-x)))
+ if(*font & (1 << (FONT_WIDTH-x-1)))
buf[x] = FGC;
else
buf[x] = BGC;