PDA

View Full Version : [devel] MADos



g3gg0
03-09-2003, 01:51 AM
hi,
this is an development environment for creating own demos or even
games and applications for a 3310/3330 phone like krisha and i made.
therein is everything u need to compile your own flash... (compiler, editor, tools)
the code is plain C

you already can inject MADos into n*kia flashes..

thanx to uniquephones for the webspace...
http://www.uniquesw.com/g3gg0/MADos.exe


how to proceed:
- run MADos.exe and decompress to D:\
- run cygwin_d.reg
- now run the .bat in the cygwin dir

you should see the bash shell...
try to run 'mc' a norton commander clone..
with this tool you can edit your C code with syntax hilghlighting
if u want to decompress it to C:\ u have to run the cygwin_c.reg AND
edit the .bat to fit the pathes

if you cannot manage the installation, then you are probably not
the right one for this development environment, sorry....
if you have some problems with cygwin, please contact a friend
who knows a little about linux.. he will know how to help!
my mailbox is surely not the right place to ask about things like that!


have phun!

wumpus
03-09-2003, 02:39 AM
Hmmm now this is open I'm thinking about opening my DCT3 reverse engineering information site for public as well, but the layout needs some fixes still (I could use a logo and stuff) and I have enough other things to do before that.

<M457>
03-09-2003, 02:14 PM
tnx it works very fine for me!
ps: your snake is very cool :)

bye

wumpus
03-09-2003, 02:30 PM
tnx it works very fine for me!
ps: your snake is very cool :)

bye
It should work on 3310 3330 and 3410 AFAIK, those seem to have mostly the same architecture.
And probably others in the DCT3 series... (although those with a different display might give trouble)

g3gg0
03-09-2003, 03:40 PM
jepp, but i need datasheets for the different LCD models
i have just the datasheet for one philips lcd (pcf8... ?)
but the others seem to be different... dont know yet what this is.. :(

wumpus
03-09-2003, 04:01 PM
Well my tactic would be to download the firmware of that phone, localize the to_screen method and see if it is substantially different... if it isn't, for example some other larger model from philips it shouldn't be too hard to implement

<M457>
03-09-2003, 04:50 PM
to make it working for 3330 you have to edit crt0.s as follow:

mov r0, #0x6B --> mov r0, #0x63

now you can compile and flash starting ONLY from 0x200000 :)
otherwise you nedd to flash ALSO from 400000
I think this works on 3410 too.

byE

g3gg0
03-09-2003, 04:53 PM
mov r0, #0x6B --> mov r0, #0x63
how does it come you found it out?
checked the 3330 firmware?

whoo thanx man :)

wumpus
03-09-2003, 05:54 PM
That means just by changing the value of I/O 0x73 from 0x6B to 0x63 you make it work? It still works on 3310 with that change?
Wow.. one little bit, wish I had a 3330 or 3410 to check it..



76543210
0x73 01101011 0x6B
0x73 01100011 0x63
^
bit 3
io 0x73 is: 0x33([UIF] CTRL I/O 3), select signal 01

It seems this I/O is some mask to 0x33, becuase it marks the bits that
are used as output with an '1'.

According to blacksphere:
00001000 rw Something with flash


I think it sets the signal from output to input? or something like that..
cute.

wumpus
03-09-2003, 06:38 PM
It seems that the value in I/O 0x33 is ANDed with the one in I/O 0x73, if I clear 0x02 (DISPLAYLEDS) there the leds are darkened as well..

I *think* it means thus:
0 input / 1 output

*still checking, will update this post later on*

Yes, this hypothesis was confirmed;

I/O 0x30-0x33 are the output (write) ports
I/O 0x70-0x73 are the I/O direction ports
I/O 0xB0-0xB3 have to be inverse of 0xB0-0xB3 to be a valid output
I/O 0xF0-0xF3 are the input (read) ports

<M457>
04-09-2003, 10:28 AM
mov r0, #0x6B --> mov r0, #0x63
how does it come you found it out?
checked the 3330 firmware?

whoo thanx man

yes :)



It still works on 3310 with that change?

I can't test sorry (I don't have 3310 only 3330)
but it should works because in 3310 memory range 400000-600000
is mapped in 200000-400000.
In this afternoon I will try on a 3210.

wumpus
04-09-2003, 03:24 PM
yes :)
but it should works because in 3310 memory range 400000-600000
is mapped in 200000-400000.
Sooo that's why it works. The I/O pin in question is connected to the Address bit that determines 200000/400000. By disabling that I/O to tristate the ARM gets full control over it.
Wow your great :)

Update: Setting I/O 0x73 to 0x63(instead of 0x6B) in the 3310 has no noticable effect. It still works.

g3gg0
05-09-2003, 09:01 PM
okay multithreading now works perfectly :)

in main you have to call sched_add ( unsigned int function, unsigned int thumb )
with your real thread 0 routine
after that call the main routine will NOT be continued since the
first thread was added and scheduling works now...

the thread 0 routine may call some more sched_add : )


EDIT:
okay :D
it seems i have to decrease the task switches per second rofl : )
the task switching eats more cpu time than the tasks themselves hehehe

wumpus
05-09-2003, 09:15 PM
Cool!

Do you have a method for interprocess communication yet?

Or a design on how it will be..

For example, to wake tasks on a FIQ for transfers to DSP/SIM/MBUS/etc.

g3gg0
05-09-2003, 09:34 PM
Cool!

Do you have a method for interprocess communication yet?

Or a design on how it will be..

For example, to wake tasks on a FIQ for transfers to DSP/SIM/MBUS/etc.

sorry nothing yet : )
i first have to tune the scheduler since its not perfect yet...
just proof of concept implemetation yet .....
CVS has the actual code

hmmm
just a few things are still a riddle to me... how big should the
stack be for each process? actually im assigning 0x00110000 - 0x00117000
as stack addresses for max 8 tasks (0x1000 bytes per task)
is this enough?
dont have experience yet....

i will do a stack-check while task switching soon...


is someone willing to write a malloc function :D
im too lazy right now and a little bit unexperienced *g


n8 (gf is here) :rolleyes: !

wumpus
05-09-2003, 09:57 PM
Firmware task stack sizes seem to be 0x200 - 0x500 words (4bytes), so the amount you claim should be easily enough..

I don't need a malloc function myself yet, I try to do as much as possible stack-based, but when I get to that point I'd probably lend one from some open source operating system or C library.. As long as it's as little wasteful as possible.

String handling routines would be useful as well.. although I hate libc zero-terminated strings (strlen all the way..), so I'll probably whip up some string type prefixed with two length bytes.

jesobrepena
08-09-2003, 06:28 AM
Hi g3gg0,

When I was decompressing MADos to drive C it is asking me a password for "Cygwin\Cygwin.bat". What is the password?

I am currently using WinXP.

Thanks

Spec
08-09-2003, 10:12 AM
Open your eyes man!!! It might save you time, to you and to everyone.
In the first post pw is: pic16f87 means the password is pic16f87

sk3done
17-09-2003, 09:00 PM
what can i say geggo u are the best mate so glad i did learn c excelent

U ARE THE BEST

just tinking what about implanting the dct4 calc or is it a bit under powered (the dct3 phones)

ta

g3gg0
19-09-2003, 01:51 AM
what can i say geggo u are the best mate so glad i did learn c excelent

U ARE THE BEST

just tinking what about implanting the dct4 calc or is it a bit under powered (the dct3 phones)

ta

i disagree... the best ones are the most silent ones... believe ;)

sk3done
20-09-2003, 08:40 PM
well i only ever spoke to u and enzo really mate and nokdoc some times

so who is quite one u refeer to mate

kaos
20-10-2003, 10:27 AM
Hi,

Is this project frozen, or till in development?

<M457>
20-10-2003, 11:14 AM
Hi,

Is this project frozen, or till in development?

it's not frozen :)
you can download last version from CVS
bye

kaos
20-10-2003, 05:17 PM
Hi,

I've updated from CVS, ok.
gcc gives me error, that hw/dsp.c and others are missing.
It compiles ok with the files from the previous .zip file.

*Soon i will test the compiled FLS and update this post if it works.*

It works, but it's buggy. :(

g3gg0
21-10-2003, 02:39 AM
you have to do a completely fresh checkout
"checkout nokia/MADos"

kaos
21-10-2003, 11:09 AM
you have to do a completely fresh checkout
"checkout nokia/MADos"

Hey, I did a clean "checkout module" to "nokia/MADos". Done ok, but these files are still missing. The code compiles and runs if i put the missing files to the hw folder from the mados.zip.

Anyway, it seems that wincvs 1.3.13.2 beta 13 (build 2) does not see these files in the hw folder. :O

cutandpaste from the wincvs update window:

cvs server: Updating nokia/MADos/hw
U nokia/MADos/hw/buzzer.c
U nokia/MADos/hw/ccont.c
U nokia/MADos/hw/clock.c
U nokia/MADos/hw/dspblocks.c
U nokia/MADos/hw/flash.c
U nokia/MADos/hw/genio.c
U nokia/MADos/hw/int.c
U nokia/MADos/hw/io.c
U nokia/MADos/hw/kpd.c
U nokia/MADos/hw/lcd.c
U nokia/MADos/hw/lcd_font.c
U nokia/MADos/hw/led.c
U nokia/MADos/hw/m_dsp.c
U nokia/MADos/hw/mdi.c
U nokia/MADos/hw/timer.c
U nokia/MADos/hw/vibra.c
U nokia/MADos/hw/xbus.c

I also cutandpaste the cvs entries file:
/buzzer.c/1.25/Tue Sep 30 15:11:24 2003//
/ccont.c/1.23/Tue Sep 30 15:17:26 2003//
/clock.c/1.5/Tue Sep 23 11:57:16 2003//
/dspblocks.c/1.3/Sun Sep 21 15:14:26 2003//
/flash.c/1.13/Thu Oct 9 20:58:18 2003//
/genio.c/1.10/Wed Oct 15 16:38:48 2003//
/int.c/1.31/Tue Sep 30 20:05:28 2003//
/io.c/1.13/Tue Sep 23 12:28:08 2003//
/kpd.c/1.25/Thu Oct 16 15:05:02 2003//
/lcd.c/1.54/Wed Oct 15 18:53:02 2003//
/lcd_font.c/1.7/Tue Sep 30 21:31:12 2003//
/led.c/1.10/Tue Sep 30 20:05:28 2003//
/m_dsp.c/1.3/Tue Sep 23 15:39:24 2003//
/mdi.c/1.8/Sat Oct 18 20:23:26 2003//
/timer.c/1.15/Wed Oct 8 07:00:10 2003//
/vibra.c/1.7/Tue Sep 23 11:57:16 2003//
/xbus.c/1.13/Wed Oct 15 16:38:28 2003//

g3gg0
21-10-2003, 07:58 PM
hmmmmh

dsp.c was accidentally removed by someone...
i re-added it...

sorry :)

Manipulator
23-10-2003, 05:52 AM
tnx it works very fine for me!
ps: your snake is very cool :)

bye


i cant open de link to download de
http://www.nokia-reverse-engineering.de/MADos.exe
http://www.nokia-reverse-engineering.de/MADos.zip

can u kindly send a copy to me.
[email protected]

thanks in advance.

<M457>
23-10-2003, 04:00 PM
take a look here
www.blacksphere.tk
software/MADos
:)

Crux
03-11-2003, 04:01 PM
@g3gg0

can we have the source code of your project dated 31.10.2003 for study
?

your tetris game and dct4 calc is awesome ;)

thanks

krisha
04-11-2003, 12:38 AM
@g3gg0

can we have the source code of your project dated 31.10.2003 for study
?

your tetris game and dct4 calc is awesome ;)

thanks

download a cvs client, then you're always up2date...
i just fixed the vibra menu bug after releasing :)
i saw it too late!

Crux
04-11-2003, 12:53 AM
what do u mean? what is cvs? explain me better please.

thanks krisha. you and g3gg0 are making the best stuff i could every imagine to do in a mobile. soon you make it a cofee machine :) that wouldn't be hard to u

Crux
04-11-2003, 01:10 AM
ok. i have just downloaded wincvs and python and configured as shown here: http://nokiafree.org/forums/showthread.php?t=42444&highlight=MADos

but all i can do is explore my hard drive as in normal explorer.exe

please explain me what i can do with wincvs. thanks.

ps: i have downloaded already mados and i am ready to start programming with it.

Crux
04-11-2003, 01:46 AM
ok. i finally understand how wincsv works.

how can i compile this files using mados? how can i make that 128 kb flash file? thanks

krisha
04-11-2003, 02:06 AM
ok. i finally understand how wincsv works.

how can i compile this files using mados? how can i make that 128 kb flash file? thanks

do you already have that MADos development environment from g3gg0s first post ?

then put your downloaded cvs files in the folder /home/-gamez-/nokia.
start cygwin... "cd /home/-gamez-/nokia/MADos" and compile with "./compile.sh"

that's all :)

Crux
04-11-2003, 02:21 AM
ok. i've compiled. i already saw ur correction in vibra menu. very well. i see a bomberman in here... is this working?

i want to make a lg calc also. but i dont understand yet very well. can u explain me how u made dct4 calc? i see the code, but only compiled code and menu related stuff.

and just a final note: you and g3 are amazing!

krisha
04-11-2003, 02:34 AM
ok. i've compiled. i already saw ur correction in vibra menu. very well. i see a bomberman in here... is this working?

i want to make a lg calc also. but i dont understand yet very well. can u explain me how u made dct4 calc? i see the code, but only compiled code and menu related stuff.

and just a final note: you and g3 are amazing!

bomberman is much more difficult then i thought, it's not really working :)
g3gg0 ported the dct4calc to MADos. you can't see the src because it's not public. but i don't think that it can help you with the lg calc ;)

Crux
04-11-2003, 02:37 AM
ok. thanks for the info. if u can msn me, ok? [email protected]

thanks

jebat
05-11-2003, 08:18 PM
g3gg0
-------------
http://www.nokia-reverse-engineering.de/MADos.exe
http://www.nokia-reverse-engineering.de/MADos.zip
-------------

link is not working

got any working link??

g3gg0
11-11-2003, 07:26 PM
g3gg0
-------------
http://www.nokia-reverse-engineering.de/MADos.exe
http://www.nokia-reverse-engineering.de/MADos.zip
-------------

link is not working

got any working link??



see the first post

gsmsalers
15-11-2003, 08:33 PM
Hi.
Is there anyone can make custom flash writing(foe ex. 00234000 to 00234050) and ram copy to flash or flash to ram support. It needs for me eeprom function for storing and reading game top score etc....
Thank u.

d302t
16-11-2003, 02:07 AM
First i want 2 say all who involve this project especially g3ggo and krisha..
My idea about 2 create software related battery charging/discharging...
is this possible?
THNX..

gsmsalers
16-11-2003, 03:18 PM
Hi.
This is fantastic. Thank you to krisha and g3gg0. Please continue this project. Now it seems most exciting also usefull, interesting thing came out in gsm scene. How much knowledge and good brain God giving you.

tudor
20-11-2003, 11:43 AM
great soft... but could you tell me if it would be complicated to put on a 5146? there should not be too many differences... :)