FreeBASIC 1.08.0 Release Discussion (June 2021)

General discussion for topics related to the FreeBASIC project or its community.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by coderJeff »

FreeBASIC version 1.08.0 is finally released!

News post: FreeBASIC 1.08.0 Release
Github Release: FreeBASIC 1.08.0 Release
SourceForge Files:FreeBASIC-1.08.0 files

Please report any problems with the News Release here. There are quite a few new links typed in and it would be good to hear about any errors sooner rather than later.

This has been a tough one to get out the door. There has often been _one more change_ that really should be included in the release and has delayed getting the packages built and uploaded.

Greets to adeyblue, angros47, counting_pine, deltarho[1859], D.J Peters, dkl, dodicat, fxm, Imortis, Mr Swiss, paul doe, SARG, skyfish, srvaldez, St_W, TeeEmCee, VANYA, UEZ, and all the rest who I feel helped to move this next version forward to a release. (Seriously, there's many others that have helped, I just can't recall everyone off hand, sorry!).

Special thanks to fxm for keeping the documentation on pace with the development. His efforts are amazing.

Thanks to deltarho[1859] and srvaldez for the on-going testing of various toolchains over the past year(s?). It has been nice to depend gcc-5.2.0 and friends for many years for stability in the fbc compiler, but we really do want to take advantage of gcc's backend and eventually work towards current day incarnations of gcc/clang/llvm. I am thankful for deltarho[1859]'s and srvaldez's efforts to regularly push this forward.

Biggest changes moving to winlibs-gcc-9.3.0-sjlj as the backend toolchain for fbc on windows are as follows:
- fbc32.exe and fbc64.exe in the combined package: this isn't really documented anywhere in the manual. Please be kind to novice users.
- winlibs separates 32-bit and 64-bit builds. Contrast mingw-w64 that allows building either 32-bit or 64-bit executables with the same tools, take care that the new tools are 32-bit or 64-bit only

If you are on windows and only want to know the latest package to download, it's this one:
- windows: FreeBASIC-1.08.0-winlibs-gcc-9.3.0.7z - combined 32bit and 64bit standalone version

Yes, there are several other packages to download but hopefully you don't need any of them. They exist for historic and backwards compatibility reasons only.

If you are not quite ready to commit to winlibs-gcc-9.3.0, I've also uploaded packages for mingw-w64-gcc-5.2.0 and mingw-w64-gcc-8.1.0. This may be a better choice you are wiling to work with the changes in fbc, but not have to deal with changes in the backend.

The only packages I had hoped to release but couldn't validate were the FreeBSD ones that were worked on by Cretin Ho.

This topic is for the 1.08.0 release. 1.09.0 Development will be a separate topic ... soon. :)
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by deltarho[1859] »

@coderJeff

WOW! I would have put money on gcc 8.4.

The timing is interesting because only the other day I did a performance test comparing 8.3ES. 8.4WL and 9.3WL(SJLJ). 8.3 has been my default for some time. 8.3 and 8.4 were 'neck and neck'. 9.3 pipped them by 3%. OK, not by much but 3% in the world of gcc is quite a bit and, of course, I only timed the stuff that I write. Not all the time but I have seen 8.3 outpace 5.2 by 15%.

I hope that members are queuing up to thank you, Jeff, because fbc 1.08 + gcc 9.3WL(SJLJ) is one very serious piece of kit.

I will start it off: Thank you. Image

PS: BTW, the issues I recently had with my RNGs CMWC4096 and CryptoRndII in 64 bit are, as was expected, no longer the case.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by fxm »

The provided documentation (FB-manual-1.08.0) fully includes all changes made by the fbc 1.08.0 release.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by coderJeff »

As mentioned elsewhere, this release has taken me the better of a week (part time in the evenings). Hopefully I didn't screw up the packages. But if I did, or something seems to be missing from the packages, please post here.

To verify that you really do have fbc version 1.08.0:
- run 'fbc -print sha-1'
- or fbc32.exe or fbc64.exe as the case may be...
- and you should get:
dd49defd6eec54c5c1c5bb037ff4802248f28229

This is the hash for the commit used to generate the fbc 1.08.0 release. Because the packages were made and uploaded over several days, the timestamps and "release date" may vary from package to package.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by UEZ »

In my WIndows 7 Test VM the screen is not dpi aware. When it's set to 125% the GUI is smaller accordingly. No problem with previous version.
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by deltarho[1859] »

And for 'gcc -v' we get

Code: Select all

32-bit: gcc version 9.3.0 (MinGW-W64 i686-posix-sjlj, built by Brecht Sanders)
64-bit: gcc version 9.3.0 (MinGW-W64 x86_64-posix-sjlj, built by Brecht Sanders)
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by coderJeff »

UEZ wrote:In my WIndows 7 Test VM the screen is not dpi aware. When it's set to 125% the GUI is smaller accordingly. No problem with previous version.
If by screen you mean fb's screen/screenres then here's a possibility:
- some previous versions of the graphics library fail to initialize the DirectX driver and the GDI driver is selected by default.
- in this new version "Direct2D" driver is selected by default and should initialize correctly on win7 and win10.

Maybe, compare the actual driver in use between the previous and new versions:

Code: Select all

var drivername = ""
screencontrol fb.GET_DRIVER_NAME, drivername
print drivername
And maybe the fix is to set the appropriate driver:

Code: Select all

screencontrol fb.SET_DRIVER_NAME, "DirectX"  '' Old driver
screencontrol fb.SET_DRIVER_NAME, "Direct2D" '' New driver
screencontrol fb.SET_DRIVER_NAME, "GDI"      '' good 'ol GDI
Let us know. If that's not the cause then something else is going we don't know about.

A short program to show the problem and logged on github or sourceforge.net would be super helpful to track the issue formally. Thanks!
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by UEZ »

Well, only with

Code: Select all

screencontrol fb.SET_DRIVER_NAME, "GDI"      '' good 'ol GDI
it works as expected.

Test script:

Code: Select all

'Ported from yonatan's code @ https://www.dwitter.net/d/10076 to FB by UEZ build 2020-10-16

#Include "fbgfx.bi"
Using FB

Randomize
Dim As Integer w = 420, h = 420

'screencontrol fb.SET_DRIVER_NAME, "DirectX"  '' Old driver
'screencontrol fb.SET_DRIVER_NAME, "Direct2D" '' New driver
'screencontrol fb.SET_DRIVER_NAME, "GDI"      '' good 'ol GDI
Screenres w, h, 32, 2, GFX_ALWAYS_ON_TOP Or GFX_ALPHA_PRIMITIVES Or GFX_NO_SWITCH
Screenset 1, 0

Dim as String drivername = ""
screencontrol fb.GET_DRIVER_NAME, drivername

Dim As Long iFPS, cfps = 0, a = w \ 2, s = 8
Dim As Double fTimer = Timer, t = 0
Dim As Single x = 0.01, y = x, u = x, v = x, xx, yy, d


Do
	Cls
	If (x * x + y * y) > 1 Then 
		d = (x * u + y * v)^0.7
	Else
		d = 0
	Endif
	xx = x
	x += u - x * d
	u -= xx * d
	yy = y
	y += v - y * d + 0.01
	v -= yy * d - 0.01
	Circle (a, a), a, &hFFFFFFFF,,,,F
	Circle (a + x * a, a + y * a), s, &hFF000000,,,,F
	
	Draw String(4, 4), iFPS & " fps / " & drivername, &hFFFF0000
	Flip	
	
	cfps += 1
	If Timer - fTimer > 0.99 Then
		iFPS = cfps
		cfps = 0
		fTimer = Timer
	End If
	Sleep(10)
Loop Until Len(Inkey())
By default is is Direct2D. Using screencontrol fb.SET_DRIVER_NAME, "DirectX" '' Old driver doesn't change it to DirectX - stays still with Direct2D.

Result with Direct2D:
Image

With GDI:
Image


Btw, the code compiled as x86 with 1.07.3 causing a lot of false positive AV alerts that I tested on VirusTotal.com. With 1.08 only a few.
Knarfie
Posts: 1
Joined: Jun 05, 2021 21:26

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by Knarfie »

I also have one issue with the new "Direct2d" library and Windows 10.

Using "Multikey" to check for the NUMPAD 5 Key (Scancode &h4c) doesnt seem to work correctly.

Code: Select all

#include "fbgfx.bi"
ScreenControl FB.SET_DRIVER_NAME, "DirectX"
'ScreenControl FB.SET_DRIVER_NAME, "Direct2D"

screenres 800,600,32

dim as String driver
ScreenInfo ,,,,,,driver

print driver

while inkey<>"q"
    
    if multikey(&h4c) then beep     'pressing NUMPAD 5, it beeps as it should, but only if "DirectX" is active
    'if multikey(&h01) then beep    'if "Direct2D" is active,NUMPAD 5 only responds to this scancode (same as ESC-Key)
    
wend
end
Don't know if its a bug or a feature or if i'm using "Multikey" wrong.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by VANYA »

A lot of work. Thanks a lot for the new version!

coderJeff , I was hoping that the files for target js-asmjs (libfb.a, libfbgfx.a, etc.) would be included with the compiler to successfully compile emscripten programs. However, compilation is done only for console programs.
Using "Multikey" to check for the NUMPAD 5 Key (Scancode &h4c) doesnt seem to work correctly.
I do not confirm this problem, everything works fine for me
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by counting_pine »

Amazing work Jeff!
Thanks also to everyone else who has contributed to this release.
erik
Posts: 39
Joined: Dec 28, 2020 17:27
Location: Krasnoyarsk
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by erik »

I believe that to enable high DPI, you need a manifest that is put in the program resources.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by fxm »

UEZ wrote:In my WIndows 7 Test VM the screen is not dpi aware. When it's set to 125% the GUI is smaller accordingly. No problem with previous version.
No problem for me (32-bit or 64-bit, Direct2D, Windows 10, 125% (1920 x 1080)).
(also works for DirectX and GDI)
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by VANYA »

UEZ wrote:In my WIndows 7 Test VM the screen is not dpi aware. When it's set to 125% the GUI is smaller accordingly. No problem with previous version.
Windows 10 - no problem
Windows 7 - there is a problem. Since Direct2D is loaded by default, for win7 this is a problem at 125%.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Post by UEZ »

The problem I discovered is only for Win7 - Win10 seems to work properly.
Post Reply