ROM Hack How to use pack(CodeWarrior)

wannya

Active Member
OP
Newcomer
Joined
Sep 17, 2007
Messages
37
Trophies
1
Website
www.angeleden.net
XP
127
Country
Switzerland
Google(Very Sorry)

Metrowerks CodeWarrior for Nintendo DS

How to use pre-compiled instruction pack

__attribute__ ((packed))
# pragma pack (1)
# pragma options align = packed
Have failed
 

cory1492

Well-Known Member
Member
Joined
Jun 23, 2005
Messages
1,497
Trophies
1
Location
Home, WhereElse?
XP
345
Country
Canada
Examples for porting PC to codewarrior are...
Code:
#pragma options align=packed
typedef struct
{
ÂÂÂÂchar foo;
ÂÂÂÂshort bar;
} foobar;
#pragma options align=reset
Code:
#pragma pack(push, 1)
typedef struct
{
ÂÂÂÂchar foo;
ÂÂÂÂshort bar;
} foobar;
#pragma pack(pop)
This is for struct alignment in memory only. Not the same as GCC "__attribute__ ((packed))" when using sizeof() which as far as I can tell has no equal in codewarrior compilers.

Search your local headers for the toolchain to see if there are any "pack" used? I've never seen the DS official versions myself. Hope that helps...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skv0ra @ Skv0ra:
    for next 10-20y it doesn't need to be toyched
  • Skv0ra @ Skv0ra:
    touched*
  • Skv0ra @ Skv0ra:
    yep
  • realtimesave @ realtimesave:
    the wire harness has pretty thick wire in it too
  • Skv0ra @ Skv0ra:
    i need to address brake lights and turn signals, but thats nothing
  • Skv0ra @ Skv0ra:
    is the dub 12V or 6V?
  • realtimesave @ realtimesave:
    my VW had the high beams wired to the low beams, my dad's friend figured it out and corrected that
  • Skv0ra @ Skv0ra:
    cuz my stude is 6V - adds an extra layer of fun not fun
  • realtimesave @ realtimesave:
    they weren't putting out enough light cos both were on at the same time
  • Skv0ra @ Skv0ra:
    lol
  • realtimesave @ realtimesave:
    it was converted to 12V
  • Skv0ra @ Skv0ra:
    so OG they were 6 as well?
  • Skv0ra @ Skv0ra:
    im surprised my, just beams, are actually enough at night
  • realtimesave @ realtimesave:
    also I put the 6V wiper motor back in
  • realtimesave @ realtimesave:
    and it runs off of a potentiometer so it doesn't get 12V
  • realtimesave @ realtimesave:
    reason being is the 12V motor parks the wipers in the wrong place every time
  • realtimesave @ realtimesave:
    6V wiper motor is the key ingredient. parks nice and low
  • realtimesave @ realtimesave:
    man I need a snack LOL dunno what I want
  • realtimesave @ realtimesave:
    ah well tomorrow I'll be back on, hunting down those 2 switch games again haha
  • Skv0ra @ Skv0ra:
    lmao
  • Skv0ra @ Skv0ra:
    got my pizza out so im all set
  • Skv0ra @ Skv0ra:
    finsihed Chaos;Head, onto Steins;Gate
  • Skv0ra @ Skv0ra:
    so from Shibuya i drank all too much one summer, to Akiba i know equally as well
  • Skv0ra @ Skv0ra:
    lmao
    Skv0ra @ Skv0ra: lmao