Jump to content

  • Log In with Google      Sign In   
  • Create Account

BASICFreak

Member Since 07 May 2006
Offline Last Active Jan 25 2016 06:01 PM

#5250184 VBE 2.0+ Set Display Start for Page Flipping

Posted by on 01 September 2015 - 05:29 PM

Well, I'll try it out soon, I'm stuck somewhere else for now, but IIRC I have tried memory offsets with the same result.

 

But again I'll test it out in a few days to a week once IPC is fully functioning.

 

Thanks for your replies, I'll post updates.

 

 

P.S. I have also been told that the issue may be in Bochs' VBE, so I'll try other "platforms" - lack of better term - including Physical HW




#5250175 VBE 2.0+ Set Display Start for Page Flipping

Posted by on 01 September 2015 - 03:43 PM

Have you tried doing a GetDisplayStart first, then adding (or subtracting) your screen height to the returned DX, and then passing back the CX and DX values to SetDisplayStart?

 

Also, take a look at the "Protected Mode considerations" chapter of the VBE dcoument. It seems to say something specific about function 07h. In PM, the CX and DX values are actually a memory address, not the scan line&pixel position as in RM.

 

I miss VESA. smile.png

GetDisplayStart returns CX = DX = 0

Also only the sub functions of Function 7 that were added in VBE 3.0 use memory locations, the older ones still use legacy values (If I understand the Spec sheet correctly)

I don't know why I cannot copy out the PDF so I'll tell you its page labled 51 (59 in the PDF), second full paragraph - http://www.petesqbsite.com/sections/tutorials/tuts/vbe3.pdf




#5248119 VBE 2.0+ Set Display Start for Page Flipping

Posted by on 21 August 2015 - 02:06 PM

I recall there being bitplanes in some modes, not a nice contiguous buffer, and the pattern looks like that. Sometimes you needed to write to some io ports to choose one. The fun part was activating all planes and clearing memory much faster. You might want to find more information on how the video memory corresponds to pixels in that mode?

Or if you have too much time to waste: try different patterns, like setting 4x the amount of memory to 1 color, then drawing exactly one line, then try drawing every fourth byte of the line and moving the pattern 1 byte or line or 1k bytes, or try changing single pixels at many positions, to find out where it ends up on screen?

Though you may be better off getting text mode to run first or one of the standard VGA modes like 640x480x16colors or 320x200x256colors, not one of the more complicated vendor-dependent SVGA modes.

I have no problem with LFB (in fact in all my systems it is purely flat) The problem comes only when trying to page flip, I can draw all day onto the screen perfectly.

 

In fact I just enabled the SSE and started moving 128 Bytes of memory at a time instead of 4, which made my double buffer fast enough to work (even at 1024x768x32bpp), though I would still like a buffer in video ram to switch to.




#4860159 First complex BATCH file

Posted by on 10 September 2011 - 06:10 PM

This was my first time to use any commands in a BATCH file, I never thought it could get so confusing.

It took me 13 whole hours of trial and error and research.
I couldn't find a tool to do exactly what I wanted and figure it may be of use to others.

The script has no output while running, and can take a very long time to process depending on your registry size

FILE NAME = REGKEYEXTRACTOR.CMD


@ECHO OFF
setlocal enableextensions enabledelayedexpansion
COLOR 1F
CLS
SET ARGS=0
SET OPTS=0
SET OPTIONS=
FOR %%x IN (%*) DO SET /A ARGS+=1
IF %ARGS% LSS 1 GOTO ERROR
IF "%1" == "" GOTO ERROR
IF "%1" == "/?" GOTO ERROR
SET RtKy=%1
SHIFT
IF NOT X%1X==XX (
	SET OPTIONS=%1
	SET OPTION_ALL=%1
	SET /A OPTS+=1
)
IF NOT X%OPTIONS%X==XX GOTO LOOP
:LOOP
SHIFT
IF X%1X==XX GOTO ENDLOOP
SET OPTIONS=%OPTIONS% %1
SET OPTION_ALL=%OPTION_ALL%~%1
SET /A OPTS+=1
GOTO LOOP
:ENDLOOP
IF %OPTS% GEQ 1 GOTO GETOPTIONS
GOTO :EOF

:GETOPTIONS
FOR /F "USEBACKQ TOKENS=1-%OPTS% DELIMS=~" %%A IN ('%OPTION_ALL%') DO (
IF %OPTS% GEQ 1 SET OPTION_1=%%A
IF %OPTS% GEQ 2 SET OPTION_2=%%B
IF %OPTS% GEQ 3 SET OPTION_3=%%C
IF %OPTS% GEQ 4 SET OPTION_4=%%D
IF %OPTS% GEQ 5 SET OPTION_5=%%E
IF %OPTS% GEQ 6 SET OPTION_6=%%F
IF %OPTS% GEQ 7 SET OPTION_7=%%G
IF %OPTS% GEQ 8 SET OPTION_8=%%H
IF %OPTS% GEQ 9 SET OPTION_9=%%I
IF %OPTS% GEQ 10 SET OPTION_10=%%J
IF %OPTS% GEQ 11 SET OPTION_11=%%K
IF %OPTS% GEQ 12 SET OPTION_12=%%L
IF %OPTS% GEQ 13 SET OPTION_13=%%M
IF %OPTS% GEQ 14 SET OPTION_14=%%N
IF %OPTS% GEQ 15 SET OPTION_15=%%O
IF %OPTS% GEQ 16 SET OPTION_16=%%P
IF %OPTS% GEQ 17 SET OPTION_17=%%Q
IF %OPTS% GEQ 18 SET OPTION_18=%%R
IF %OPTS% GEQ 19 SET OPTION_19=%%S
IF %OPTS% GEQ 20 SET OPTION_20=%%T
)
IF "%OPTION_1%"=="/I" (
	IF %OPTS% EQU 2 (
		IF NOT X%OPTION_2%X==XX (
			SET INFILE=%OPTION_2%
			GOTO INPUTTEXT
		) ELSE (
			GOTO ERROR
		)
	) ELSE (
		GOTO ERROR
	)
)ELSE IF "%OPTION_1%"=="/i" (
	IF %OPTS% EQU 2 (
		IF NOT X%OPTION_2%X==XX (
			SET INFILE=%OPTION_2%
			GOTO INPUTTEXT
		) ELSE (
			GOTO ERROR
		)
	) ELSE (
		GOTO ERROR
	)
) ELSE (
	GOTO QUERY
)
GOTO :EOF


:INPUTTEXT
FINDSTR /B /C:"HKEY" %INFILE% > TEMP.TXT
ECHO Windows Registry Editor Version 5.00 > %RtKy%-FINAL.REG
ECHO. >> %RtKy%-FINAL.REG
FOR /F "TOKENS=1* DELIMS=\" %%A IN (TEMP.TXT) DO (
REG EXPORT "%RtKy%\%%B" TMP.REG /Y
TYPE TMP.REG > TEMP.REG
DEL TMP.REG /Q
FOR /F "SKIP=2 TOKENS=*" %%a IN (TEMP.REG) DO @ECHO %%a >> %RtKy%-FINAL.REG
DEL TEMP.REG /Q
)
DEL TEMP.TXT
GOTO :EOF

:QUERY
REG QUERY %RtKY% %OPTIONS% > QUERYTEMP.TXT
SET INFILE=QUERYTEMP.TXT
GOTO INPUTTEXT
GOTO :EOF

:ERROR
ECHO REGKEYEXTRACTOR.CMD
ECHO By Brian T. Hoover A.K.A. BASIC.Freak
ECHO.
ECHO USSAGE  REGKEYEXTRACTOR.CMD RootKey [OPTIONS]
ECHO EXAMPLE REGKEYEXTRACTOR.CMD HKLM /S /F "FOO bar" /Z
ECHO     	REGKEYEXTRACTOR.CMD HKLM /I hklm.TXT
ECHO.
ECHO RootKey - [ HKLM ^| HKCU ^| HKCR ^| HKU ^| HKCC ]
ECHO.
ECHO [OPTIONS]    -- WARNING DO NOT USE A '~' IN OPTIONS! --
ECHO /I "InputFile"  -  USE A PRE-OUTPUTED REG QURY FILE
ECHO.
ECHO   ----------------------------  OR  ----------------------------
ECHO.
ECHO /S      Queries all subkeys and values recursively (like dir /s).
ECHO.
ECHO /se 	Specifies the separator (length of 1 character only) in
ECHO     	data string for REG_MULTI_SZ. Defaults to "\0" as the separator.
ECHO.
ECHO /f      Specifies the data or pattern to search for.
ECHO     	Use double quotes if a string contains spaces. Default is "*".
ECHO.
ECHO /k      Specifies to search in key names only.
ECHO.
ECHO /d      Specifies the search in data only.
ECHO.
ECHO /c      Specifies that the search is case sensitive.
ECHO     	The default search is case insensitive.
ECHO.
ECHO /e      Specifies to return only exact matches.
ECHO     	By default all the matches are returned.
ECHO.
ECHO /t      Specifies registry value data type.
ECHO     	Valid types are:
ECHO       	REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ,
ECHO       	REG_DWORD, REG_QWORD, REG_BINARY, REG_NONE
ECHO     	Defaults to all types.
ECHO.
ECHO /z      Verbose: Shows the numeric equivalent for the type of the valuename.
GOTO :EOF



enjoy Posted Image


PARTNERS