Search found 177 matches

by fatman2021
Jul 09, 2022 18:14
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

I/O emulation: ' I/O emulation def SYSTEM_BUS_T.sub__blink(onoff as integer) if (onoff = 1) then H3C0_blink_enable = 1 else H3C0_blink_enable = 0 end if end def proc SYSTEM_BUS_T.func__blink() as integer return -H3C0_blink_enable end proc def SYSTEM_BUS_T.sub_out(port as integer, data_out as intege...
by fatman2021
Jul 07, 2022 23:20
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

Started porting the FreeBASIC and QB64 runtimes. Updating and documenting the Shadertoy to FreeBASIC runtime. Started porting over parts of the Win32 API.
by fatman2021
Jul 07, 2022 16:53
Forum: Linux
Topic: possible bug in FreeBASIC [SOLVED]
Replies: 7
Views: 3357

Re: possible bug in FreeBASIC

That yellowish colour looks like you are out of the 0 to 255 range in one or more of the three rgb colours. similarISH Function map(a As Double,b As Double,x As Double,c As Double,d As Double) As Double Return ((d)-(c))*((x)-(a))/((b)-(a))+(c) End Function Function haversineISH(x As Double) As Doub...
by fatman2021
Jul 07, 2022 3:16
Forum: Linux
Topic: possible bug in FreeBASIC [SOLVED]
Replies: 7
Views: 3357

Re: possible bug in FreeBASIC

D.J.Peters wrote: Jul 07, 2022 2:55 It's not a part of FreeBASIC maybe karma not a bug !
if you tell peoples on youtube the shadertoy.com stuff is your work ;-)

Joshy
If you bothered to read the video description, you would clearly see that I go out of my way to show that is not the case.
by fatman2021
Jul 07, 2022 1:35
Forum: Linux
Topic: possible bug in FreeBASIC [SOLVED]
Replies: 7
Views: 3357

possible bug in FreeBASIC [SOLVED]

proc SYSTEM_BUS_T.Spectrum(x as float ) as vector3 ' https://www.shadertoy.com/view/wlSBzD dim as float r, g, b r = iif(x<.16 , smoothstep(0., .16, x)*.169 , _ iif(x<.22 , smoothstep(.22, .16, x)*.134+.035 , _ iif(x<.41 , smoothstep(.22, .41, x)*.098+.035 , _ iif(x<.64 , smoothstep(.41,.64,x)*.851+...
by fatman2021
Jul 06, 2022 14:53
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

Looks like someone has been using code from off of Wikipedia: ;) function smoothstep overload (edge0 as float, edge1 as float, x as float) as float if x<edge0 then return 0 if x>edge1 then return 1 dim as float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0) return t * t * (3.0 - 2.0 * t) end fu...
by fatman2021
Jul 04, 2022 1:18
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

Assembly Mnemonics define equ = 'Equal #define add + 'Add #define subt - 'Subtract #define mul * 'Multiply #define ndiv / 'Divide #define idiv \ 'Integer Devide #define expt ^ 'Exponentiate #define neg - 'Negate #define mov(x, y) x equ y 'Move #define jmp goto 'Jump #define cmp if 'Compare #define ...
by fatman2021
Jul 02, 2022 2:46
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

Compile and execute program ' Compile and execute program case peek(ubyte,@nibbles(&B0001)) shl peek(ubyte,@nibbles(&B0100)) add peek(ubyte,@nibbles(&B1010)) ' 026 line fgimage, (0,0)-(scr_w, scr_h), rgba(0,0,0,255),bf shell compiler add filename shell "./tmp > tmp.txt" open &...
by fatman2021
Jul 02, 2022 2:41
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

language/compiler selector case peek(ubyte,@nibbles(&B0011)) ' 003 mov(filename,"tmp.bas"): mov(compiler,"fbc ") ' FreeBASIC case peek(ubyte,@nibbles(&B0100)) ' 004 mov(filename,"tmp.bas"): mov(compiler,"fbc -lang qb ") ' QBASIC 1.1 case peek(ubyte,@n...
by fatman2021
Jul 02, 2022 2:38
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

POV-Ray terminal case peek(ubyte,@nibbles(&B0010)) ' 002 POV-Ray terminal ScreenRes 800, 600, 32, 0: Cls ', GFX_FULLSCREEN: 'OR GFX_ALPHA_PRIMITIVES: Cls print "Persistence of Vision(tm) Ray Tracer 3.7.0.9" print "POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. ...
by fatman2021
Jul 02, 2022 2:34
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

COBOL terminal case peek(ubyte,@nibbles(&B0001)) ' 001 COBOL terminal ScreenRes 640, 480, 32, 0: Cls ', GFX_FULLSCREEN: Cls ' OR GFX_ALPHA_PRIMITIVES: Cls shell "cobc -V > err.txt" open "err.txt" for input as #peek(ubyte,@nibbles(&B0010)) do until eof(peek(ubyte,@nibbles...
by fatman2021
Jul 02, 2022 2:31
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

Blender terminal case peek(ubyte,@nibbles(&B0000)) ' 000 Blender terminal ScreenRes 640, 480, 32, 0: Cls ', GFX_FULLSCREEN: 'OR GFX_ALPHA_PRIMITIVES: Cls shell "blender --version > err.txt" open "err.txt" for input as #peek(ubyte,@nibbles(&B0010)) do until eof(peek(ubyte...
by fatman2021
Jul 02, 2022 1:33
Forum: Projects
Topic: Project Manhattan
Replies: 56
Views: 8664

Re: Project Manhattan

512-bit CPU emulation: case 49459 ' ld adr0_512 ' adr0_512 adr0_512d7 adr0_512d6 adr0_512d5 mov(mem64(49460),mem64(49461) shl 56 add mem64(49462) shl 48 add mem64(49463) shl 40 add _ mem64(49464) shl 32 add mem64(49465) shl 24 add mem64(49466) shl 16 add _ mem64(49467) shl 08 add mem64(49468)) ' adr...