Search found 87 matches

by mrminecrafttnt
Oct 21, 2017 16:20
Forum: Tips and Tricks
Topic: A big custom CPU Emulator :)
Replies: 1
Views: 995

A big custom CPU Emulator :)

The complete code runs in a little Sandbox so that crashes are inpossible new opcodes are easy to add I wrote a little OS for this maschine, have fun :) Have fun :) #include "windows.bi" screen 0 width 80,10 color 15 locate ,,0 'settings '#define enable_bytemaker '#define boot_debugger #de...
by mrminecrafttnt
Oct 07, 2017 10:07
Forum: Tips and Tricks
Topic: Fast render engine (proof of concept)
Replies: 0
Views: 626

Fast render engine (proof of concept)

Code: Select all

dim as double a
dim as integer v,x
screenres 640, 480
do
    a+=.1
    x+=1
    v=sin(a)*1000 xor 640
   
    pset (x mod 640,100+v),x
loop until inkey <> ""
 sleep
by mrminecrafttnt
Aug 17, 2017 17:25
Forum: General
Topic: How to call a multithreaded UDT Sub???
Replies: 12
Views: 1091

Re: How to call a multithreaded UDT Sub???

This is what i need thanks :)
by mrminecrafttnt
Aug 17, 2017 15:56
Forum: General
Topic: How to call a multithreaded UDT Sub???
Replies: 12
Views: 1091

Re: How to call a multithreaded UDT Sub???

Works fine, thanks! But why crashes this simple code??? type sec_integer dim as integer update declare sub mt_watchdog declare constructor end type constructor sec_integer threadcall mt_watchdog() end constructor sub sec_integer.mt_watchdog print 1 do print 2 sleep 1 print 3 if update = 1 then print...
by mrminecrafttnt
Aug 17, 2017 15:08
Forum: General
Topic: How to call a multithreaded UDT Sub???
Replies: 12
Views: 1091

How to call a multithreaded UDT Sub???

type sec_integer dim as integer value declare sub mt_watchdog declare constructor end type sub sec_integer.mt_watchdog do print "IT WORKS!" loop until inkey <> "" end sub constructor sec_integer threadcall sec_integer.mt_watchdog end constructor sleep Ouput: FBIDETEMP.bas(15) er...
by mrminecrafttnt
Aug 14, 2017 8:20
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 5281

Re: How to reduce the filesize of a compiled file?

I need this for the demoscene, so will now try fbc 0.18.6 :) Edit: Nice! #include "crt/io.bi" #include "crt/stdlib.bi" printf(!"Hello World!\n") system_("pause") Needs only 6kb with fbc 0.18.6 this is what i need! Thanks! Now is it time to make an 8k demo :)
by mrminecrafttnt
Aug 12, 2017 19:30
Forum: Tips and Tricks
Topic: A simple emulator
Replies: 3
Views: 1444

Re: A simple emulator

Here is a new example with a simple compiler :) Features: 256bytes of programm memory and 256bytes of string memory A very small build in BASIC Compiler dim shared as ubyte pram(256) 'programmram dim shared as ubyte sram(256) 'stringram dim shared as ubyte prgctr,sramctr,exitflag 'programmcounter, s...
by mrminecrafttnt
Aug 12, 2017 18:21
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 5281

How to reduce the filesize of a compiled file?

A simple compiled

Code: Select all

Print "Hello World"

have a filesize of 24,5kb.
Is it possible to reduce this??
by mrminecrafttnt
Jul 01, 2017 10:02
Forum: Tips and Tricks
Topic: A simple emulator
Replies: 3
Views: 1444

A simple emulator

'It simulates my own CPU with 2 registers, 5 opcodes and 256bytes of rom - have fun :) dim shared as ubyte r0,r1,prgctr,rom(256),exitflag function hexconvert(value as ubyte) as string if value < 16 then return 0 & HEX(VALUE) else return hex(value) end if end function sub cmsg(msg as string,adr ...
by mrminecrafttnt
Jun 17, 2017 14:17
Forum: Tips and Tricks
Topic: A simple chat programm
Replies: 1
Views: 605

A simple chat programm

It's a simple chat for an windows share folder, have fun *g* ON ERROR GOTO ERRORHANDLER locate ,,0 width 80,20 sub write_message(message as string) open "simplechat.msg" for output as #2 print #2,message close #2 end sub function read_message as string dim as string message if open ("...
by mrminecrafttnt
May 20, 2017 10:12
Forum: Tips and Tricks
Topic: Transparent Overlay
Replies: 8
Views: 1233

Re: Transparent Overlay

This is transperent :) ' TranparentOverlay.bas -- 2017-05-14, by MrSwiss ' ' compile with: -s GUI ' '#Include "GFX_MATH.bi" ' see: https://freebasic.net/forum/viewtopic.php?f=7&t=25635 Const As Single Pi = 4f * Atn(1f) Const As Single d2r = Pi / 180f #Define RAD(d) ( d * d2r ) #Define ...
by mrminecrafttnt
May 18, 2017 9:47
Forum: Tips and Tricks
Topic: Simulation of Glitches (GFX)
Replies: 5
Views: 1061

Re: Simulation of Glitches (GFX)

Muttonhead wrote:still not work: i see only glitches
:P
nice

It was not working correclty but now.. ;)
by mrminecrafttnt
May 15, 2017 18:26
Forum: Tips and Tricks
Topic: Simulation of Glitches (GFX)
Replies: 5
Views: 1061

Re: Simulation of Glitches (GFX)

Tourist Trap wrote:
mrminecrafttnt wrote:

Illegal function call at line 46. Maybe some issue with the width, height parameters of GET? Or something?

Fixed! :)
by mrminecrafttnt
May 14, 2017 20:19
Forum: Tips and Tricks
Topic: Simulation of Glitches (GFX)
Replies: 5
Views: 1061

Simulation of Glitches (GFX)

randomize timer #include "fbgfx.bi" screenres 640,480 dim as integer x1,x2,y1,y2,c dim as integer cix,ciy,drawloopflag dim as string glitchstring dim as fb.Image Ptr corrupt1 = imagecreate(64,64) dim as fb.Image Ptr corrupt2 = imagecreate(64,64) dim as fb.image ptr img do x1 = int(rnd*640...
by mrminecrafttnt
May 08, 2017 15:44
Forum: Tips and Tricks
Topic: Simple Accountmanager
Replies: 1
Views: 687

Simple Accountmanager

type account username as string userpassword as string userid as integer loggedin as integer banned as integer used as integer end type dim shared as account accounts(10) sub parsewords (source as string, byref part1 as string,byref part2 as string,parsetarget as string = "=") part1 = lef...

Go to advanced search