* drv/vterm.c
* - Virtual Terminal - Initialisation and VFS Interface
*/
-#define DEBUG 1
+#define DEBUG 0
#include "vterm.h"
#include <fs_devfs.h>
#include <modules.h>
#define NUM_VTS 8
//#define DEFAULT_OUTPUT "BochsGA"
#define DEFAULT_OUTPUT "Vesa"
-#define FALLBACK_OUTPUT "x86_VGAText"
#define DEFAULT_INPUT "Keyboard"
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
// === PROTOTYPES ===
int VT_Install(char **Arguments);
int VT_Root_IOCtl(tVFS_Node *Node, int Id, void *Data);
-void VT_int_PutFBData(tVTerm *Term, size_t Offset, size_t Length, const void *Data);
void VT_PTYOutput(void *Handle, size_t Length, const void *Data);
int VT_PTYResize(void *Handle, const struct ptydims *Dims);
int VT_PTYModeset(void *Handle, const struct ptymode *Mode);
// Apply Defaults
if(!gsVT_OutputDevice) gsVT_OutputDevice = (char*)DEFAULT_OUTPUT;
else if( Module_EnsureLoaded( gsVT_OutputDevice ) ) gsVT_OutputDevice = (char*)DEFAULT_OUTPUT;
- if( Module_EnsureLoaded( gsVT_OutputDevice ) ) gsVT_OutputDevice = (char*)FALLBACK_OUTPUT;
+ //if( Module_EnsureLoaded( gsVT_OutputDevice ) ) gsVT_OutputDevice = (char*)FALLBACK_OUTPUT;
if( Module_EnsureLoaded( gsVT_OutputDevice ) ) {
- Log_Error("VTerm", "Fallback video '%s' is not avaliable, giving up", FALLBACK_OUTPUT);
+ Log_Error("VTerm", "Video device '%s' is not avaliable, giving up", gsVT_OutputDevice);
return MODULE_ERR_MISC;
}
VT_int_PutString(term, Data, Length);
break;
case PTYBUFFMT_FB:
- // TODO: How do offset?
+ // TODO: How can the offset be done cleanly? (Ask the PTY for its offset?)
+ Warning("TODO: Offsets for VT_PTYOutput FBData");
VT_int_PutFBData(term, 0, Length, Data);
break;
case PTYBUFFMT_2DCMD:
- // TODO: Impliment 2D commands
VT_int_Handle2DCmd(term, Length, Data);
break;
case PTYBUFFMT_3DCMD:
- // TODO: Impliment 3D commands
+ // TODO: Implement 3D commands
+ Warning("TODO: VTerm 3D commands");
break;
}
}