Jump to content

- - - - -

Drawing 'high-Res' Pictures On Fx-9860

picture fx-9860

  • Please log in to reply
1 reply to this topic

#1 p4nix



  • Members
  • Pip
  • 9 posts

  • Calculators:
    fx-9860GII-2 (SH4)

Posted 10 October 2014 - 05:21 PM


I'm new here to the forum, so, this is my first hello! :D

Since a few weeks i try to get my calculator to do what I want, and that's great.

But now i have the first 'big' problem:

I want to draw relatively big sprites on my calc.

So my approach is, and it works, to use hex.

So if you have a line which is, say, 8 bit long:


with 1 = black and 0 = white, the solution would be: 0xF0

When I use unsigned ints, i can come to a line being 32 bit long:



So, a 32x4 pic would be:

unsigned int pic[4] = {

Okay, that's nice.


But i'm now talking about 128x64 fullscreen pictures. First, I can't and don't want to find out

every HEX by hand. So I actually wanna create it in a painting program like GIMP.

First approach for this is, since the max unsigned int = 0xFFFFFFFF to make a pic1[64] array and

combine 4 of these to a 128x64 picture. But GIMP doesn't have such format.

So, the problem is:

How to export a picture to my format, or what's the best way of drawing pics like this on a fx-9860?

With out revolution-fx or something. From scratch!


Come on guys! I know you have experience!

Please help me out!! :3


PS: if there is really no premade solution, i must write an exporter myself, but i  want to try to avoid that!

(Now done: http://community.cas...-code-fx-9860g/)


Edited by raz0r, 15 November 2014 - 10:55 AM.

  • flyingfisch likes this

#2 p4nix



  • Members
  • Pip
  • 9 posts

  • Calculators:
    fx-9860GII-2 (SH4)

Posted 18 October 2014 - 04:11 PM

Nah, nobody answered. But I found a suitable solution, altough not the best.

I'm too lazy to put the code in yet for converting pictures, but if anyone wants to draw 16x16 pics,

this is one solution:

void drawTile(unsigned short array[], int x, int y){
    int buffer2;
    int buffer[32];
    int picY, picX;
    int i;

    for(picY = 0; picY < 16; picY++){
        buffer2 = array[picY];
        for (i = 0; i < 16; i++, buffer2 >>= 1){
            buffer[i] = (buffer2 & 1);

        for(picX = 0; picX < 16; picX++){
            Bdisp_SetPoint_VRAM(x+picX, y+picY, buffer[15-picX]);

Of course, this can be made faster, but it is fast enough for me. Don't forget a Bdisp_PutDisp_DD();

after you have drawn all pics in the loop/row/whatever.

If you have questions to this, please ask.

Edited by raz0r, 18 October 2014 - 04:13 PM.

Also tagged with one or more of these keywords: picture, fx-9860

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users