VOGONS


Reply 20 of 28, by kolijoco

User metadata
Rank Newbie
Rank
Newbie

will do, but later today,
my son is taking over my computer now :-)

btw, that port is an n8x0 port (not the n80 phone) which is not symbian, but internet tablet (diff os). so we're pioneering here :-)

cheers,
and thanks so far, will get back...

Reply 21 of 28, by kolijoco

User metadata
Rank Newbie
Rank
Newbie

undefing the alignment macro has no effect (the effect is only that the mem read/write macors are replaced by endiansafed -i guess - versions, but that has no effects on byte r/w functions involved)

checking into DOS_PSP::MakeNew() i found that the sizof (sPSP) is 260
the pt where it is supposed to be allocated comes to 0x1280 exactly 256 bytes below where the .com-s code was loaded at 0x1380... so the math adds up, thats how the first DWORD at 0x1380 get wiped by the line

for (i=0;i<sizeof(sPSP);i++) mem_writeb(pt+i,0);

will try to squeeze more info (like where pt gets its value)

think i'm onto something:
the line
loadseg=pspseg+16;
in DOS_Execute is supposed to protet against this, and it would, if the struct size were less than 256, which it probably would be, if the structure were packed, which it is not (on my platform/compiler)

Last edited by kolijoco on 2009-01-31, 17:46. Edited 1 time in total.

Reply 23 of 28, by kolijoco

User metadata
Rank Newbie
Rank
Newbie

hahaaa!
now to figure out how to pack the structure on s60
whats the ansi c++ way of saying that? (been a while since i worked outside the "window")?
...
needto define GCC_ATTRIBUTE()... was null because i started from the win32 sources.
...

got it! seems its not enough to append it to end of structures, got to have it behind every member...

Reply 25 of 28, by kolijoco

User metadata
Rank Newbie
Rank
Newbie

long story...
i staryed over to wrong side too long ago :-) /since i had to start earning money/

anyway, thanks to all the constructive discussion in this thread,

IT WORKS!!!

will keep all interested posted... in a new thread...

again thanks!

Reply 26 of 28, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

I wish I'd read this thread before. I had the exact same problem porting to the Wii. Unfortunately, I already solved this problem a couple of days before reading this.

After reading the first post in this thread I was about to make myself look like a genius by posting the answer "The problem is that sPSP is 260 bytes long instead of 256 and overwriting the first 4 bytes of code with 00 00 00 00. You need to fix it by declaring the structure packed by fixing config.h." But alas, I was a few months too late.

Perhaps we should add a warning in the PORTING.txt file, or in the code somewhere. Quite a few people have this problem. Especially since the configure tool doesn't work for most cross-compiling.

Reply 28 of 28, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

Makefiles. Programming for the Wii uses DevkitPro. DevkitPro comes with a Windows IDE called Programmer's Notepad, although the IDE just calls DevkitPro's version of make which makes the makefile that you have to write manually. Programming for the Wii feels a lot like programming for Windows.