Index: branches/azimutz/Chazi/i386/libsaio/autoresolution.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/autoresolution.c (revision 602) +++ branches/azimutz/Chazi/i386/libsaio/autoresolution.c (revision 603) @@ -15,8 +15,10 @@ //#include "libsaio.h" //#include "autoresolution.h" - included on *_resolution.h -//#include "boot.h" -//#include "gui.h" +//------------ +#include "boot.h" +#include "gui.h" +#include "options.h" #include "nvidia_resolution.h" #include "ati_resolution.h" #include "gma_resolution.h" @@ -563,7 +565,7 @@ { bcopy(table->backup, (uint8_t *)table->pointer, table->size); table = table->next; -// verbose("Table/s restored...\n"); + verbose("Restoring table/s for patch cancelation\n"); } relockVbios(map); } @@ -616,18 +618,18 @@ relockVbios(map); return; } -/* -void patchRes() + +void startAutoRes() { // UInt32 paramsAR[4]; paramsAR[3] = 0; - // Open the VBios and store VBios or Tables + // Open the Vbios and store Vbios or Tables map = openVbios(CT_UNKWN); - //Get Resolution from Graphics Mode key... + //Get resolution from Graphics Mode key... int count = getNumberArrayFromProperty(kGraphicsModeKey, paramsAR, 4); - + // ... or EDID. if (count < 3) { @@ -643,118 +645,145 @@ if ( paramsAR[2] == 555 ) paramsAR[2] = 16; if ( paramsAR[2] == 888 ) paramsAR[2] = 32; } - - // If using GUI, patch the video bios with the extracted resolution, - // before initGui. - - // perfom the actual VBIOS patching + + // perfom the actual Vbios patching if (paramsAR[0] != 0 && paramsAR[1] != 0) { patchVbios(map, paramsAR[0], paramsAR[1], paramsAR[2], 0, 0); } - - closeVbios(map); - //Azi: gAutoResolution was just set to false on closeVbios(). - gAutoResolution = true; - + + //Azi: passing resolution for TEXT MODE "verbose" boot. (check again later!) if (bootArgs->Video.v_display == VGA_TEXT_MODE) { gui.screen.width = paramsAR[0]; gui.screen.height = paramsAR[1]; } - + // If the patch is working properly, we're done. If not and it's just a matter // of wrong resolution, we can try reapply the patch; see "case kF2Key:", options.c. - - // The patch works properly but we're not using GUI; keep Vbios open and patch/close - // on drawBootGraphics(). - // ??????Don't forget we´re maybe using this to get correct resolution after login, - // despite having qe/ci or not...!!!! } -void reloadRes() +void reloadAutoRes() { -// UInt32 paramsAR[4]; - paramsAR[3] = 0; + extern int key; + extern int nextRow; + extern BVRef menuBVR; + extern bool showPrompt; - map = openVbios(CT_UNKWN); - // Has the target Resolution Changed ? - int count = getNumberArrayFromProperty(kGraphicsModeKey, paramsAR, 4); + extern bool showBootBanner; + extern MenuItem * menuItems; + extern int selectIndex; - if ( count < 3 ) // why this? we are implicitly trying to change the resolution - // at boot prompt, using Graphics Mode flag... + extern void showMenu( const MenuItem * items, int count, int selection, int row, int height ); + extern void showBootPrompt(int row, bool visible); + extern void clearBootArgs(void); + extern void changeCursor( int col, int row, int type, CursorState * cs ); + + if ((gAutoResolution == true) && useGUI && map ) { - getResolution(paramsAR); - } - else - { - if ( paramsAR[2] == 256 ) paramsAR[2] = 8; - if ( paramsAR[2] == 555 ) paramsAR[2] = 16; - if ( paramsAR[2] == 888 ) paramsAR[2] = 32; - } + // get the new Graphics Mode key + processBootOptions(); //Azi: use processBootArgument instead? - // user changed resolution... - if ((paramsAR[0] != 0) && (paramsAR[1] != 0) && - (paramsAR[0] != map->currentX) && (paramsAR[1] != map->currentY)) - { - //Azi: same shit as "case kTabKey:" - check - // Go back to TEXT mode while we change the mode - if (bootArgs->Video.v_display == GRAPHICS_MODE) +// UInt32 paramsAR[4]; + paramsAR[3] = 0; + + getNumberArrayFromProperty(kGraphicsModeKey, paramsAR, 4); + + // user changed resolution... + if ((paramsAR[0] != 0) && (paramsAR[1] != 0) && + (paramsAR[0] != map->currentX) && (paramsAR[1] != map->currentY)) { - CursorState cursorState; + //Azi: identical to "case kTabKey:" (check later) + if (bootArgs->Video.v_display == GRAPHICS_MODE) + { + CursorState cursorState; + + // Go back to TEXT MODE while we change the mode + setVideoMode(VGA_TEXT_MODE, 0); - setVideoMode(VGA_TEXT_MODE, 0); + setCursorPosition(0, 0, 0); + clearScreenRows(0, kScreenLastRow); + changeCursor( 0, 0, kCursorTypeHidden, &cursorState ); - setCursorPosition(0, 0, 0); - clearScreenRows(0, kScreenLastRow); - changeCursor( 0, 0, kCursorTypeHidden, &cursorState ); + // Reapply patch + patchVbios(map, paramsAR[0], paramsAR[1], paramsAR[2], 0, 0); - // Reapply patch - patchVbios(map, paramsAR[0], paramsAR[1], paramsAR[2], 0, 0); + if (useGUI && (gui.initialised == true)) + initGUI(); + // Make sure all values are set + if (bootArgs->Video.v_display != GRAPHICS_MODE) + bootArgs->Video.v_display = GRAPHICS_MODE; - if (useGUI && (gui.initialised == true)) - initGUI(); - // Make sure all values are set - if (bootArgs->Video.v_display != GRAPHICS_MODE) - bootArgs->Video.v_display = GRAPHICS_MODE; + if (!useGUI) + useGUI = true; - if (!useGUI) - useGUI = true; + // redraw the background buffer + drawBackground(); + gui.devicelist.draw = true; + gui.redraw = true; + + if (showBootBanner) + { + // Display banner and show hardware info. + gprintf(&gui.screen, bootBanner + 1, (bootInfo->convmem + bootInfo->extmem) / 1024); + } - // redraw the background buffer - drawBackground(); - gui.devicelist.draw = true; - gui.redraw = true; - - if (showBootBanner) - { - // Display banner and show hardware info. - gprintf(&gui.screen, bootBanner + 1, (bootInfo->convmem + bootInfo->extmem) / 1024); - } + // redraw background + memcpy(gui.backbuffer->pixels, gui.screen.pixmap->pixels, + gui.backbuffer->width * gui.backbuffer->height * 4); - // redraw background - memcpy(gui.backbuffer->pixels, gui.screen.pixmap->pixels, - gui.backbuffer->width * gui.backbuffer->height * 4); + nextRow = kMenuTopRow; + showPrompt = true; - nextRow = kMenuTopRow; - showPrompt = true; + if (gDeviceCount) + { + showMenu( menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems ); + nextRow += min( gDeviceCount, kMenuMaxItems ) + 3; + } - if (gDeviceCount) - { - showMenu( menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems ); - nextRow += min( gDeviceCount, kMenuMaxItems ) + 3; + // Show the boot prompt. + showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); + showBootPrompt( nextRow, showPrompt ); + + // this is used to avoid resetting the incorrect mode while quiting the boot menu +// map->hasSwitched = true; (check again later!) } + } + + clearBootArgs(); + key = 0; + } + else // if gAutoResolution == false... + { + // ... do "nothing". (Reviewing...) + clearBootArgs(); + key = 0; + } +} - // Show the boot prompt. - showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); - showBootPrompt( nextRow, showPrompt ); +void endAutoRes() +{ + // Restore and close Vbios for patch cancelation. + if ((gAutoResolution == false) && map) + { + restoreVbios(map); + closeVbios(map); + + //Azi: closing Vbios here without restoring it as above, causes an allocation error, + // if the user tries to boot, after a e.g."Can't find bla_kernel" msg. + // Doing it on execKernel() instead. + } - // this is used to avoid resetting the incorrect mode while quiting the boot menu -// map->hasSwitched = true; - } + //Azi: while testing i didn't got any problems booting without closing Vbios... + // closing it just in case. (check again later!) + if ((gAutoResolution == true) && map) + { + closeVbios(map); + + // gAutoResolution was just set to false on closeVbios(). + // We need to be "true" for drawBootGraphics(). + gAutoResolution = true; } - - closeVbios(map); - //Azi: gAutoResolution was just set to false on closeVbios. - gAutoResolution = true; -}*/ +} + + Index: branches/azimutz/Chazi/i386/libsaio/autoresolution.h =================================================================== --- branches/azimutz/Chazi/i386/libsaio/autoresolution.h (revision 602) +++ branches/azimutz/Chazi/i386/libsaio/autoresolution.h (revision 603) @@ -1,4 +1,3 @@ - /* Copied from 915 resolution created by steve tomljenovic * * This code is based on the techniques used in : @@ -13,6 +12,7 @@ * * This source code is into the public domain. */ + #ifndef __915_RESOLUTION_H #define __915_RESOLUTION_H @@ -20,11 +20,10 @@ #include "saio_internal.h" #include "edid.h" -//#define AUTORES_DEBUG 1 // enable AutoResolution debug - review! #if DEBUG #ifndef AUTORES_DEBUG -#define AUTORES_DEBUG +#define AUTORES_DEBUG //Azi: review #endif #endif @@ -42,10 +41,9 @@ #define VBIOS_START 0xc0000 #define VBIOS_SIZE 0x10000 -//#define false 0 (Reviewing...) +//#define false 0 //Azi: (Reviewing...) //#define true 1 - bool gAutoResolution; UInt32 paramsAR[4]; //Azi: testing autoresolution @@ -56,7 +54,6 @@ uint8_t height; } sAspect; - typedef enum { CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, @@ -66,7 +63,6 @@ CT_GM45, CT_G41, CT_G31, CT_G45, CT_500 } chipsetType; - typedef enum { BT_UNKWN, BT_1, BT_2, BT_3, BT_ATI_1, BT_ATI_2, BT_NVDA @@ -98,9 +94,7 @@ struct sModeTable_ *prev; struct sModeTable_ *next; } sModeTable; - - typedef struct { uint32_t chipsetId; @@ -147,7 +141,4 @@ void patchVbios(vBiosMap* map, uint32_t x, uint32_t y, uint32_t bp, uint32_t hTotal, uint32_t vTotal); -//void patchRes(); -//void reloadRes(); - #endif Index: branches/azimutz/Chazi/i386/boot2/options.h =================================================================== --- branches/azimutz/Chazi/i386/boot2/options.h (revision 0) +++ branches/azimutz/Chazi/i386/boot2/options.h (revision 603) @@ -0,0 +1,103 @@ +/* + * Copyright (c) 1999-2004 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Portions Copyright (c) 1999-2004 Apple Computer, Inc. All Rights + * Reserved. This file contains Original Code and/or Modifications of + * Original Code as defined in and that are subject to the Apple Public + * Source License Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. Please obtain a copy of the + * License at http://www.apple.com/publicsource and read it before using + * this file. + * + * The Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __BOOT2_OPTIONS_H +#define __BOOT2_OPTIONS_H + +//#include "boot.h" +//#include "bootstruct.h" +//#include "graphics.h" + + +extern int gDeviceCount; + +typedef struct { + int x; + int y; + int type; +} CursorState; + +enum { + kMenuTopRow = 5, + kMenuMaxItems = 10, + kScreenLastRow = 24 +}; + +/* +extern const MenuItem * gMenuItems; + + +void clearBootArgs(void); +void addBootArg(const char * argStr); +void changeCursor( int col, int row, int type, CursorState * cs ); +void moveCursor( int col, int row ); +void restoreCursor( const CursorState * cs ); +void printMemoryInfo(void); +void lspci(void); +void printMenuItem( const MenuItem * item, int highlight ); +bool flushKeyboardBuffer(void); + + +extern bool shouldboot; + +#ifdef UNUSED +extern int multiboot_timeout; +extern int multiboot_timeout_set; +#endif + +extern BVRef bvChain; +//extern int menucount; + + + + +//========================================================================== + +extern char gBootArgs[BOOT_STRING_LEN]; +extern char * gBootArgsPtr; +extern char * gBootArgsEnd; +extern char booterCommand[BOOT_STRING_LEN]; +extern char booterParam[BOOT_STRING_LEN]; + + +//========================================================================== + +extern int gMenuItemCount; +extern int gMenuRow; +extern int gMenuHeight; +extern int gMenuTop; +extern int gMenuBottom; +extern int gMenuSelection; + +extern int gMenuStart; +extern int gMenuEnd; + +extern unsigned char chainbootdev; +extern unsigned char chainbootflag; + + +// Maximum config table value size +#define VALUE_SIZE 2048 +*/ +#endif /* __BOOT2_OPTIONS_H */ \ No newline at end of file Index: branches/azimutz/Chazi/i386/boot2/boot.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/boot.c (revision 602) +++ branches/azimutz/Chazi/i386/boot2/boot.c (revision 603) @@ -76,7 +76,7 @@ int gDeviceCount = 0; BVRef bvr; -BVRef menuBVR; +//BVRef menuBVR; - doesn't seem used here BVRef bvChain; bool useGUI; @@ -128,6 +128,8 @@ //========================================================================== // execKernel - Load the kernel image (mach-o) and jump to its entry point. +extern void startAutoRes(); +extern void endAutoRes(); static int ExecKernel(void *binary) { @@ -189,18 +191,12 @@ // Notify modules that the kernel is about to be started execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL); - - if ((gAutoResolution == true) && map) - { - closeVbios(map); - //Azi: as a side note, while testing i didn't got any problems booting without - // closing Vbios... closing it just in case. (check again later!) - - // gAutoResolution was just set to false on closeVbios(). - // We need to be "true" for drawBootGraphics(). - gAutoResolution = true; - } + //AutoResolution - Check if user disabled AutoResolution at the boot prompt. + getBoolForKey(kAutoResolutionKey, &gAutoResolution, &bootInfo->bootConfig); + // Cancel and/or finalize the patch. + endAutoRes(); + // If we were in text mode, switch to graphics mode. // This will draw the boot graphics unless we are in // verbose mode. @@ -209,7 +205,7 @@ setVideoMode( GRAPHICS_MODE, 0 ); else drawBootGraphics(); - + setupBooterLog(); finalizeBootStruct(); @@ -376,47 +372,7 @@ // Patch the Video Bios with the extracted resolution, before initGui. if (gAutoResolution == true) { -// patchRes(); -// UInt32 paramsAR[4]; - paramsAR[3] = 0; - - // Open the Vbios and store VBios or Tables - map = openVbios(CT_UNKWN); - - //Get Resolution from Graphics Mode key... - int count = getNumberArrayFromProperty(kGraphicsModeKey, paramsAR, 4); - - // ... or EDID. - if (count < 3) - { - getResolution(paramsAR); - // check the DEBUG stuff... also on TEXT MODE (this is not printing). - PRINT("Resolution: %dx%d (EDID)\n",paramsAR[0], paramsAR[1]); - } - else - { - PRINT("Resolution: %dx%d (Graphics Mode key)\n",paramsAR[0], paramsAR[1]); - - if ( paramsAR[2] == 256 ) paramsAR[2] = 8; - if ( paramsAR[2] == 555 ) paramsAR[2] = 16; - if ( paramsAR[2] == 888 ) paramsAR[2] = 32; - } - - // perfom the actual VBIOS patching - if (paramsAR[0] != 0 && paramsAR[1] != 0) - { - patchVbios(map, paramsAR[0], paramsAR[1], paramsAR[2], 0, 0); - } - - //Azi: passing resolution for TEXT MODE "verbose" boot. (check again later!) - if (bootArgs->Video.v_display == VGA_TEXT_MODE) - { - gui.screen.width = paramsAR[0]; - gui.screen.height = paramsAR[1]; - } - - // If the patch is working properly, we're done. If not and it's just a matter - // of wrong resolution, we can try reapply the patch; see "case kF2Key:", options.c. + startAutoRes(); } if (useGUI && initGUI()) @@ -465,22 +421,11 @@ } status = processBootOptions(); - - //AutoResolution - cancel if Graphics Mode was incorrect or EDID Info was insane. - // Check if user disabled AutoResolution at the boot prompt. - getBoolForKey(kAutoResolutionKey, &gAutoResolution, &bootInfo->bootConfig); - - // Restore and close Vbios for patch cancelation. - if ((gAutoResolution == false) && map) - { - restoreVbios(map); - closeVbios(map); - - //Azi: closing Vbios here without restoring it as above, causes an allocation error, - // if the user tries to boot, after a e.g."Can't find bla_kernel" msg. - // Doing it on execKernel() instead. - } + //Azi: AutoResolution - closing Vbios here without restoring, causes an allocation error, + // if the user tries to boot, after a e.g."Can't find bla_kernel" msg. + // Doing it on execKernel() instead. + // Status == 1 means to chainboot if ( status == 1 ) break; Index: branches/azimutz/Chazi/i386/boot2/options.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/options.c (revision 602) +++ branches/azimutz/Chazi/i386/boot2/options.c (revision 603) @@ -28,6 +28,7 @@ #include "gui.h" #include "embedded.h" #include "pci.h" +#include "options.h" bool showBootBanner = true; //Azi:debuginfo static bool shouldboot = false; @@ -38,28 +39,17 @@ extern BVRef bvChain; //extern int menucount; -extern int gDeviceCount; +//extern int gDeviceCount; //Azi: header char gMacOSVersion[8]; //Azi: moved from boot.c static bool getOSVersion(char *str); // || int selectIndex = 0; MenuItem * menuItems = NULL; -enum { - kMenuTopRow = 5, - kMenuMaxItems = 10, - kScreenLastRow = 24 -}; - //========================================================================== -typedef struct { - int x; - int y; - int type; -} CursorState; - -static void changeCursor( int col, int row, int type, CursorState * cs ) +//static +void changeCursor( int col, int row, int type, CursorState * cs ) { if (cs) getCursorPositionAndType( &cs->x, &cs->y, &cs->type ); setCursorType( type ); @@ -203,7 +193,8 @@ //========================================================================== -static void showBootPrompt(int row, bool visible) +//static +void showBootPrompt(int row, bool visible) { extern char bootPrompt[]; extern char bootRescanPrompt[]; @@ -306,7 +297,8 @@ //========================================================================== -static void showMenu( const MenuItem * items, int count, +//static +void showMenu( const MenuItem * items, int count, int selection, int row, int height ) { int i; @@ -678,17 +670,23 @@ } //========================================================================== +int key; +int nextRow; +BVRef menuBVR; +bool showPrompt; int getBootOptions(bool firstRun) { int i; - int key; - int nextRow; +// int key; +// int nextRow; int timeout; int bvCount; BVRef bvr; - BVRef menuBVR; - bool showPrompt, newShowPrompt, isCDROM; +// BVRef menuBVR; +// bool showPrompt; + bool newShowPrompt, isCDROM; + extern void reloadAutoRes(); //Azi: autoresolution // Initialize default menu selection entry. gBootVolume = menuBVR = selectBootVolume(bvChain); @@ -1011,91 +1009,10 @@ clearBootArgs(); break; - // AutoResolution - Reapply the patch if Graphics Mode was incorrect or EDID Info was insane. - //Azi: + // AutoResolution - Reapply the patch if Graphics Mode was incorrect + // or EDID Info was insane. case kF2Key: - - if ((gAutoResolution == true) && map) - { - // get the new Graphics Mode key - processBootOptions(); //Azi: use processBootArgument instead? - -// reloadRes(); -// UInt32 paramsAR[4]; - paramsAR[3] = 0; - - getNumberArrayFromProperty(kGraphicsModeKey, paramsAR, 4); - - // user changed resolution... - if ((paramsAR[0] != 0) && (paramsAR[1] != 0) && - (paramsAR[0] != map->currentX) && (paramsAR[1] != map->currentY)) - { - //Azi: same stuff as "case kTabKey:" (Reviewing...) - // Go back to TEXT mode while we change the mode - if (bootArgs->Video.v_display == GRAPHICS_MODE) - { - CursorState cursorState; - - setVideoMode(VGA_TEXT_MODE, 0); - - setCursorPosition(0, 0, 0); - clearScreenRows(0, kScreenLastRow); - changeCursor( 0, 0, kCursorTypeHidden, &cursorState ); - - // Reapply patch - patchVbios(map, paramsAR[0], paramsAR[1], paramsAR[2], 0, 0); - - if (useGUI && (gui.initialised == true)) - initGUI(); - // Make sure all values are set - if (bootArgs->Video.v_display != GRAPHICS_MODE) - bootArgs->Video.v_display = GRAPHICS_MODE; - - if (!useGUI) - useGUI = true; - - // redraw the background buffer - drawBackground(); - gui.devicelist.draw = true; - gui.redraw = true; - - if (showBootBanner) - { - // Display banner and show hardware info. - gprintf(&gui.screen, bootBanner + 1, (bootInfo->convmem + bootInfo->extmem) / 1024); - } - - // redraw background - memcpy(gui.backbuffer->pixels, gui.screen.pixmap->pixels, - gui.backbuffer->width * gui.backbuffer->height * 4); - - nextRow = kMenuTopRow; - showPrompt = true; - - if (gDeviceCount) - { - showMenu( menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems ); - nextRow += min( gDeviceCount, kMenuMaxItems ) + 3; - } - - // Show the boot prompt. - showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); - showBootPrompt( nextRow, showPrompt ); - - // this is used to avoid resetting the incorrect mode while quiting the boot menu -// map->hasSwitched = true; (check again later!) - } - } - - clearBootArgs(); - key = 0; - } - else // if gAutoResolution == false... - { - // ... do "nothing". - clearBootArgs(); - key = 0; - } + reloadAutoRes(); break; case kF5Key: @@ -1120,8 +1037,10 @@ // New behavior: // Switch between text & graphic interfaces // Only Permitted if started in graphics interface - if (useGUI) { - if (bootArgs->Video.v_display == GRAPHICS_MODE) { + if (useGUI) + { + if (bootArgs->Video.v_display == GRAPHICS_MODE) + { setVideoMode(VGA_TEXT_MODE, 0); setCursorPosition(0, 0, 0); @@ -1137,7 +1056,8 @@ nextRow = kMenuTopRow; showPrompt = true; - if (gDeviceCount) { + if (gDeviceCount) + { printf("Use \30\31 keys to select the startup volume."); showMenu(menuItems, gDeviceCount, selectIndex, kMenuTopRow + 2, kMenuMaxItems); nextRow += min(gDeviceCount, kMenuMaxItems) + 3; @@ -1146,7 +1066,14 @@ showPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot); showBootPrompt(nextRow, showPrompt); //changeCursor( 0, kMenuTopRow, kCursorTypeUnderline, 0 ); - } else { + + // need to disable F2 here but can't do useGUI = false... + // not a big deal but since i disabled it when in TEXT MODE, + // were it makes no sense and it just hangs the prompt.. not fatal, though... + // back later... + } + else + { gui.redraw = true; setVideoMode(GRAPHICS_MODE, 0); updateVRAM();