when i tested the new Grayinit function i've got an error on the computer (it says there is a problem with the reset function) and on the calculator it makes the calc shut down and restart... does it happen to someone else? how to correct this?
Yes, I have experienced the same problem also. You probably have a empty loop in your program. First, make sure you have downloaded the latest release (look at the first thread, it's now at v0.2.1) or just click here
http://downloads.sou...mirror=internap and install it. Next, take a look at this example (and notice that the loop is not empty):
/*
Example using the Revolution-FX library to create grayscales.
Draw a DEVO logo.
This file is part of the Revolution-FX library.
Written by kucalc with some additions by Menno
Contact: <u title="Email protected, replace " AT " by "@"">kucalc[i] AT [/i]gmail.com</u>
*/
#include "fxlib.h"
#include "stdio.h"
#include "string.h"
#include "revolution.h"
int grey=3661;
char buffer[21];
void set_gray() {
while(IsKeyDown(KEY_CTRL_EXE)==0){
Bdisp_AllClr_VRAM();
sprintf(buffer,"%d",grey);
PrintMini(50,57, (unsigned char*)buffer, MINI_OVER);
Bdisp_PutDisp_DD();
if(IsKeyDown(KEY_CTRL_DOWN))
{
grey = grey-1;
}
if(IsKeyDown(KEY_CTRL_UP))
{
grey = grey+1;
}
if(IsKeyDown(KEY_CTRL_LEFT))
{
grey = grey-10;
}
if(IsKeyDown(KEY_CTRL_RIGHT))
{
grey = grey+10;
}
if(grey<1)
{
grey=1;
}
Sleep(100);
}
}
int AddIn_main(int isAppli, unsigned short OptionNum)
{
unsigned long buffer1[] = {0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000
000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000
0,0x00000000,0x00000000,0x00000000,0x00000000,0x00003000,0x00000000,0x00000000,0x
00030000,0x0000F800,0x00600000,0x00000000,0x00038000,0x0001D800,0x00780000,0x0000
0000,0x0007E000,0x00079C00,0x004E0000,0x000FFC00,0x00067000,0x000E0C00,0x00430000
,0x003E1E00,0x000C3E00,0x007C3C00,0x00C30000,0x00F80780,0x000C0F00,0x00F07800,0x0
0C30000,0x01E001C0,0x001801C0,0x0381C000,0x00820000,0x038000E0,0x0038E1E0,0x0F078
000,
0x00820000,0x070FF070,0x0030F070,0x1C0E0000,0x00820000,0x061C3830,0x0061FC3
8,0x783C0780,0x00820000,0x0C381C18,0x00E18E0C,0x70F00F80,0x00820070,0x1C600618,0x
00C3070C,0x30E03CC0,0x018600CC,0x18E0070C,0x0083018E,0x186070C0,0x01060186,0x18C0
030E,0x01860086,0x1C33C1E0,0x01040301,0x10C00186,0x038E0086,0x0C3F87C0,0x01040E03
,0x10C00186,0x030C0086,0x061E0F00,0x0104180C,0x10C00082,0x061C0086,0x06183C00,0x0
1083018,0x10C000C2,0x06180186,0x03007000,0x01086030,0x18E000C2,0x0C380186,0x0381E
007,
0x0208C060,0x186000C2,0x1C30018E,0x0183800F,0x020980C0,0x1C6000C2,0x1860030
C,0x01830039,0x820B0100,0x0C300086,0x30E0070C,0x00C300F1,0x861E0700,0x0C380186,0x
60C00618,0x00E181C1,0xC61C0C00,0x061C038C,0x60F00C38,0x0061CF87,0xC4101800,0x070F
070C,0x70381C30,0x0030DC0E,0x04003000,0x0303FE18,0x3C1F7870,0x0038F83C,0x04006000
,0x0181F838,0x0F07F0E0,0x001860F0,0x0400C000,0x01C00070,0x038001C0,0x000C01C0,0x0
4030000,0x006001C0,0x01F00380,0x000C0F80,0x04060000,0x003C0F80,0x00380700,0x00061
C00,
0x060C0000,0x000FFE00,0x001FFE00,0x00067800,0x03980000,0x0007F800,0x0003F00
0,0x0003E000,0x00E00000,0x00000000,0x00000000,0x0003C000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000
000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000
0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000};
unsigned long buffer2[] = {0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000
000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000
0,0x00000000,0x00000000,0x00000000,0x00000000,0x00003000,0x00000000,0x00000000,0x
00030000,0x0000F800,0x00600000,0x00000000,0x00038000,0x0001F800,0x00780000,0x0000
0000,0x0007E000,0x0007FC00,0x007E0000,0x000FFC00,0x0007F000,0x000FFC00,0x007F0000
,0x003FFE00,0x000FFE00,0x007FFC00,0x00FF0000,0x00FFFF80,0x000FFF00,0x00FFF800,0x0
0FF0000,0x01FFFFC0,0x001FFFC0,0x03FFC000,0x00FE0000,0x03FFFFE0,0x003FFFE0,0x0FFF8
000,
0x00FE0000,0x07FFFFF0,0x003FFFF0,0x1FFE0000,0x00FE0000,0x07FC3FF0,0x007FFFF
8,0x7FFC0780,0x00FE0000,0x0FF81FF8,0x00FF8FFC,0x7FF00F80,0x00FE0070,0x1FE007F8,0x
00FF07FC,0x3FE03FC0,0x01FE00FC,0x1FE007FC,0x00FF01FE,0x1FE07FC0,0x01FE01FE,0x1FC0
03FE,0x01FE00FE,0x1FF3FFE0,0x01FC03FF,0x1FC001FE,0x03FE00FE,0x0FFFFFC0,0x01FC0FFF
,0x1FC001FE,0x03FC00FE,0x07FFFF00,0x01FC1FFC,0x1FC000FE,0x07FC00FE,0x07FFFC00,0x0
1F83FF8,0x1FC000FE,0x07F801FE,0x03FFF000,0x01F87FF0,0x1FE000FE,0x0FF801FE,0x03FFE
007,
0x03F8FFE0,0x1FE000FE,0x1FF001FE,0x01FF800F,0x03F9FFC0,0x1FE000FE,0x1FE003F
C,0x01FF003F,0x83FBFF00,0x0FF000FE,0x3FE007FC,0x00FF00FF,0x87FFFF00,0x0FF801FE,0x
7FC007F8,0x00FF81FF,0xC7FFFC00,0x07FC03FC,0x7FF00FF8,0x007FCFFF,0xC7FFF800,0x07FF
07FC,0x7FF81FF0,0x003FDFFE,0x07FFF000,0x03FFFFF8,0x3FFF7FF0,0x003FFFFC,0x07FFE000
,0x01FFFFF8,0x0FFFFFE0,0x001FFFF0,0x07FFC000,0x01FFFFF0,0x03FFFFC0,0x000FFFC0,0x0
7FF0000,0x007FFFC0,0x01FFFF80,0x000FFF80,0x07FE0000,0x003FFF80,0x003FFF00,0x0007F
C00,
0x07FC0000,0x000FFE00,0x001FFE00,0x0007F800,0x03F80000,0x0007F800,0x0003F00
0,0x0003E000,0x00E00000,0x00000000,0x00000000,0x0003C000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000
000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000
0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x
00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000
0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0
0000000,0x00000000};
GrayLinkBuffers(&buffer1, &buffer2);
GrayInit(grey, grey);
while(IsKeyDown(KEY_CTRL_EXIT) != 1) // Don't use GetKey()....
{
if(IsKeyDown(KEY_CTRL_SHIFT)==1){
GrayEnd();
set_gray();
}
GrayLinkBuffers(&buffer1, &buffer2); // Tells Revolution-FX what are the two buffers you want to use
GrayInit(grey, grey); // Initializes the Revolution-FX grayscales engine.
}
Reset_Calc(); // Resets the CPU
return 1;
}
#pragma section _BR_Size
unsigned long BR_Size;
#pragma section
#pragma section _TOP
int InitializeSystem(int isAppli, unsigned short OptionNum)
{
return INIT_ADDIN_APPLICATION(isAppli, OptionNum);
}
#pragma section
We really need a website for the Revolution-FX project. A place for tutorials, documentation and such....