int BGA_int_ModeInfo(tVideo_IOCtl_Mode *info);\r
int BGA_int_MapFB(void *Dest);\r
// Filesystem\r
-Uint64 BGA_Read(tVFS_Node *Node, Uint64 off, Uint64 len, void *buffer);\r
-Uint64 BGA_Write(tVFS_Node *Node, Uint64 off, Uint64 len, const void *buffer);\r
+size_t BGA_Read(tVFS_Node *Node, off_t off, size_t len, void *buffer);\r
+size_t BGA_Write(tVFS_Node *Node, off_t off, size_t len, const void *buffer);\r
int BGA_IOCtl(tVFS_Node *Node, int ID, void *Data);\r
\r
// === GLOBALS ===\r
// Check BGA Version\r
version = BGA_int_ReadRegister(VBE_DISPI_INDEX_ID);\r
LOG("version = 0x%x", version);\r
+ if( version == 0xFFFF ) {\r
+ // Floating bus, nothing there\r
+ return MODULE_ERR_NOTNEEDED;\r
+ }\r
\r
// NOTE: This driver was written for BGA versions >= 0xBOC2\r
// NOTE: However, Qemu is braindead and doesn't return the actual version\r
}\r
\r
/**\r
- * \fn Uint64 BGA_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer)\r
* \brief Read from the framebuffer\r
*/\r
-Uint64 BGA_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer)\r
+size_t BGA_Read(tVFS_Node *node, off_t off, size_t len, void *buffer)\r
{\r
// Check Mode\r
if(giBGA_CurrentMode == -1) return -1;\r
/**\r
* \brief Write to the framebuffer\r
*/\r
-Uint64 BGA_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer)\r
+size_t BGA_Write(tVFS_Node *Node, off_t Offset, size_t Length, const void *Buffer)\r
{\r
if( giBGA_CurrentMode == -1 ) BGA_int_UpdateMode(0);\r
return DrvUtil_Video_WriteLFB(&gBGA_DrvUtil_BufInfo, Offset, Length, Buffer);\r