Search:

Type: Posts; User: xArt

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: GNU C Rand()

    by xArt
    Replies
    1
    Views
    2,707

    GNU C Rand()

    Hello :)
    Regarding this source code for a random function:
    https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=stdlib/rand_r.c;hb=HEAD

    How do you call it to get a random number?
    I have...
  2. Replies
    2
    Views
    5,731

    Yes ok thanks :) Really just anything above 0.5...

    Yes ok thanks :) Really just anything above 0.5 to the next integer will do for now.
    I’m using an old C30 compiler that doesn’t have round() functions in math library.

    You didn’t catch that I...
  3. Replies
    2
    Views
    5,731

    Rounding float to nearest integer

    Hi Guys,
    I have a situation where a float calculation is made,
    and the result is converted back to an integer.


    Is there a neat solution to convert to the nearest integer,
    rather than just...
  4. Replies
    2
    Views
    2,379

    Slow, Very, The closer the better. Something I...

    Slow, Very, The closer the better.

    Something I realised, I have a function implemented to rotate a point about an origin for graphics x/y coordinates.
    So if the point starts 16384 units under the...
  5. Replies
    2
    Views
    2,379

    Reverse of sine table (back to code)

    Hi Guys :)
    I have this sine table for various things in a program such as sine
    text and plasma that I’ve been using for the last million years.
    Now programming for a micro, and with code running...
  6. Replies
    4
    Views
    6,922

    It will be some time before I can try. I just...

    It will be some time before I can try. I just came back to thank you for the replies :)
  7. Replies
    4
    Views
    6,922

    It’s being sent to an API for file IO for the...

    It’s being sent to an API for file IO for the intended platform which was Sony PSP, and have similar file IO functions for other platforms.
    I can’t pretend to follow it like execution, but...
  8. Replies
    4
    Views
    6,922

    Trouble understanding C memalign

    Hi Guys,
    I’m trying to port a file browser from one platform to another, and trying to avoid using any new C functions if possible.

    I’m reading this link:
    The GNU C Library: Aligned Memory...
  9. Replies
    7
    Views
    2,338

    Thanks for the replies :) I’m programming for...

    Thanks for the replies :)
    I’m programming for dsPic micro at the moment with Microchip C30 compiler.
    Memory is tight (RAM), and there comes a point where if I make an unsigned char array a const...
  10. Replies
    7
    Views
    2,338

    Questions about variable declarations

    Hi Guys :)
    I try to do my own research, but some questions I can’t express well into Google.
    Basically, I’d like to know if I’m correct about some things I just assume at the moment.



    int n;...
  11. Replies
    3
    Views
    3,925

    Thanks :) I had procedure worked out, but...

    Thanks :)
    I had procedure worked out, but couldn’t get it rolled into a loop.
    I was wasting time anding the bytes with different bit masks.

    Simply look at a vertical row, say all bit 7 for...
  12. Replies
    3
    Views
    3,925

    Rotate 8x8 bit image

    Hi Guys :)
    I’m looking to bitwise rotate an 8 byte array by 90 degrees clockwise, so this:


    unsigned char shape[8] = {
    0b00011000,
    0b00111100,
    0b01111110,
    0b11111111,
    0b00000000,
  13. Replies
    3
    Views
    5,128

    Convert Date/Time to Seconds since Epoch

    Hi Guys :)
    I was hoping someone has some example to convert a Human
    time & date values to a number of seconds from an epoch moment.
    Other C platforms I’ve used have an API to handle conversion for...
  14. Thread: Dumb Questions :D

    by xArt
    Replies
    5
    Views
    769

    Dumb Questions :D

    Hi Guys :)
    What is the height on the Y axis of a 1 meter vertical stick with no thickness,
    that is tilted 45 degrees?
    If the answer is 50cm, will it take a sin function to work it out at every...
  15. Replies
    3
    Views
    608

    Ok, I will try it, thanks :)

    Ok, I will try it, thanks :)
  16. Replies
    3
    Views
    608

    Pre-generated sin array

    Hi Guys,
    I am hoping it would be obvious to someone how this sin table was generated.
    This is from a retro plasma demo, and is running fine on a dsPic so fast now
    that I have to delay it. I...
  17. Replies
    12
    Views
    1,058

    Lol but I already did the thing :D The next step...

    Lol but I already did the thing :D
    The next step would be tilting any vertical line of a complete character, but I dont think its needed.
  18. Replies
    12
    Views
    1,058

    This would make more sense (last part of the...

    This would make more sense (last part of the video).
    I don’t think I have to tilt the characters for the effect I want.

    https://www.youtube.com/watch?v=bN-XRXLx88Y
  19. Replies
    12
    Views
    1,058

    You have to click the “To Plain Text” button for...

    You have to click the “To Plain Text” button for the images in code to align properly.
    The code so far is to compress a single line of the char graphics which are all five bit wide, but obviously...
  20. Replies
    12
    Views
    1,058

    Hi again :) So I haven’t had much programming...

    Hi again :)
    So I haven’t had much programming time, but recently finished that step handling five bits.
    I went for... if the bit either side of the centre bit was set, the new middle bit will be...
  21. Thread: Tetris game

    by xArt
    Replies
    5
    Views
    2,104

    There are complete programming tutorials...

    There are complete programming tutorials independent of language for Tetris online.
    then you only have to worry about the specifics of your particular task.

    I would have been interested to see...
  22. Replies
    12
    Views
    1,058

    Hi, yes sorry I didn’t explain well, that was...

    Hi, yes sorry I didn’t explain well, that was just my eight bit example to show I was essentially doing the same thing,
    and the clearing of the first three bits was thrown in there when I realised...
  23. Replies
    12
    Views
    1,058

    Hi, that is similar approach that I have so far....

    Hi, that is similar approach that I have so far.
    No I’m not complaining it’s too slow yet, just checking I’m not doing anything stupid :)
    There will be a lot of these operations.

    Here is a...
  24. Replies
    12
    Views
    1,058

    Bit Shift in a Byte

    Hi Guys,
    I want to shift a byte from the left and right so that it becomes more condensed in the middle for each iteration.
    also shifting zeros in either direction so the original value will always...
  25. Replies
    7
    Views
    3,130

    It’s a 16 bit dsPic doing the drawing to LCD,...

    It’s a 16 bit dsPic doing the drawing to LCD, should have more RAM than low range pics.
    I do at least know SD card filesystem routines exist, and do work for it.
    People I know on the...
Results 1 to 25 of 106
Page 1 of 5 1 2 3 4