-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|394|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Editors


 
Mog
Created : 23 September 2009
Edited : 23 September 2009
System : Windows
Language : Blitz

Change b3d Console Window Resolution

not really an editor, but shows you how to change non-graphic window resolution in blitz3d

Don't like the default 400x300 console window that pops up when b3d first runs? I came across this little hack while cleaning up my Misc. folder for my projects:

Load your EXE into a hex editor and search for the following byte sequence (without the spaces):

6A01 5353 682C 0100 0068 9001 0000

That sequence is the Blitz default and contains the instructions to create the initial 400x300 window. The sequence exists twice in the executable but it's the first occurence you need to change. Here's a break-down of the sequence:

6A 01 53 53 68 2C 01 00 00 68 90 01 00 00
-- 01------ 2C01 9001

The 01 at the start sets whether your program runs in full-screen (00) or windowed (01) mode. You can use any width + height for windows but only certain resolutions (640x480, 800x600, 1280x768 etc.) will work in full-screen mode.

The 2C01 in the sequence is the window height. It's in hexadecimal and the bytes are reversed, $012C = 300.

The 9001 at the end is the width of the window, and again it's in hex and the bytes are reversed, $0190 = 400.

You can use Windows calculator to convert numbers between decimal and hexadecimal (just set it to "scientific" view).

Here are a few example sequences for you:

648x480, windowed
6A 01 53 53 68 E0 01 00 00 68 80 02 00 00

640x480, full-screen:
6A 00 53 53 68 E0 01 00 00 68 80 02 00 00

800x600, full-screen
6A >00< 53 53 68 >58 02< 00 00 68 >20 03< 00 00

800x600, windowed
6A 01 53 53 68 58 02 00 00 68 20 03 00 00

----------------------------------

The byte sequence you're searching for is correct but in HHD HexEditor, you need to put spaces in between the bytes you're searching for:

6A 01 53 53 68 2C 01 00 00 68 90 01 00 00

Let me know if there's any issues.

 

Comments