Search found 45 matches

by IchMagBier
Oct 19, 2018 15:58
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 2571

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

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...
by IchMagBier
Oct 17, 2018 16:55
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize
Replies: 360
Views: 27197

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

Oh wow, how did I miss this thread? I love the idea of programming contests. I have some questions though. ⋅ Are there any restrictions on the coding style? OOP, GOTO, language of comments etc. ⋅ Is inline-ASM allowed? ⋅ Does it have to compile on Win and/or Linux (or D...
by IchMagBier
Oct 07, 2018 9:36
Forum: Tips and Tricks
Topic: Simple shared memory [Linux]
Replies: 6
Views: 869

Re: Simple shared memory [Linux]

Why don't you use the libc functions? I didn't use header files, because I couldn't find any and I didn't want to translate the C-headers. I guess I was lazy. :p I also don't like using more libraries than necessary, so I can keep my binary small. You use shmget, while I use mmap, which is more &qu...
by IchMagBier
Oct 07, 2018 5:12
Forum: Tips and Tricks
Topic: Simple shared memory [Linux]
Replies: 6
Views: 869

Simple shared memory [Linux]

Good morning my friends I wrote a simple function, which allows two or more programs to share a memory buffer. This can be quite useful for interprocess communication. For example you have one program which generates data and another program which processes it. It can be used like this: 'program1.ba...
by IchMagBier
Aug 08, 2018 2:53
Forum: Tips and Tricks
Topic: C-like for() statement using macros
Replies: 16
Views: 2352

Re: C-like for() statement using macros

I use python-like for loops in my codes. I guess that's easier to achieve.

Code: Select all

#define in(start,end) as integer=start to end

for i in(0,10)
   print i
next
by IchMagBier
Aug 02, 2018 13:32
Forum: General
Topic: Slow opening and closing of files
Replies: 26
Views: 1686

Re: Slow opening and closing of files

Well, it takes 198255 cycles for opening and 180859 for closing a file. Compared to only 6300 for actually writing a string to it. And I wonder if there is a faster way? I have a program which processes some data and writes its output to a file. But the file-output (only Open and Close) is 10 times ...
by IchMagBier
Aug 02, 2018 11:43
Forum: General
Topic: Slow opening and closing of files
Replies: 26
Views: 1686

Re: Slow opening and closing of files

Awesome, finally I can use ATT-syntax. :-)

Sadly this doesn't fix my problem with the slow Open and Close commands.
by IchMagBier
Aug 01, 2018 11:35
Forum: General
Topic: Slow opening and closing of files
Replies: 26
Views: 1686

Re: Slow opening and closing of files

Your link leads me to "Error 500: This page is unavailable". How did you compile your code? What does the following mean? "=r" (time_high_start), "=r" (time_low_start):: "%rax", "%rdx" Does it mean it saves rax in time_high_start and rdx in time_low_...
by IchMagBier
Aug 01, 2018 4:26
Forum: General
Topic: Slow opening and closing of files
Replies: 26
Views: 1686

Slow opening and closing of files

Hello :) So I was writing some text to a file and saw that open and close take a lot more time than actually writing to the file. Even writing several megabytes is still faster than opening and closing. I wonder why and if there maybe is a faster way? I used this code to measure the time (64bit only...
by IchMagBier
Jul 11, 2018 8:35
Forum: General
Topic: Saving top half ot array/stack
Replies: 6
Views: 627

Re: Saving top half ot array/stack

Ah nice, thank you!
I knew it could be simple.
by IchMagBier
Jul 11, 2018 7:59
Forum: General
Topic: Saving top half ot array/stack
Replies: 6
Views: 627

Re: Saving top half ot array/stack

The lower part needs to be completly gone. I am saving the "history" of files (I don't know the right word for it. The text you can redo/undo via Ctrl+Z/Y) in that stack and I don't want it to grow to an infinite size.
by IchMagBier
Jul 11, 2018 4:34
Forum: General
Topic: Saving top half ot array/stack
Replies: 6
Views: 627

Saving top half ot array/stack

Hello I have a problem. I wrote a "stack"-class, where you can push and pop strings. This works well, however I want to prevent the stack getting to big. So when the stack reaches the size 6, I want to cut off the lower half, but I don't want to loose the top half. How would I do that? I t...
by IchMagBier
Jun 20, 2018 9:16
Forum: Linux
Topic: Best Distro for FB
Replies: 38
Views: 12431

Re: Best Distro for FB

The biggest problem with Linux and FB is "libtinfo". I am using Debian for coding and when I want to run my programs on Fedora, CentOS or Ubuntu, it complains about libtinfo being not the version it needs (on some systems, especially newer ones, libtinfo isn't even installed by default). S...
by IchMagBier
May 05, 2018 4:32
Forum: General
Topic: Calling opcodes
Replies: 10
Views: 515

Re: Calling opcodes

I found out, what the problem was. You need some memory marked as executable. On Linux, you need to use "mmap" for that. I got it working with a lot of inline-ASM: dim as ubyte ptr function_in_memory asm xor rdi, rdi 'address = 0 mov rsi, 4096 'length of the array mov rdx, 7 'read OR write...

Go to advanced search