Search found 43 matches

by IchMagBier
Aug 10, 2019 4:22
Forum: General
Topic: Name a variable after a register
Replies: 1
Views: 2533

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: 3256

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: 6305

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: 3180

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: 3180

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: 456

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: 270

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: 270

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: 2264

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...
by IchMagBier
Oct 30, 2018 8:12
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2264

Re: Gameboy emulator written in FreeBasic

Which macros are incompatible?
I might upload a version without the GTK-features for Windows or DOS this week. I just need it for scaling the window and the file-dialog.
by IchMagBier
Oct 28, 2018 19:23
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2264

Re: Gameboy emulator written in FreeBasic

I might give it a go. Will GTK+3 work? Or is this GTK 2, or...? It's GTK 2. ;) The newest Windows OS I have is NT4 in a VM, sorry. I would love to hear if someone managed to compile it on Windows. I guess it would be an idea to use the WinAPI instead of GTK on Windows. Very interesting. I have just...
by IchMagBier
Oct 21, 2018 6:29
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2264

[Update] Gameboy emulator

See changelog in my first post. The emulator now supports savegames. They are loaded and saved automatically when you start/stop the emulator. I also added support for some Gameboy Color features. Nothing is finished, but i was able to start Pokemon Gold: https://raw.githubusercontent.com/IchMagBier...
by IchMagBier
Oct 19, 2018 17:21
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2264

Re: Gameboy emulator written in FreeBasic

Not bad at all but for the screen output and key input you can use FreeBASIC there is no need for GTK+ for this simple task. By the way I know you used my implementation of a opcode table ;-) I am using GTK for being able to resize the window. I think FreeBasic can't do that on its own. I am using ...
by IchMagBier
Oct 19, 2018 15:58
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2264

Gameboy emulator written in FreeBasic

Hello I wrote a Gameboy emulator with FreeBasic and GTK. It should support most games. I successfully tested: ⋅ Pokemon Red ⋅ Tetris ⋅  Flappyboy ⋅  Blargg's tests Sound isn't supported at the moment. Games are saved and loaded automatically when you start/sto...
by IchMagBier
Oct 17, 2018 18:02
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize
Replies: 360
Views: 25258

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 300 $ 1st prize

Awesome, would take me too long to translate my compiler to English. Windows shouldn't be a problem, since I try to stick with the rtlib, unless I do network or 3D-stuff. I like beer too. I was working in Croatia a few years ago and we drank a lot of "Vukovarsk". You got some nice beer ove...

Go to advanced search