Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rbz

Pages: [1] 2 3 4 5 6 7 8 ... 92
1
ASM / Re: sine generator in TASM
« on: Today at 12:04 AM »
And here is the Freebasic port for the sine generator part, for anyone who wants to investigate how it works.

Keep in mind that this generator was done for old computers without FPU (old PC 286 computers I believe), but it's an interesting piece of code that shows how those old coders did their stuff, might be useful for someone making demos for other kinds of old school  computers ofcourse.

Code: [Select]
' CALCULATE SINE/COS - VALUES (Wally/Rage)

    dim shared bx(16384) as short

    dim as short cx = &h783F
    dim as byte ch = 0
    dim as short si = 0
    dim as short ax = 0
    dim as short dx = 0
    dim as short b = 0

    width 80, 25
    cls

    dim as integer i = 0
    for i = 0 to 16383
   
      ax = -39  '65497
      dx = (cx * ax) shr 16
      si += dx
      cx += si

      ch = (cx shr 8 ) and &hFF
      bx( i ) = ch
      b = bx( i )
      bx( i ) = b shr 1

      print bx( i ); "  ";
     
   next
   
   print
   print
   print "press any key to exit..."
   sleep
   dim as string clearkey = inkey
   

2
@boogop: This is an interesting piece of asm code, and I've tried to convert it to C and I got this result below.
Not exactly sure if it is correctly but it seems to be working.

Quote
   short bx[16384] = {};

   short cx = 0x783F;
   char ch = 0;
   short si = 0;
   short ax = 0;
   short dx = 0;

   for(int i = 0; i < 16384; i++)
   {
      ax = -39;//65497;
      dx = (cx * ax) >> 16;
      si += dx;
      cx += si;

      ch = (cx >> 8 ) & 0xFF;
      bx[ i ] = ch;
      short b = bx[ i ];
      bx[ i ] = b >> 1;

      printf("%d    ", bx[ i ]);
   }

If you want to investigate further please open a new thread for it on a proper coding section, I'm sure people will like to try this.

I've attached part of the numbers I got and an image of those points plotted on x coordinate.

3
General chat / Re: The Welcoming Committee
« on: August 08, 2018 »
 :hi: Heiker

4
I'm using ArtRage 5, it's cool painting program.
I've also tryed Corel Painter, which is awesome, too bad it's expensive for just play around, but who knows maybe one day.

Also your paintings are awesome 8)

5
I'm still learning digital painting... :)


6
Projects / Re: The Papillons Remake
« on: June 02, 2018 »
Just to be sure, I'm not against vc runtime or anything like that :)
I'm pointing it out because most of users don't know how to fix it by installing msvc redistributable package thing.

Quote
Any suggestions how I can link it to a non-VC-RT dll (I wasn't aware that using the mem-functions opens up a new dependecy).
What I do these days is to simple setup on "Code Generation" - "Runtime Library" to "Multi-threaded (/MT)" and the vc runtime will be static linked to your executable file. Sure the file will increase in size but well.. AV programs today are so annoying that you can't have small executables anymore anyway :(

Another way is to follow this tutorial and complete remove c runtime lib usage (prepare to have some fun ;) ).

 

7
Purebasic / Re: Beast Tribute
« on: June 02, 2018 »
Really great welldone aNdy!
The music version you did is awesome, keep it up!

8
Purebasic / Re: Psygnosis Agony MinIntro
« on: June 02, 2018 »
Been a bit busy lately but have managed to put together a little demo along similar lines as ~Ar-S~.  I've gone for a minimalist approach to colour on this one but it did start off very differently.  :-X
Written as usual in PB, standard libraries except the music library.
Nice work on this one!
Oldschool vibe approved  :cheers:

9
Projects / Re: The Papillons Remake
« on: June 02, 2018 »
Nice remake!

Consider removing the use of "VCRUNTIME140.dll" and it will be perfect :)

10
Hi,

You will need an old Freebasic version (0.17) to compile this one, fortunately I've one copy of it on my hd.
Of course, this code can be ported to the new/recent FB version but it's time consuming, a lot of things changed since 0.17 ver.

Anyway, if you like, you can download the 0.17 version from here:
www.rbraz.com/temp/FreeBASIC017.zip

And in the source there is some duplicated variables, just comment or remove those lines in the CooperMaster.bas, those lines are already defined in nzo_func.bas

Code: [Select]
Const XRES=640
CONST YRES=480
Const PI=3.141 
Const Sin_PI=PI/180
Const twopi=PI*2

11
C / C++ /C# / Re: stb libraries
« on: April 16, 2018 »
I also scratched my head on the first time I was using it, but in the end it is very simple.

Just all you need to do is to include this lines on your texture ".CPP"  file:
Code: [Select]
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

It includes those functions on your source code and no other file or library is necessary, besides of course it uses the standard C runtime, needed for open file, memory allocation and etc.


Ps. I've only tested the image loader, but the other libs should be also simple to use, just take a look on the header file for example usage.


12
C / C++ /C# / stb libraries
« on: April 15, 2018 »
For those looking for a simple image loader, take a look at "stb image library" by Sean Barrett
https://github.com/nothings/stb

It's simple to use:

Code: [Select]
#define STB_IMAGE_IMPLEMENTATION
#define STBI_ONLY_PNG     //You can request *only* certain decoders and suppress all other
#include "stb_image.h"

    int x,y,n;
    unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
    // ... process data if not NULL ...
    // ... x = width, y = height, n = # 8-bit components per pixel ...
    // ... replace '0' with '1'..'4' to force that many components per pixel
    // ... but 'n' will always be the number that it would have been if you said 0

    stbi_image_free(data)

// Standard parameters:
//    int *x                 -- outputs image width in pixels
//    int *y                 -- outputs image height in pixels
//    int *channels_in_file  -- outputs # of image components in image file
//    int desired_channels   -- if non-zero, # of image components requested in result

13
General chat / DBF Challenge theme
« on: April 13, 2018 »
Hello,

I'm willing to setup a new DBF challenge and need your help for theme suggestions.
This time will be only a challenge and not a "competition" which means -> no voting, so everyone entering will be receiving our precious "karma" points. :)


That said, one of my ideas for a challenge would be choose a theme based on Pixel Dailies theme for a specific day and have a month to develop around that theme.


Please post your ideas below.

14
Hi,

I found this FC player this last week and I though it would be useful for someone else.

I made a wrapper for Freebasic but I believe it should be easy to convert to Purebasic.

Not sure about how accurate it is, I'm oldschool music noob :(, so you guys can test it out and see if it will be useful.
On the author site there's is also an ahxplay replayer that could be converted if there is any interest, let me know.


Original author site:
https://16-bits.org



15
Purebasic / Re: Old School Style Demo
« on: April 09, 2018 »
I was browsing your group web page and to me it's a group to be proud of, lots of cool releases, congrats 8)

Also, welldone on your Purebasic adventures, keep it up :)

16
General coding questions / Re: voxel waves
« on: April 06, 2018 »
Excellent explanation Hellfire!
Thanks  :cheers:

17
General chat / Re: Hello
« on: April 06, 2018 »
 :hi: @ikklepaul

18
Purebasic / Re: ICS cracktro remakes
« on: March 31, 2018 »
Uploaded those 2 to RR :)

 :cheers:

19
No problem, post them on here and I'll upload to RR.
 :cheers:

20
Nicely done as always!  ;) I have added it on RR as an attempt of CPR, but the patient is still pretty unconscious as it seems... This is the first remake that has been added in 2018! Eat this Amiga fanboys!  ;D

K++ for the source.
Hehe, precise description of RR situation!
I've gave the patient some vaccine against spam infection and it seems to be reacting well so far :).

Also I've updated all my remakes, they were suffering from "timer code bug" infection.

Pages: [1] 2 3 4 5 6 7 8 ... 92