Search found 49 matches

by IchMagBier
Mar 12, 2020 4:52
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 903

Re: raylib headers

Ported the rlights.h header, to port some examples that need it (namely, models_material_pbr.c). However, all I've got was a white screen. So, I tested the C example and alas, same thing. models_material_pbc.c does work for me as expected. What OpenGL version is in use for you? It should tell in th...
by IchMagBier
Mar 10, 2020 7:16
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 903

Re: raylib headers

I ported the raymarching example: https://github.com/IchMagBier/raylib-fb/blob/master/examples/3d_shaders.bas https://thumbs2.imgbox.com/d2/76/Pwb48Qk2_t.png I have added your examples to my repo aswell. I changed the formatting a bit to fit with the existing examples' style. I also included the fil...
by IchMagBier
Mar 09, 2020 20:28
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 903

Re: raylib headers

Another one, shaders and shapes: Nice work! Take a look at the "shaders_raymarching.c" example, really amazing stuff there. @IchMagBier: do you think it will be possible to include the resources used by the examples on your repo, to have them handy? That way, upon downloading your repo, t...
by IchMagBier
Mar 09, 2020 16:56
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 903

raylib headers

Hello there :) I have ported the raylib headers and some examples to FreeBasic. The code is on my GitHub: https://github.com/IchMagBier/raylib-fb raylib is an easy to use graphics and audio library based on OpenGL and -AL. raylib features ⋅  NO external dependencies , all required librarie...
by IchMagBier
Jan 10, 2020 20:09
Forum: Tips and Tricks
Topic: [Linux] Try/Catch
Replies: 7
Views: 351

Re: [Linux] Try/Catch

I'm specifically talking about @IchMagBier's post. Catching segmentation faults is very bad usually, except to do emergency bail out. Ultimately after a segfault, the only appropriate course of action is to abort the program. Because all bets are off. Well, I was in need for a "try catch"...
by IchMagBier
Jan 04, 2020 8:56
Forum: Tips and Tricks
Topic: [Linux] Try/Catch
Replies: 7
Views: 351

[Linux] Try/Catch

Hello :) I wrote this simple exception handler for Linux, which can catch segmentation faults and user defined exceptions, without terminating the program: #include "trycatch.bi" try ' // segmentation fault dim as long ptr bla *bla = 42 catch(e as Exception) if e = SEGMENTATION_FAULT then ...
by IchMagBier
Aug 10, 2019 4:22
Forum: General
Topic: Name a variable after a register
Replies: 1
Views: 2978

Name a variable after a register

Hi! :) I have a problem with a variable named "rax" (like the x86_64 register). It all worked fine until I wrote a bit of inline assembler, that uses the actual rax register: dim as integer rax asm mov rax,42 ' This should work with the register, not the variable print rax ' 42 The bit of ...
by IchMagBier
Aug 10, 2019 4:14
Forum: General
Topic: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)
Replies: 5
Views: 5187

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

With fbc -O 3:

Code: Select all

ADD_ASM:
   addss xmm0,xmm1
   ret

ADD_BASIC:
   addss xmm0, xmm1
   ret

I don't know why it still creates the ADD_BASIC function, when it's inlined anyway. But besides that, this seems to be the best solution I can think of.
by IchMagBier
Apr 19, 2019 16:31
Forum: DOS
Topic: FreeDOS, Hello World program crashes
Replies: 0
Views: 10350

FreeDOS, Hello World program crashes

Hello :) So I wanted to try out the new fbc 1.06.0 on FreeDOS 1.2. However, I can't seem to get a simple "Hello World" program working. It is crashing with a "Page fault". I am using CSDPMI7, which is working on Dosbox. The program looks like this: print "Hi" The genera...
by IchMagBier
Jan 08, 2019 16:20
Forum: Community Discussion
Topic: Has anyone looked into Jai?
Replies: 17
Views: 3939

Re: Has anyone looked into Jai?

what about breaking a call with expressions in the arguments over multiple lines? A compiler usually tokenizes the code instead of directly parsing it. Let's tokenize by hand: testfunc(1,2,3) Would create those tokens: ⋅ SYMBOL "testfunc" ⋅ OPEN PARANTHESIS ⋅ ...
by IchMagBier
Jan 08, 2019 15:22
Forum: Community Discussion
Topic: Has anyone looked into Jai?
Replies: 17
Views: 3939

Re: Has anyone looked into Jai?

This looks promising, but ... return x + y + z ; ... why do we need semicolons in 2019? I never got why a programming language would need a semicolon as its line delimiter. Either use 0x0A or simply don't use a line delimiter at all. It's not harder to parse this x=1+2 y=3+4 than this x=1+2; y=3+4; ...
by IchMagBier
Dec 06, 2018 3:57
Forum: Projects
Topic: JIT-Assembler (x86)
Replies: 1
Views: 562

JIT-Assembler (x86)

Hello I was in need of creating executable code during runtime, so I have created this little JIT-Assembler. It allows you to dynamically compile Assembler-code during runtime. This can be used to speed up a scripting language or an emulator. At the moment it only works with 8bit operations, I might...
by IchMagBier
Nov 28, 2018 4:37
Forum: General
Topic: Performance issus with logic simulation
Replies: 2
Views: 304

Re: Performance issus with logic simulation

Well, not sure what I should expect:
Image
Seems to work like in other logic simulators. Same results in BOOLR and simulator.io.
by IchMagBier
Nov 27, 2018 5:21
Forum: General
Topic: Performance issus with logic simulation
Replies: 2
Views: 304

Performance issus with logic simulation

Hello! So after coding my Gameboy emulator, I have decided to go more lowlevel and make a CPU simulator (like https://simulator.io/ for example). Basically I can set my own logic gates and wire them on a big board. So I got AND-gates, OR, XOR, Buttons ... etc. Looks like this: type t_wire as ubyte v...
by IchMagBier
Oct 31, 2018 9:50
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2732

Re: Gameboy emulator written in FreeBasic

https://www.file-upload.net/download-13370787/ohne_gtk.zip.html This is the newest version without GTK. The debug-stuff isn't in the version, neither is palette switching. It is just meant as a workaround until I got fbc and gtk working with wine. You can reenable GTK with the first line in "fb...

Go to advanced search