Search found 55 matches

by mrminecrafttnt
Dec 22, 2017 16:53
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 1017

Re: Faster Renderer for Pset

MrSwiss wrote:
mrminecrafttnt wrote:Works with fbc 32 bit fine.

In FBC 32 - UInteger = ULong, (32-bit int. type) however,
in FBC 64 - UInteger = ULongInt (64-bit int. type)

Only a ULong is, on both Compilers (always) 32-bit !!!


Good to know, code is now working on fbc 32bit and fbc 64bit :)
by mrminecrafttnt
Dec 22, 2017 16:39
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 1017

Re: Faster Renderer for Pset

I've rewitten the code. Here is a 1920x1080, 32bit demo :) Works with fbc 32 bit and 64 bit fine. const sw = 1920 const sh = 1080 screenres sw,sh,32,2 dim as integer cx #undef pset sub pset (x as uinteger,y as uinteger,c as ulong) static s as uinteger ptr static w as uinteger if s = 0 then s = scree...
by mrminecrafttnt
Dec 22, 2017 15:40
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 1017

Re: Faster Renderer for Pset

Here is an example for 32bit Color, i will still working on it, to optimize the speed, actually i working on a high efficient ASM code with SSE3 and MMX :) screenres 1920,1080,32,2 #undef pset sub pset(y as uinteger,x as uinteger,c as uinteger) static s as integer ptr static w as integer if w = 0 th...
by mrminecrafttnt
Dec 20, 2017 22:57
Forum: General
Topic: Code runs slow with fbc 64 bit..
Replies: 3
Views: 225

Code runs slow with fbc 64 bit..

The compiled code is working faster in fbc 32 bit. In fbc 64 bit is it very slow but why? Tested with fbc 1.05.0 screenres 1920,1080 #undef pset sub pset(y as integer,x as integer,c as integer) static s as ubyte ptr static w as integer if w = 0 then screeninfo w,,c s = screenptr end if s[(x*w)+y]=c ...
by mrminecrafttnt
Dec 20, 2017 21:38
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 1017

Faster Renderer for Pset

Pset rewritten to make it faster. :) Edit: Code complete rewritten. It is now working on fbc 32bit and fbc 64bit :) 'The new Pset #undef pset sub pset (x as uinteger,y as uinteger,c as ulong) static s as ulong ptr static w as uinteger if s = 0 then s = screenptr screeninfo w end if s[(w*x)+y] = c en...
by mrminecrafttnt
Dec 17, 2017 9:10
Forum: Tips and Tricks
Topic: Faster file loading
Replies: 12
Views: 657

Faster file loading

dim as string Filename dim as integer filenr = freefile locate 2,2 Input "File to Load ";Filename dim as integer errorcode = open (Filename for binary access read as #filenr) if errorcode = 0 then print "Loading.." 'create buffer dim as ubyte buffer(lof(filenr)) 'load file get #...
by mrminecrafttnt
Dec 15, 2017 9:01
Forum: Tips and Tricks
Topic: Fbgfx , not erase txt console when closing graphic mode
Replies: 2
Views: 210

Re: Fbgfx , not erase txt console when closing graphic mode

"open cons" is working - nice for debugging :) Example: 'test_fbgfx.bas ' compile with -s console flag to verify #include "fbgfx.bi" dim shared as integer exitmode sub t_counter dim as integer t do print #1,"SCREEN OPEN FOR ";STR(T);" Sec.." if T = 10 then pri...
by mrminecrafttnt
Dec 14, 2017 21:32
Forum: Tips and Tricks
Topic: Msgbox using fbgfx
Replies: 5
Views: 373

Re: Msgbox using fbgfx

Bug: It crashes when the String is empty..
by mrminecrafttnt
Dec 13, 2017 23:27
Forum: General
Topic: Static Value in UDT = Error
Replies: 8
Views: 226

Re: Static Value in UDT = Error

An elegant solotuion:

Code: Select all

type test
    dim as integer value
    declare constructor
end type

constructor test
    static as integer lvl
    lvl+=1
    value = lvl
end constructor
by mrminecrafttnt
Dec 13, 2017 22:51
Forum: General
Topic: Static Value in UDT = Error
Replies: 8
Views: 226

Static Value in UDT = Error

I think that this cold be a bug..

Code: Select all

type test
    dim as integer value
    declare constructor
    static as integer lvl
end type

constructor test
    lvl+=1
end constructor
by mrminecrafttnt
Nov 25, 2017 12:01
Forum: Tips and Tricks
Topic: Some Multithread rendering stuff :)
Replies: 1
Views: 225

Some Multithread rendering stuff :)

This simple Demo is not optimized but this should show that is possible :) const rs = 32 ' raster size const res_x = 18 const res_y = 14 dim shared as uinteger exitmode type pixeldata dim as integer x dim as integer y dim as integer c end type sub gpu_core_pixel (pixel as pixeldata) dim as integer o...
by mrminecrafttnt
Oct 30, 2017 9:42
Forum: Tips and Tricks
Topic: A simple 3 Phase encryption algorythem
Replies: 1
Views: 211

A simple 3 Phase encryption algorythem

It will encrypt your Text strings. It has a password protection and it is simple to modify. A key file will be generated (scrabmlekey.tbl) without this file you can't decrypt it. :) Have fun :) const otext ="HELLO BEAUTYFUL WORLD" const password = "DecryptME" type sc_data t as ui...
by mrminecrafttnt
Oct 27, 2017 12:48
Forum: Tips and Tricks
Topic: Simple table sorting. :)
Replies: 1
Views: 189

Simple table sorting. :)

dim as integer value(30) randomize timer for i as integer = 0 to ubound(value) value(i) = Int(rnd*9999) next for i as integer = 0 to ubound(value) for i2 as integer = 0 to ubound(value) if value(i) < value(i2) then swap value(i),value(i2) end if next next for i as integer = 0 to ubound(value) print...
by mrminecrafttnt
Oct 21, 2017 16:20
Forum: Tips and Tricks
Topic: A big custom CPU Emulator :)
Replies: 0
Views: 268

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

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

Go to advanced search