PDA

View Full Version : Error when compiling



ShadoW2004
10-10-2004, 07:31 AM
I downloaded sourses from www.mados.tk and tryed to compile it...but have error :(

dvirus666
10-10-2004, 02:39 PM
You need to edit the 'memmap_embed' for your model.

Goto DATA folder and select the model you are working on and open the 'memmap_embed' with a text editor.
At this point change this LENGTH = 200K to LENGTH = 265K (or higher if you have changed mados).

ShadoW2004
10-10-2004, 05:43 PM
You need to edit the 'memmap_embed' for your model.

Goto DATA folder and select the model you are working on and open the 'memmap_embed' with a text editor.
At this point change this LENGTH = 200K to LENGTH = 265K (or higher if you have changed mados).


Thank you dvirus666, all works good now!

Can you say me where I can wind tone whos played when we starting copyrights in MadOS or in Snake3 when writing "ready.."?

joci2000
12-10-2004, 09:38 AM
Thank you dvirus666, all works good now!

Can you say me where I can wind tone whos played when we starting copyrights in MadOS or in Snake3 when writing "ready.."?

hi the mados start sound is in the main.c
here:

char intro1[] = "cdefga";
char intro1_time[] = { 2, 2, 2, 2, 2, 2 };
buzzer_tones_t tone_intro1;
tone_intro1.tone_list = intro1;
tone_intro1.duration_list = intro1_time;
tone_intro1.octave_list = "\x00\x00";
tone_intro1.volume = 20; //lol
tone_intro1.duration_fixed = 0;
tone_intro1.octave_fixed = 1;
tone_intro1.pause_fixed = 1;
tone_intro1.interrupt = "\x00\x00";
tone_intro1.break_on_keypress = 1;
buzzer_play_tones ( &tone_intro1 );
ani_stop ( );

ani_play ( &ani_02_r, 0, 0, 100, 0, 0 );
char intro[] = "bagfed";
char intro_time[] = { 2, 2, 2, 2, 2, 2 };
buzzer_tones_t tone_intro;
tone_intro.tone_list = intro;
tone_intro.duration_list = intro_time;
tone_intro.octave_list = "\x00\x00";
tone_intro.volume = 20;
tone_intro.duration_fixed = 0;
tone_intro.octave_fixed = 1;
tone_intro.pause_fixed = 1;
tone_intro.interrupt = "\x00\x00";
tone_intro.break_on_keypress = 1;
buzzer_play_tones ( &tone_intro );
ani_stop ( );


&the snake sound is in the include/apps/snd_snake.h

ShadoW2004
12-10-2004, 06:02 PM
No, I need sound what is playing when we executing "Copyrights" from menu and when we starting new game in "Snake |||" it is writing on screen "Ready..."

krisha
12-10-2004, 09:30 PM
search for the text that appears in the menu :)
you will find: lcd_type_text_2 ( 0, 0 * 8 + 1, 5, " copyright", 1 );

it starts with lcd, so we assume to find it in lcd.c ...
and found it:

// writes a text like a human at a typewriter with keypress sound
void
lcd_type_text_2 ( int x, int y, int speed, unsigned char *text, int sc )

examine the routine, found:
buzzer_snd_play ( snd_key, sizeof ( snd_key ) );

now we know, it's a header file, so let's look to the includes:
#include <hw/snd_keypress.h>

here you have it ;)

there are two ways to play sounds, one that play "wave" files (buzzer_snd_play) and one that play melodies ( buzzer_play_tones ).

the buzzer_snd_play could have some problems because it's very time critical and MADos supports (now) multitasking as you know ;)

ShadoW2004
13-10-2004, 03:31 AM
Cool, thank you, Krisha...

buzzer_play_tones it plays melodys in cpdpcpdpepfpgpaphp format?
And it is posible to play converted .wav files from speaker?

krisha
13-10-2004, 11:13 AM
no all sounds only with buzzer :(

kraze1984
19-10-2004, 10:47 AM
krisha, hi!

Could you suggest me what to do. I inserted the dct2 calc in MADos from this forum, changed it to fit MADos, but while compiling for ARM i get the following errors:


apps/dct2.o: In function `calcular_codigo':
apps/dct2.o(.text+0x16a): undefined reference to `__umodsi3'
apps/dct2.o(.text+0x292): undefined reference to `__umodsi3'
collect2: ld returned 1 exit status


What could be umodsi3 ? (P.S. i have the latest MADos with changes).

krisha
20-10-2004, 12:30 PM
kraze1984, try to get a new version from CVS.

i fixed div/mod bug only for signed div/mod only. g3gg0 fixed this for unsigned a day later, so it should work with actual CVS. if not, please replay ;)

kraze1984
21-10-2004, 12:34 PM
kraze1984, try to get a new version from CVS.

i fixed div/mod bug only for signed div/mod only. g3gg0 fixed this for unsigned a day later, so it should work with actual CVS. if not, please replay ;)

Ok, it is compliling now.

I have another question: what type of variable should be the variable in expression:
ui_draw_scrolltext (x) ?
And how can i output some text and a char variable in this expression?

grrreetzz

krisha
22-10-2004, 07:46 PM
Ok, it is compliling now.

I have another question: what type of variable should be the variable in expression:
ui_draw_scrolltext (x) ?
And how can i output some text and a char variable in this expression?

grrreetzz

should be a pointer to a string (terminating with 0x00). ui_draw_scrolltext is made for longer texts...

if you just want to output some chars use lcd_render_text and if you want to convert a char variable, you could use sprintf and then display it with lcd_render_text. there are also some converting functions in lib.c

kraze1984
24-10-2004, 05:38 PM
should be a pointer to a string (terminating with 0x00). ui_draw_scrolltext is made for longer texts...

if you just want to output some chars use lcd_render_text and if you want to convert a char variable, you could use sprintf and then display it with lcd_render_text. there are also some converting functions in lib.c

Thank you very much for advice.
After 1 night i got working the 3 unlockers. Now i don't know how to make working the fourth.

There is one 'atol' function that is missing in MADos. How can i bypass this issue or how can i convert the alphanumerical chars to long integer?

Thank you in advance for your reply.
grreetzz

krisha
25-10-2004, 03:46 AM
There is one 'atol' function that is missing in MADos. How can i bypass this issue or how can i convert the alphanumerical chars to long integer?

the atol (and strtol) functions are currently not implemented in MADos.
until these functions don't exist, it isn't possible.

maybe i will add them in the next days.

edit: hmm, there's already an userinterface function that converts a entered number to an integer (ui_getnumber ( char *ptext, unsigned char max_length, unsigned char min_length ) ), but i will try to include a simple atol now...

edit2: atol is added, grab actual cvs :)

kraze1984
29-10-2004, 09:41 AM
the atol (and strtol) functions are currently not implemented in MADos.
until these functions don't exist, it isn't possible.

maybe i will add them in the next days.

edit: hmm, there's already an userinterface function that converts a entered number to an integer (ui_getnumber ( char *ptext, unsigned char max_length, unsigned char min_length ) ), but i will try to include a simple atol now...

edit2: atol is added, grab actual cvs :)

:-) :-) :-) Cool, thanks alot for atol :-) :-) :-)

I sent to g3gg0 the sources for he could add them to CVS.

I have still some problems, cosmetical:
When i output texts to ui_draw_scrolltext, i get latin alphabet be4 my text. Here's the code:


MENU_CALLBACK ( dct2sec_calc )
{

char sec_code[6];
unsigned char tempstring[26];
unsigned char sec_value[256];

MENU_ONLY_SELECT;

sec_code[5] = 0;
security_code (dct2_phoneimei, sec_code);

sprintf (tempstring, "Sec. Code: ");
strcat ( sec_value, tempstring);
strcat ( sec_value, sec_code);
ui_draw_scrolltext (sec_value);

}


First it calces the code with security_code func, then generates the string then outputs it with ui_draw_scrolltext. it seems that somewhere here the phone puts in the tempstring variable latin alphabet. What could be the problem?