Search found 261 matches

by TeeEmCee
Oct 06, 2019 2:38
Forum: Community Discussion
Topic: PS4? Xbox One? Switch?
Replies: 6
Views: 961

Re: PS4? Xbox One? Switch?

fbgfx also has a null driver, which should work on all platforms. I have never used it, but I assume that you could use it do everything you need except for drawing to the screen and I/O, and use SDL2 for those. Yes multikey/getmouse/etc are part of fbgfx (though there is also a "console" ...
by TeeEmCee
Oct 05, 2019 12:29
Forum: Community Discussion
Topic: PS4? Xbox One? Switch?
Replies: 6
Views: 961

Re: PS4? Xbox One? Switch?

I have previously looked into porting a FB game engine (OHRRPGCE) to these three consoles using SDL2. I had another look. So you're using fb's gfxlib (aka fbgfx) + OpenGL for graphics? Summary: Switch and XBox One should be straightforward for me since I'm using SDL2, but fbgfx is a problem for you,...
by TeeEmCee
Sep 13, 2019 4:49
Forum: Community Discussion
Topic: Anonymous Functions in FreeBASIC
Replies: 2
Views: 708

Re: Anonymous Functions in FreeBASIC

FB does not. I really really wish FB supported nested functions and/or lambda expressions (anonymouse functions). Why? So that I could write code like this: dbg.add_button(scF2, "Quick-save (F2)", Function() savegame 0, "quick" gam.showtext = "Quick-saved. Press F3 to quick-...
by TeeEmCee
Sep 05, 2019 4:38
Forum: Community Discussion
Topic: FreeBASIC 1.07 Release Discussion
Replies: 41
Views: 6113

Re: FreeBASIC 1.07.0 Release Discussion

The release of FB 1.07 took me by surprise, but is welcome.
Is there any kind of schedule for future releases? Or any set of changes that you want to finish before releasing 1.08?
by TeeEmCee
Aug 31, 2019 1:24
Forum: General
Topic: I hate shell
Replies: 8
Views: 3248

Re: I hate shell

I think the difference between cmd.exe and command.com only matters if you're invoking them directly by calling cmd or command. But if you think *that's* bad, it turns out that the winapi OpenProcess() call itself behaves very differently on Win NT and 9X when it comes to console (non-gui) mode prog...
by TeeEmCee
Aug 30, 2019 9:19
Forum: General
Topic: [solved] I need your help for a C to FreeBASIC translation !
Replies: 5
Views: 2918

Re: I need your help for a C to FreeBASIC translation !

What's going on here is that those two lines are duplicate identical declarations of the same function, just written in two different ways. Duplicate declarations are allowed in C and don't give any warning even with "gcc -Wall". The first declaration doesn't name the argument, the second ...
by TeeEmCee
Aug 30, 2019 9:01
Forum: General
Topic: I hate shell
Replies: 8
Views: 3248

Re: I hate shell

If you think it's bad, did you know that cmd.exe (Windows NT) and command.com (Windows 9X) have different rules for how you need to quote/escape filenames when passing them a string to execute? I guess that system() hides that difference. I tried: shell "printcmdline /FI ""IMA...
by TeeEmCee
Aug 29, 2019 5:32
Forum: General
Topic: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)
Replies: 5
Views: 3856

Re: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)

Thanks. I'm looking forward to porting a FB program (the OHRRPGCE) to wasm! Has anyone tried yet?
by TeeEmCee
Aug 28, 2019 10:36
Forum: General
Topic: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)
Replies: 5
Views: 3856

Re: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)

Like IchMagBier wrote, you need to pass -O 1/2/3 to fbc, otherwise fbc invokes gcc with no optimisations. "gcc -O 0" produces very bad asm, yes, even significantly worse than fbc. Of course, because absolutely no optimisations are performed and every line is compiled independently. But eve...
by TeeEmCee
Aug 28, 2019 9:39
Forum: General
Topic: Inine assembler intel syntax with fallback x86 vs x86_64 and Windows vs Linux ABI.
Replies: 6
Views: 2906

Re: Inine assembler intel syntax with fallback x86 vs x86_64 and Windows vs Linux ABI.

Question 1: if __FB_ASM__ = "att" is defined(__FB_DARWIN__) redundant ? Yes, you should remove defined(__FB_DARWIN__), because even on Darwin the asm syntax isn't necessarily att: you can try to compile with intel syntax. I don't know whether it works yet with the latest toolchain, but it...
by TeeEmCee
Aug 27, 2019 8:19
Forum: Linux
Topic: FB breaks when upgrading to GCC 9.x without latest binutils/ld
Replies: 4
Views: 6002

Re: FB breaks when upgrading to GCC 9.x without latest binutils/ld

Yeah, that won't work, because fb_hRtInit and module constructor functions might end up in different sections: fbc -gen gcc translates "SUB foobar() CONSTRUCTOR" to "__attribute__(( constructor )) void FOOBAR( void )", which results in GCC 9.x putting a pointer in the .init_array...
by TeeEmCee
Jul 06, 2019 23:04
Forum: Linux
Topic: FB breaks when upgrading to GCC 9.x without latest binutils/ld
Replies: 4
Views: 6002

Re: FB breaks when upgrading to GCC 9.x without latest binutils/ld

You mean a testcase that will detect whether fb_hRtInit ran or not? I don't see any existing thing to check to determine that, e.g. __fb_is_inicnt isn't a global. I didn't try running the FB testcases to diagnose my problem.
by TeeEmCee
Jun 26, 2019 14:08
Forum: Community Discussion
Topic: any free BASIC for web/ios/android
Replies: 10
Views: 5413

Re: any free BASIC for web/ios/android

How about FreeBASIC? v1ctor ported it to emscripten/HTML5 (which still lives on a separate branch and hasn't been merged upstream) and I ported* it to Android ( without support for fbgfx! Also still not merged upstream). I was going to port it to iOS too but I didn't want to upgrade my ancient iphon...
by TeeEmCee
Jun 24, 2019 2:13
Forum: Linux
Topic: FB breaks when upgrading to GCC 9.x without latest binutils/ld
Replies: 4
Views: 6002

FB breaks when upgrading to GCC 9.x without latest binutils/ld

Just a small note in case this saves anyone some time and frustration: I just wasted about 5 hours trying to figure out why FB programs compiled with -mt (multithreading support) deadlocked after upgrading to gcc 9 even when not using the gcc emitter . It turns out that I upgraded the gcc packages f...
by TeeEmCee
Jun 24, 2019 1:51
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 21
Views: 8835

Re: How to do -g but without assertions?

Oh, awesome! Thank you for this, it's more than I could have hoped for. I will test it, since I happen to be adding better error reporting to my engine anyway (such as printing a backtrace on a crash), but will probably take me a couple days to get back to you. Lately I've been wishing I could turn ...

Go to advanced search