gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Graphing project for DS

#139616 - calcprogrammer1 - Sat Sep 08, 2007 5:30 am

I thought the DS would be a good platform to make a native graphing application (I know there are graphing calculator emulators, but something that could utilize all 256x192 pixels would be nice). I got it to plot the X and Y axes right, using a set of variables for window range. Now I'm trying to get it to plot the function, but I'm confused as to how to translate the Y position from a position on a graph to a position on a screen. Since the screen starts at 0 and gets higher as it goes down, that makes graphs draw backwards.

Here's my code (PAlib):

Code:

// PALib Template Application

// Includes
#include <PA9.h>       // Include for PA_Lib

//window variables
float Xmin = -10;
float Xmax = 10;
float Xscl = 1;
float Ymin = -10;
float Ymax = 10;
float Yscl = 1;
float AxesOn = 1;

float Xstep;
float Ystep;

//Function defines
void setupWindow();
float calcAbsoluteValue(float);
void drawFunction();
int main()
{
   PA_Init();    // Initializes PA_Lib
   PA_InitVBL(); // Initializes a standard VBL

   PA_SetBgPalCol(1, 0, PA_RGB(0, 0, 0));   // set the top screen color to black
   

   PA_InitText(0,3);

   PA_Init16bitBg(1, 3);
   while (1)
   {
      setupWindow();
      drawFunction();
      PA_WaitForVBL();
   }
   
   return 0;
}

void setupWindow(){
   float Xspan = Xmax - Xmin; //figures out the total span of the window
   Xstep = (256 / Xspan);   //figures out step by dividing 256 (screen width) by span

   float Yspan = Ymax - Ymin; //same as above, but for Y
   Ystep = (192 / Yspan);   //same as above, but for Y, and screen height is 192

   if(AxesOn == 1){
      if( 0 > Xmin && 0 < Xmax){
         float temp = calcAbsoluteValue(Xmin) * Xstep;
         PA_Draw16bitLine(1,temp,0,temp,191,PA_RGB(31,31,31));
         PA_OutputText(0,1,1,"%f %d",temp,Xstep);
      }
      if( 0 > Ymin && 0 < Ymax){
         float temp = calcAbsoluteValue(Ymin) * Ystep;
         PA_Draw16bitLine(1,0,temp,255,temp,PA_RGB(31,31,31));
         PA_OutputText(0,1,2,"%f %d",temp,Ystep);
      }
   }
}
void drawFunction(){
   for(int ctr = 0;ctr < 256;ctr++){
      float x = Xmin + (ctr / Xstep);
      float y = x;
      if( y > Ymin && y < Ymax ){
         
         PA_Put16bitPixel(1,ctr,y,PA_RGB(31,31,31));
   }
}






float calcAbsoluteValue(float num){
   if(num > 0){
      return num;
   }else{
      return -num;
   }
}


I'm using float because I want it to be accurate (it doesn't need millisecond precise speed when it's only rendering one image every so often, or it will once I get around to an interface, if I ever get there).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139636 - tepples - Sat Sep 08, 2007 2:08 pm

float: Here, use of the 'float' or 'double' types is appropriate. Common graphing calculators run 8-bit CISC microprocessors (commonly Zilog Z80 or Freescale MC68000) at 10 MHz or less, and they too handle floats in software. The DS ARM9 CPU is 67 MHz on a 33.5 MHz front side bus. Unless GCC's float library is horribly unoptimized, there should not be a speed problem.

PA_Put16bitPixel: you might want to consider drawing a vertical line from the last seen y position to this y position, which will help once you start plotting functions whose derivative (slope) is greater than 1. If PALib doesn't have a vertical line function, they're dead easy to write.

y = x: This is what you currently hardcode as the function to be plotted. What scripting language do you lpan on using to allow the user to define functions?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#139654 - calcprogrammer1 - Sat Sep 08, 2007 5:15 pm

tepples wrote:
float: Here, use of the 'float' or 'double' types is appropriate. Common graphing calculators run 8-bit CISC microprocessors (commonly Zilog Z80 or Freescale MC68000) at 10 MHz or less, and they too handle floats in software. The DS ARM9 CPU is 67 MHz on a 33.5 MHz front side bus. Unless GCC's float library is horribly unoptimized, there should not be a speed problem.


It hasn't been a problem so far, I have read a lot of posts saying that float is bad, and to use fixed point instead, but for a graphing system, accuracy is more important than speed (my TI 84 Plus SE w/ 15MHz Z80 graphs really slowly).

Quote:

PA_Put16bitPixel: you might want to consider drawing a vertical line from the last seen y position to this y position, which will help once you start plotting functions whose derivative (slope) is greater than 1. If PALib doesn't have a vertical line function, they're dead easy to write.


It does have a line function, as used for the axes, but for vertical I just set the Y values to 0 and 191 and for horizontal I set the X values to 0 and 255. I still don't get this, do you mean instead of drawing a pixel for each point, to draw a line from the last known point to the new point, store the new point as the last point, and calculate the new point, and repeat? Now that you mention it, I think that's how the graphing calculators work, because you can turn down the resolution so it will graph faster, and it will have many lines instead of smooth curves.

Quote:
y = x: This is what you currently hardcode as the function to be plotted. What scripting language do you lpan on using to allow the user to define functions?


I am unsure how to go about a user defined function. The calculator has a function called exec() (maybe eval(), can't remember) that evaluates a string. I would like a function similar to that, but if there's a library out there that can already do this, and is open source, I'd like to just use that.



Also, how do you do things such as sin(), cos(), and tan() in the DS, PAlib's functions are weird, returning 512 degrees or something, I want the real 360 degrees and/or radian measure a real calculator would give.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139659 - tepples - Sat Sep 08, 2007 6:29 pm

calcprogrammer1 wrote:
I am unsure how to go about a user defined function. The calculator has a function called exec() (maybe eval(), can't remember) that evaluates a string. I would like a function similar to that, but if there's a library out there that can already do this, and is open source, I'd like to just use that.

There is Lua. Other people sing its praises, but I haven't tried it yet.

Quote:
Also, how do you do things such as sin(), cos(), and tan() in the DS, PAlib's functions are weird, returning 512 degrees or something, I want the real 360 degrees and/or radian measure a real calculator would give.

For float math, use #include <math.h> and link with -lm (libm.a).

In general, you could try prototyping this whole thing on a PC, where the publicly available debugging tools are more mature, and then porting it to DS once most of the calculation and graphing logic are stable.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#139696 - nornagon - Sun Sep 09, 2007 12:25 am

You could see what gnuplot (or similar) does and steal that. You should do surface plotting, too!

#139713 - HyperHacker - Sun Sep 09, 2007 6:41 am

calcprogrammer1 wrote:
It hasn't been a problem so far, I have read a lot of posts saying that float is bad, and to use fixed point instead, but for a graphing system, accuracy is more important than speed (my TI 84 Plus SE w/ 15MHz Z80 graphs really slowly).
Float is only bad because it's slow without an FPU. That shouldn't matter for a calculator.

Quote:
I still don't get this, do you mean instead of drawing a pixel for each point, to draw a line from the last known point to the new point, store the new point as the last point, and calculate the new point, and repeat?

I think what he means is draw your graphs using lines, not pixels. For example, if you do this (pseudo-C):
Code:
y = 0;
for(x=0; x=256; x++)
{
   DrawPixel(x, y);
   y += 5;
}
You won't end up with a nice graph; you'll have a broken line. Instead, you should do something like this:
Code:
oldx = 0;
oldy = 0;
y = 0;
for(x=0; x=256; x++)
{
   DrawLine(oldx, oldy, x, y);
   oldx = x;
   oldy = y;
   y += 5;
}
That way you'll have a nice smooth graph.
_________________
I'm a PSP hacker now, but I still <3 DS.

#139726 - calcprogrammer1 - Sun Sep 09, 2007 3:18 pm

That makes sense, but the thing I am stuck with is how to graph the Y values correctly.

Code:

DS:

0,0 ----------------------------------> Positive X
|
|
|
|
|
|
|
V Positive Y

Graph:

                               ^ Positive Y
                               |
                               |                     
                               |
Negative X <------------------------------------> Positive X
                               |
                               |
                               |
                               V Negative Y


The X graphing is already implemented, but I'm unsure of how to graph the Y correctly. I have Ymin (bottom), Ymax (top), Yspan (top minus bottom), Ystep (amount of pixels per 1 unit, it's 192 / Yspan I think).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139740 - HyperHacker - Sun Sep 09, 2007 6:27 pm

You mean your graphs are upside-down because 0,0 on the DS is top left and you want it to be bottom left? That's simple, draw your pixels at X, 192 - Y. >_>
_________________
I'm a PSP hacker now, but I still <3 DS.

#139751 - calcprogrammer1 - Sun Sep 09, 2007 8:12 pm

That and also draw negative Y values correctly, and to a -10 to 10 scale.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139764 - Cearn - Mon Sep 10, 2007 12:04 am

What you're trying to do here is map one coordinate space onto another. Say you have spaces P and Q (for the logical graph coordinates and the screen coordinates, respectively). Let p=(px, py) and q=(qx,qy) be points in these two systems. Since these are linear systems, the coordinates of p and q will be related via these equations:

qx = ax*px + bx
qy = ay*py + by

Now take any two pairs of points in each system that map onto each other: p1q1 and p2q2. For the x coordinate, you will have:

qx1 = ax*px1 + bx
qx2 = ax*px2 + bx

and using a few simple substitutions you can find ax and bx:

ax = (qx2-qx1) / (px2-px1)
bx = qx1 - (qx2-qx1)/(px2-px1)*px1

Finding ay and by works much the same way.

The nice thing is that this process works regardless of what the points actually are, and it works for in both ways. Now, in your case you already know the two pairs of points: top-left and bottom right. For the top-left (q1 = (0,0)) you have p1 = (-10, 10); for the bottom right, it's q2 = (256,192) and p2 = (10, -10). Now all you have to do is fill in the numbers. Your setupWindow() already uses a special-case of the equations above, the math for the points of the graph itself is practically the same.

For practical use, it may help to keep the mapped points in memory somewhere and create two mapping functions that convert from logical→screen coordinates vice versa. You're already halfway there in terms of variables: Xmin, Ymin etc are essentially the logical part of the mapping, and Xstep and Ystep are what I've called ax and ay. Add the screen-part and the b's and you have enough for coordinate transformations for anything. Do it on the PC first to see if you got the math right and then port it. I'd even go as far as to say do it in a spreadsheet program first; they're practically made for this stuff.

For mode on how this stuff works, try googling for 'mapping mode'.

#139777 - calcprogrammer1 - Mon Sep 10, 2007 2:31 am

Thanks for your post, Cearn, it is very informative...now I'll try to implement it.

Edit:

Implemented it, but it was drawing negative, so I added 192 - (the qy expression) to make it draw correctly, and I got this:

[Images not permitted - Click here to view it]
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139787 - calcprogrammer1 - Mon Sep 10, 2007 4:45 am

Here's some more stuff I've done, added math.h to the includes so I could use some functions, and (hard coded, recompiling each time) produced these:
[Images not permitted - Click here to view it]

Now I need to know if there's a library that can execute a string, such as

Y= "(x+3)+5"
Y= "sin(x)"
Y= "sin(x)+1"
Y= "x^3"

It would need to account for parentheses as well, so that 1+(5*2) would equal 11, not 12 (where you add 1 and 5 to get 6, then *2 to get 12). I've seen libraries for PC apps, but would they implement into a DS application or not?
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139801 - nornagon - Mon Sep 10, 2007 10:06 am

Looking good. Now make it understand asymptotes and unmapped x-values (also multiple-mapped x-values, as in x = y?). :D

#139831 - josath - Mon Sep 10, 2007 5:06 pm

calcprogrammer1 wrote:
It would need to account for parentheses as well, so that 1+(5*2) would equal 11, not 12 (where you add 1 and 5 to get 6, then *2 to get 12). I've seen libraries for PC apps, but would they implement into a DS application or not?


If it's a portable library, with source code, it should be simple to port, if it doesn't have any OS-specific stuff.

#139832 - kusma - Mon Sep 10, 2007 5:12 pm

calcprogrammer1 wrote:
Now I need to know if there's a library that can execute a string, such as
Check out: http://www.arstdesign.com/articles/expression_evaluation.html

#139930 - Corsix - Tue Sep 11, 2007 8:13 pm

Lua is definately a viable choice for this. It has the upside of users potentially being able to define their own functions for use in graphs, and other such things that only a true language can give.
Code:
   viewport_t oViewport;
   oViewport.fXMin = -8.0f;
   oViewport.fXMax =  8.0f;
   oViewport.fYMin = -6.0f;
   oViewport.fYMax =  6.0f;

   equation_t oEquation[4];
   LuaCalc oCalc;
   oCalc.newEquation(&oEquation[0], "x = sin(y)", g_iColours[0]);
   oCalc.newEquation(&oEquation[1], "y = tan(x)", g_iColours[1]);
   oCalc.newEquation(&oEquation[2], "y = min(sin(x), cos(x))", g_iColours[2]);
   oCalc.newEquation(&oEquation[3], "x < y", g_iColours[3]);
   
   renderGraph(&oViewport, oEquation, 4);

Onscreen result

#139955 - calcprogrammer1 - Wed Sep 12, 2007 1:00 am

I looked into Lua but I don't want to write a script, I'm looking to write a real, .nds application, not a Lua script.

So, now I'm trying to implement an interface, and it's being stupid. I have 10 sprites, 32x64 (2 frames, one normal, one selected), 256 colors. If I load them all and draw them to the screen, it gives me an error about lack of RAM...how do you go about fixing this stupid thing? The images are all buttons, with a gradient background.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139960 - calcprogrammer1 - Wed Sep 12, 2007 2:22 am

Ok, I'm trying to use a library called ExprEval, written in C, with my program. When I compile it, I get a bunch of errors such as:

error: pasting "__expr_sin" and "{" does not give a valid preprocessing token

In the library, there's a bunch of:

EXPR_FUNCTIONSOLVER(__expr_sin)
{
...
}

where it defines functions I guess, but compiling it makes each one give an error.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#139961 - sajiimori - Wed Sep 12, 2007 2:49 am

Tepples and Corsix were not suggesting that you write your DS application in Lua. The idea is to have your DS program provide Lua to users, as a way for them to program your calculator.

It's a perfectly viable option, and not especially hard to implement.

#139976 - Corsix - Wed Sep 12, 2007 7:56 am

Go to lua.org, download the latest one, and copy the stuff from lua-5.1.2\source into your source/include folders. You may want to pop into luaconf.h and change it from using doubles to using floats. To then use lua in your program, you first need to include it:
Code:
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
For example, the LuaCalc constructor calls luaL_newstate to create a lua instance. The newEquation function calls lua_load to load the string as a chunk (a function). It then does some magic to find out what the subject of the equation was, and finally drops the relevant callbacks into an equation_t structure. These callbacks call lua_pcall to execute the chunk and get a result. Finally, the LuaCalc destructor calls lua_close to free the memory used by lua.

#140019 - calcprogrammer1 - Wed Sep 12, 2007 8:58 pm

Ok, I'll try using Lua, I never heard of it but I guess it has math functions (?).

My other problem is for the interface, I had a problem loading different sprites for each button (1,2,3,4,5,6,7,8,9,0,.,+,-,/,*,=,etc) because the memory ran out, so I have blank buttons. How would I go about drawing a label on each button. I'd like to use 16c Text but since that is a background, sprites usually draw in front of backgrounds.

I've added what you told me to to the includes (I put the Lua files in /source), then I added this to my main loop:

int main()
{
PA_Init();
PA_InitVBL();

PA_SetBgPalCol(1,0,PA_RGB(0,0,0));
PA_Init16bitBg(1,3);
initMenu();
while(1)
{
checkMenu();
viewport_t oViewport;
oViewport.fXMin = -8.0f;
oViewport.fXMax = 8.0f;
oViewport.fYMin = -8.0f;
oViewport.fYMax = 8.0f;
equation_t oEquation[4];
LuaCalc oCalc;
oCalc.newEquation(&oEquation[0], "x = sin(y)", g+iColours[0]);
renderGraph(&oViewport, oEquation, 4);
PA_WaitForVBL();
}
}

but I get a bunch of stuff like:

'viewport_t' was not declared in this scope, 'oViewport was not declared in this scope, etc.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140030 - Corsix - Wed Sep 12, 2007 10:31 pm

Thats because viewport_t, equation_t, LuaCalc and renderGraph are my own creations. I can share the code if you want.

#140042 - calcprogrammer1 - Thu Sep 13, 2007 12:23 am

All I want is a function that I can use to evaluate strings, but it needs to support at least an X variable, so maybe like:

y = evalString("sin(x)+5(cos(X)^2)",x)

where the function would be like:

evalString(char* expression, float x){
...
...
...
}

the X variable would be used any place there's an X in the equation.

Could something along those lines be done with Lua (or anything else), and if you can, source code or an example would be nice, I've never used Lua so I have no clue what I'm supposed to do here.

I already have graphing, as you've seen in other examples, so I want to just use the one I already have, but I need an expression evaluator.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140045 - kusma - Thu Sep 13, 2007 12:38 am

calcprogrammer1 wrote:

evalString(char* expression, float x)

To be honest, I'd rather do it like this:
Code:
struct expression *parseExpression(const char *string);
float evalExpression(struct expression, float x);

This is because parsing text per iteration might be a little too slow, even for a graphic calculator (think navigation). Parse first, build a RPN-structure for the expression, and evaluate that given a set of constants. Look at the link I provided on the previous page for details on how to implement this.

#140054 - tepples - Thu Sep 13, 2007 1:25 am

calcprogrammer1 wrote:
My other problem is for the interface, I had a problem loading different sprites for each button (1,2,3,4,5,6,7,8,9,0,.,+,-,/,*,=,etc)

You could just make a full size alphanumeric keyboard. You'll need to anyway so that the user can enter formulas.

Quote:
because the memory ran out, so I have blank buttons. How would I go about drawing a label on each button. I'd like to use 16c Text but since that is a background, sprites usually draw in front of backgrounds.

Sprites with Z level 1 draw behind background layers with Z level 0. ("Z level" and "priority" are the same thing.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#140060 - calcprogrammer1 - Thu Sep 13, 2007 2:07 am

I thought a good interface system would be a menu like system like graphing calculators give you, where you have the number buttons (big enough that you could tap with a fingertip if you want) and a bunch of side buttons, like Trig, Math, Test, Num, etc, where hitting Trig would bring up things like sin(), cos(), tan(), sec(), csc(), and cot() and Math would bring up things like iPart(), fPart(), int(), abs(), sqrt(), then I could always add a tab that brings up the PA keyboard if you choose to use that.

Does anyone know how to use Lua to evaluate an expression? I get the idea of first converting it to a struct, then re-evaluating it, but I'd need commands that can do this. Is there anything already made (sounds really hard, considering I've never heard of RPN or anything like that), else my interpretation would be really limited and simple (I could probably do a simple evaluation system like mentioned on that page, but parentheses would be confusing, as would functions).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140098 - Corsix - Thu Sep 13, 2007 4:00 pm

http://www.corsix.org/misc/GraphPlotter.zip

Included is the compiled .nds (enter equations like "y = x^2" and press enter), along with source code. See graph.h for definitions of the data structures, and LuaCalc.cpp for use of lua.

#140146 - calcprogrammer1 - Thu Sep 13, 2007 9:56 pm

Thanks for that, it works pretty well in the example, though I'm confused on how to implement it.

How do you actually read out a value? Say I make a new equation like:

oCalc.newEquation(&oEquation[0], "y=sin(x)", g_iColours[0]);

and I want to plug in for X to find Y, so how would I go about doing that? I have absolutely no clue what's going on in the graph.h, with all the -> stuff. I'm looking to do something in simple C and PAlib, but if I can figure out how this works I'd use it.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140150 - Corsix - Thu Sep 13, 2007 10:51 pm

Once you have an equation_t structure filled out(eg, by calling oCalc.newEquation), you can use it like so:
Code:

float x,y;
if(oEquation[0].m_eSubject == equation_t::S_X) // x = ...
{
    x = oEquation[0].m_fnPlotFunction(y, oEquation[0].m_pToken);
    draw_point(x,y);
}
if(oEquation[0].m_eSubject == equation_t::S_Y) // y = ...
{
    y = oEquation[0].m_fnPlotFunction(x, oEquation[0].m_pToken);
    draw_point(x,y);
}
if(oEquation[0].m_eSubject == equation_t::S_Mixed) // inequality
{
    if(oEquation[0].m_fnPlotFunctionMixed(x, y, oEquation[0].m_pToken))
        draw_point(x,y);
}

#140184 - calcprogrammer1 - Fri Sep 14, 2007 2:56 am

>.< this is getting annoying. Why can't I find just a simple evaluator...everything has to be all complex and stuff!

I added Lua to my program like this:
Code:

#include "LuaCalc.h"

equation_t oEquation[1];
LuaCalc oCalc;

float evaluateString(char* expression, float x){
     oCalc.newEquation(&oEquation[0],expression,PA_RGB(31,31,31));
     float y = oEquation[0].m_fnPlotFunction(x,oEquation[0].m_pToken);
     return y;
}


So, I go to compile, and I get this during Linking...

Code:
c/devkitPro/Projects/graphing_example/graphing_example/source/eval.h(3): undefined reference to 'equation_t::equation_t()'


How can I fix this...at this rate it may just be best to start from scratch and write a simple evaluation thing...though it doesn't sound simple at all.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140229 - nornagon - Fri Sep 14, 2007 2:10 pm

'undefined reference' means you forgot to link something into the final executable. (Maybe you even forgot to compile it!)

#140257 - calcprogrammer1 - Fri Sep 14, 2007 9:02 pm

At that point..I have no clue...I clicked Rebuild and it did all the compiling stuff, then it gave me that. Is it something to do with the makefile? PAlib uses a weird makefile, so putting libraries in with it is really a pain, that's why I'm looking for a simple, one file method of doing this.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140258 - Corsix - Fri Sep 14, 2007 9:08 pm

equation_t has a default constructor in graph.cpp, which I'm guessing you forgot to copy into one of your source files

#140260 - calcprogrammer1 - Fri Sep 14, 2007 9:14 pm

Ah, I only included graph.h. I'll put graph.cpp in and see if it works.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140838 - calcprogrammer1 - Thu Sep 20, 2007 3:16 am

I finally got my computer set back up, and I found the info I needed out of graph.c, just copied it into the other file, and it worked :)

Now to code an interface, I've already made most of the icons, but now to code.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#140841 - Ant6n - Thu Sep 20, 2007 4:26 am

I would use flex to parse expressions and build expression trees.
the expression tree then would then represent a function, or just a mathematical expression (a function is just a parametrized expression, i.e. one with a variable in it)