Interesting.  After looking at the MAP file, I found that "Data Segment 2"
was in fact over the 64K limit, even though the CW8 IDE said it was 0K.
Odd.  So, I broke the segment up even more into other segments.  Upon
running the app on POSE, I received the following error:

"UIAppShell (unknown version) just changed the emulated program counter to
0x8003D834.  This address is invalid because it's in neither ROM nor RAM."

I then hit the "debug" button and it gave me the following call stack:

0x10C93080( __Startup__ )
0x10C93628( PilotMain )
0x10C93156( UIAppShellMain )
0x10C934E0( PrvAppLaunchLoop )
0x10C0E034( SysAppLaunch )
0x10C0EA74( PrvCallWithNewStack )
__DummyStartup__

"__DummyStartup__" has the following assembly:

0009264E: 6004            bra.s    __DummyStartup__+0xa (0x92654);
0x00092654
00092650: 2000            move.l   d0,d0
00092652: 2000            move.l   d0,d0
00092654: 43EDFFF4        lea      -12(a5),a1
00092658: 4ED1            jmp      (a1)

And it broke on the last line.

As I mentioned before, my program has multiple segments and now each segment
is under the 64K limit as described in the generated MAP file.  I'm pretty
much out of ideas.  I guess I am just using too much of something.  Don't
know what, but if I am going over some "impossible" limit, I guess I will
have to find a way to compact the various data structures.

My hope is that I have placed files in the wrong order (for instance, the
resource file should be last, not first).  If that's not the case, I hope to
at least know what limit I am going over.

Thank you for all of your help thus far Ben.  Below my sig is a slightly
abridged copy of the MAP file in question.

Regards,

Daniel Suleski :->
TD, Mysticware Inc.
www.mysticware.com



File:    1 "__RuntimeModule__"
File:    2 "C:\Mysticware\Proj-Y\Galaxy Fun\Engine\AI\AI.c"
File:    3 "C:\Mysticware\Proj-Y\Galaxy Fun\Engine\AI\Camera.c"
...[ABRIDGED]
File:   68 "C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_mission_success.c"
File:   69 "C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_player_ship.c"
File:   70 "C:\Program Files\Metrowerks\CodeWarrior\Palm OS
Support\CodeWarrior Libraries\Palm OS Glue\PalmOSGlue(Debug).lib"
File:   71 "Q:\viewer\Libraries\PalmOSGlue\Src\IntlGlue.cp"
File:   72 "Q:\viewer\Libraries\PalmOSGlue\Src\TextMgr.c"
File:   73 "Q:\viewer\Libraries\PalmOSGlue\Src\TxtGlue.cp"
File:   74 "Q:\viewer\Libraries\PalmOSGlue\Src\TsmGlue.cp"
File:   75 "Q:\viewer\Libraries\PalmOSGlue\Src\WinGlue.cp"
File:   76 "Q:\viewer\Libraries\PalmOSGlue\Src\FntGlue.cp"
File:   77 "Q:\viewer\Libraries\PalmOSGlue\Src\DateGlue.cp"
File:   78 "Q:\viewer\Libraries\PalmOSGlue\Src\SysGlue.cp"
File:   79 "Q:\viewer\Libraries\PalmOSGlue\Src\OmGlue.cp"
File:   80 "Q:\viewer\Libraries\PalmOSGlue\Src\ResGlue.cp"
File:   81 "Q:\viewer\Libraries\PalmOSGlue\Src\LmGlue.cp"
File:   82 "Q:\viewer\Libraries\PalmOSGlue\Src\FrmGlue.cpp"
File:   83 "Q:\viewer\Libraries\PalmOSGlue\Src\AccessorGlue.cp"
File:   84 "C:\Program Files\Metrowerks\CodeWarrior\Palm OS
Support\CodeWarrior Libraries\Runtime\PalmOSRuntime_2i_A5.lib"
File:   85 "CPlusLib68K.cp"
File:   86 "Exception68K.cp"
File:   87 "LongLong68K.c"
File:   88 "MWRTTI.cp"
File:   89 "NMWException.cp"
File:   90 "NewMore.cp"
File:   91 "New.cp"
File:   92 "PalmOS_AbortExit.cpp"
File:   93 "PalmOS_GlobalDestructors.c"
File:   94 "PalmOS_setjmp.c"
File:   95 "PalmOS_Startup.cpp"
File:   96 "CWRuntime.c"

Segment:   1   41390 bytes  "Code Segment"
Code: 000004      12 bytes  "__DummyStartup__"               File:
"__RuntimeModule__"
Code: 000010     200 bytes  "InitAI"                         File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\AI\AI.c"
Code: 0000d8      30 bytes  "TermAI"
...[ABRIDGED]
Code: 009f16     546 bytes  "LoadObjTablet"                  File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Graphics\Obj_Defs.c"
Code: 00a138     118 bytes  "UnloadObjTablet"

Segment:   2   64700 bytes  "Map Data Segment 1"
Code: 00000c   32344 bytes  "map_titleMap"                   File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Maps\map_title.c"
Code: 007e64   32344 bytes  "map_day1Map"                    File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Maps\map_day1.c"

Segment:   3     784 bytes  "Tile Data Segment 1"
Code: 00000c     386 bytes  "tile_title_Tileset"             File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Tilesets\tile_title.c"
Code: 00018e     386 bytes  "tile_day_Tileset"               File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Tilesets\tile_day.c"

Segment:   4   50986 bytes  "Object Data Segment 1"
Code: 00000c    7282 bytes  "obj_day_dead_bug2_Object"       File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_dead_bug2.c"
Code: 001c7e    7282 bytes  "obj_day_dead_bug3_Object"       File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_dead_bug3.c"
Code: 0038f0    7282 bytes  "obj_day_generator1_Object"      File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_generator1.c"
Code: 005562    7282 bytes  "obj_day_generator2_Object"      File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_generator2.c"
Code: 0071d4    7282 bytes  "obj_day_mission_failed_Object"  File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_mission_failed.c"
Code: 008e46    7282 bytes  "obj_day_player_shot_Object"     File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_player_shot.c"
Code: 00aab8    7282 bytes  "obj_day_boss_Object"            File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_day_boss.c"

Segment:   5   50986 bytes  "Object Data Segment 2"
Code: 00000c    7282 bytes  "obj_title_controller_Object"    File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_title_controller.c"
Code: 001c7e    7282 bytes  "obj_title_text1_Object"         File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_title_text1.c"
Code: 0038f0    7282 bytes  "obj_title_text2_Object"         File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_title_text2.c"
Code: 005562    7282 bytes  "obj_day_bug1_Object"            File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_day_bug1.c"
Code: 0071d4    7282 bytes  "obj_day_bug2_Object"            File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_day_bug2.c"
Code: 008e46    7282 bytes  "obj_day_bug3_Object"            File:
"C:\Mysticware\Proj-Y\Galaxy Fun\Engine\Property\Objects\obj_day_bug3.c"
Code: 00aab8    7282 bytes  "obj_day_controller_Object"      File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_controller.c"

Segment:   6   21858 bytes  "Object Data Segment 3"
Code: 00000c    7282 bytes  "obj_day_dead_bug1_Object"       File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_dead_bug1.c"
Code: 001c7e    7282 bytes  "obj_day_mission_success_Object" File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_mission_success.c"
Code: 0038f0    7282 bytes  "obj_day_player_ship_Object"     File:
"C:\Mysticware\Proj-Y\Galaxy
Fun\Engine\Property\Objects\obj_day_player_ship.c"

Segment:   7    1896 bytes  "Library Segment"
Code: 00000c      84 bytes  "AccessorGlueTrapsAvailable"     File:
"Q:\viewer\Libraries\PalmOSGlue\Src\AccessorGlue.cp"
Code: 000060     190 bytes  "PrvBmpGetNextBitmapAnyDensity__FP10BitmapType"
Code: 00011e     194 bytes  "BmpGlueGetDimensions"
Code: 0001e0     184 bytes  "BmpGlueGetNextBitmap"
Code: 000298      12 bytes  "__dthandler__4MTWKFv"           File:
"NMWException.cp"
Code: 0002a4      12 bytes  "__duhandler__4MTWKFv"
Code: 0002b0      16 bytes  "terminate__3stdFv"
Code: 0002c0      24 bytes  "abort"                          File:
"PalmOS_AbortExit.cpp"
Code: 0002d8      42 bytes  "__destroy_global_chain"         File:
"PalmOS_GlobalDestructors.c"
Code: 000302      14 bytes  "setjmp"                         File:
"PalmOS_setjmp.c"
Code: 000310      18 bytes  "longjmp"
Code: 000322     160 bytes  "__Relocate____4MTWKFPScPScUl"   File:
"PalmOS_Startup.cpp"
Code: 0003c2     314 bytes  "__Startup__"
Code: 0004fc       8 bytes  "__PreInit__"
Code: 000504       8 bytes  "__InitCode__"
Code: 00050c     134 bytes  "__SkipToXREFs____4MTWKFPSc"
Code: 000592     128 bytes  "__PatchV10Devices____4MTWKFP14SysAppInfoType"
Code: 000612     232 bytes  "__LoadAndRelocate____4MTWKFUcP7_opaque"
Code: 0006fa      76 bytes  "__ldivu__"                      File:
"CWRuntime.c"
Code: 000746      34 bytes  "__ldiv__"

Data section below A5:    630 bytes
Data section above A5:   1284 bytes

Initialized near data
Data:    -30      30 bytes  "@JumpTable"
Data:    -48      18 bytes  "@JumpTable"
Data:    -90      42 bytes  "@JumpTable"
Data:   -132      42 bytes  "@JumpTable"
Data:   -144      12 bytes  "@JumpTable"
Data:   -156      12 bytes  "@JumpTable"
Data:   -162       6 bytes  "@JumpTable"
Data:   -178      16 bytes  "gTilesets"
Data:   -246      68 bytes  "gObjects"
Data:   -298      52 bytes  "gMaps"
Data:   -306       8 bytes  "gObjResources"
Data:   -322      16 bytes  "gTileResources"
Data:   -326       4 bytes  "gZoneEventHandler"
Data:   -394      68 bytes  "gObjectEventHandler"

Uninitialized near data
Data:   -398       4 bytes  "__CW_FEATURES_PTR"
Data:   -402       4 bytes  "__global_destructor_chain"
Data:   -430      28 bytes  "gObjTablets"
Data:   -486      56 bytes  "gTileTablets"
Data:   -610     124 bytes  "gGameData"
Data:   -614       4 bytes  "gPlayer"
Data:   -618       4 bytes  "gSim"
Data:   -622       4 bytes  "gApp"
Data:   -624       2 bytes  "gMemBlks"
Data:   -626       2 bytes  "gBytesAllocated"
Data:   -627       1 bytes  "canStart$54"
Data:   -630       2 bytes  "movementSoundTimes$54"

Initialized far data
Data:     52    1232 bytes  "__segtable__"
Data:     40       6 bytes  "@exceptioninfo@"
Data:     46       6 bytes  "@exceptioninfo@"







































"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:100982@;palm-dev-forum...
>
> At 00:01 2002-11-14 -0500, you wrote:
> >OK Ben.  Thank you for the information.  That white paper came in handy;
> >although, I do have another question as a result of reading it.
> >
> >I turned on the "PC-Relative Constant Data" switch in the settings panel
and
> >made certain that all of my globals that I was concerned about were
declared
> >as const and I even got rid of the pointers inside of these const structs
> >just as the white paper informed.  Well, the number on the data side went
> >down to 0, so I thought it had worked.  Well, upon rebuilding the
project, I
> >get the following warnings (which sound serious):
> >
> >"Segment 'Data Segment 2' is greater than 64K, it will generate an
invalid
> >PRC file."
> >AND
> >"PalmRez Warning: Output resource size is greater than ~64K size limit:
> >'code 3'"
>
> This doesn't have anything to do with data, this has to do with code
> size.  You actually named your second segment "Data Segment 2" -- you can
> rename it by double clicking on its name in the Segments view.  That's
> misleading you.
>
> To get a real feel for the size, you need to look at the MAP file.  In the
> 68K Linker panel, theres a checkbox to output a MAP file.  Turn that on,
> then look at the MAP file, and you'll see how functions and data got
> allocated to your code segment.
>
> See http://www.hhcenterprise.com/Developer/Issue2/Secret_World_PalmOS.htm
> for some discussion of how Palm OS apps startup and how the code and data
> segments come together.
>
> >Like I mentioned in the previous email, I split my project into 5
segments.
> >"Data Segment 2" used have 29K of data and 0K of code.  Now, after the
> >PC-Relative Constant Data switch, both the code and data are listed as
0K.
> >The funny thing is that it is not complaining about Data Segment 1, which
is
> >basically the same as Data Segment 2 - it just has fewer files.
>
> Code shouldn't be listed as 0K -- this seems really suspect, and I'd want
> you to check the MAP file to really see what's happening.
>
> --
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to