The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #14726    
Old May 25th, 2010, 04:33 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20

Advertise here
Quote:
Originally Posted by Neox-Storm View Post
I'm just reposting it for the new page.
Are you using paint and the eye-dropper tool?
Because I'm pretty sure it should work.
__________________
  #14727    
Old May 25th, 2010, 05:14 AM
Zeffy's Avatar
Zeffy
 
Join Date: Apr 2009
Send a message via Skype™ to Zeffy
How do you make another flower become animated?

Thanks in advance.
__________________
  #14728    
Old May 25th, 2010, 06:39 AM
Darksun's Avatar
Darksun
triple rainbow, yo
 
Join Date: Jul 2008
Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
Gender: Male
Nature: Relaxed
Anybody know why A-text isn't working for moi?
__________________

  #14729    
Old May 25th, 2010, 06:42 AM
Zeffy's Avatar
Zeffy
 
Join Date: Apr 2009
Send a message via Skype™ to Zeffy
Quote:
Originally Posted by Darksun View Post
Anybody know why A-text isn't working for moi?
A-text doesn't work on Vista if I'd reckon. But A-text is useless, if you want to script go use a Script Editor/HEX Editor.
__________________
  #14730    
Old May 25th, 2010, 06:44 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
@Darksun:
Zeffy's right. You could always decompile with XSE n__n
__________________
  #14731    
Old May 25th, 2010, 06:47 AM
Darksun's Avatar
Darksun
triple rainbow, yo
 
Join Date: Jul 2008
Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by Zeffy View Post

A-text doesn't work on Vista if I'd reckon. But A-text is useless, if you want to script go use a Script Editor/HEX Editor.
Oh, darn. I was going to use it on the intro, but nvm. Any good tutorials/ways you recommend to edit the intro ?

And thanks for replying so fast~~

Quote:
Originally Posted by Binary View Post
@Darksun:
Zeffy's right. You could always decompile with XSE n__n
Hmm... ... ... Thanks! :D
__________________

  #14732    
Old May 25th, 2010, 07:03 AM
Zeffy's Avatar
Zeffy
 
Join Date: Apr 2009
Send a message via Skype™ to Zeffy
Quote:
Originally Posted by Darksun View Post
Oh, darn. I was going to use it on the intro, but nvm. Any good tutorials/ways you recommend to edit the intro ? :)
Actually, you can edit Oak's intro with HEX Editing. I also am researching of another way to edit his talk. If you want to look for guides, search in the Tutorials section, I'm sure you'll get something there.
__________________
  #14733    
Old May 25th, 2010, 07:06 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
I think you can do it with a hex editor and a text table. Not completely sure though.
__________________
  #14734    
Old May 25th, 2010, 09:04 AM
locoroco's Avatar
locoroco
Ginga Densetsu Weed ANIME PWNS
 
Join Date: Oct 2009
Location: Manati, Puerto rico
Age: 18
Gender: Male
Nature: Relaxed
Send a message via Windows Live Messenger to locoroco
any 1 nows the offsets for the sevvi isle 1-9 world map i havent been able to find them and if its not possible through unzl tell me what it requires thx in advance
__________________
This signature has been disabled.
Signature needs to be kept to a 600px x 400px area. Your long line of text pushes it over the limit. Put a few enters there and you will be able to get it inside the limits.
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
  #14735    
Old May 25th, 2010, 11:47 AM
Darksun's Avatar
Darksun
triple rainbow, yo
 
Join Date: Jul 2008
Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
Gender: Male
Nature: Relaxed
Any ways I can change the colour of the blocks in the block editor in A-Map instantly?
__________________

  #14736    
Old May 25th, 2010, 11:57 AM
PeregrineFig's Avatar
PeregrineFig
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 20
Gender: Male
Nature: Hardy
Quote:
Originally Posted by Darksun View Post
Any ways I can change the colour of the blocks in the block editor in A-Map instantly?
If you already palette edited, File>Load New Blocks.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #14737    
Old May 25th, 2010, 12:30 PM
Darksun's Avatar
Darksun
triple rainbow, yo
 
Join Date: Jul 2008
Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by PeregrineFig View Post
If you already palette edited, File>Load New Blocks.
Thanks!

Okey, a lot of questions at once, but ya-ya.. Anybody knows who "Ex" is (forum member, I think), he has a ROM-base I'd really like to try, but I can't find it in the "ROM Hacking Resources"-thread. Any help ?

Pic of the ROM-base:
__________________

  #14738    
Old May 25th, 2010, 01:30 PM
phosphate5's Avatar
phosphate5
Random little kid
 
Join Date: Apr 2009
Location: Somewhere in the world
Age: 18
Nature: Careful
Quote:
Originally Posted by phosphate5 View Post
Is there any way to reverse the effects of running a deep scan in unlz?

Also, what are the offsets for the backsprites of the heroes, steven, and Wally in emerald? Knowing their pallete offsets would help too, along with Prof. Birch's palette offset at the beginning of the game.
Just reposting for the new page. I hope that's not against the rules?
  #14739    
Old May 25th, 2010, 02:01 PM
dustination's Avatar
dustination
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Will someone please help with this, Whenever I get open professer birch's sprite in tile molester so I can edit him, I get this screwed up pic of him, can someone help me to fix him?

I cant post a pic, but his offset was 39DBF4 incase you want to check.
__________________
Don't underestimate the PODS
  #14740    
Old May 25th, 2010, 03:24 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
How is the palette for the background in battles in Pokémon Emerald loaded? I found the offset, but it doesn't have all of the colors.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
  #14741    
Old May 25th, 2010, 03:30 PM
Sawakita's Avatar
Sawakita
Not Invented Here
 
Join Date: May 2010
Gender: Male
Quote:
Originally Posted by Sawakita View Post
Hi, I want to learn ASM for gameboy (should be similar to z80). Which way should I start? Can you suggest any guide or manual or tutorial for beginners? And do you think i should start from language C#/C++?

EDIT:
I also have another question:
do you know the way to turn an image (.gif or .jpg or .png) like this
Attachment 54206
into hexcode like this
(hexcode of compressed image of "bulbasaur")
Spoiler:
557D 3C25 4CDF AAE5 3C0A 9A55 56CA
5052 97FF 5385 B429 27EB 9622 157A 3093
0BF5 AB74 6048 9092 7FE9 2962 6F48 51B2
25B7 8204 8811 A2D6 A308 C2A8 12B0 B5E0
8626 25B5 0530 9CB8 A6A2 671E 0812 D08B
A496 3182 38E2 2088 8D11 4E55 F52A 3A5A
314C 3B90 4861 4E48 88C2 74A6 D148 5918
DD4A 8B7E 2D08 6306 A14C 1068 8A08 B52A
21B5 A220 8148 759A 2152 174C 1252 EA16
2621 FF25 A236 18B7 6962 7414 D60B 858C
5614 D392 193B 7EA3 8204 8816 681C 9626
308E 3541 D48E 50F2 5E0A 0495 8A4E 1C70
E782 0B46 19A5 4652 2637 B696 41C6 2A25
1504


I found a program written in C that decompress front&back pics from pokemon red
Spoiler:

Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

///// Necessary Structures

#define WIDTHBYTES(w,bpp)  (((w*bpp+31)>>5)<<2)

#ifdef BIGENDIAN
#define SWAPWORD(a) \
   ((WORD) ((((a)>>8)&0x00FF))\
          |((((a)<<8)&0xFF00)))
#define SWAPDWORD(a) \
  ((DWORD) ((((a)>>24)&0x000000FF))\
          |((((a)>>8) &0x0000FF00))\
          |((((a)<<8) &0x00FF0000))\
          |((((a)<<24)&0xFF000000)))
#else
#define SWAPWORD(a)  a
#define SWAPDWORD(a)  a
#endif

typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef signed long LONG;
typedef int BOOL;

#define TRUE 1
#define FALSE 0

#pragma pack(1)
typedef struct tagBITMAPINFOHEADER {
   DWORD  biSize; 
   LONG   biWidth; 
   LONG   biHeight; 
   WORD   biPlanes; 
   WORD   biBitCount;
   DWORD  biCompression; 
   DWORD  biSizeImage; 
   LONG   biXPelsPerMeter; 
   LONG   biYPelsPerMeter; 
   DWORD  biClrUsed; 
   DWORD  biClrImportant; 
} BITMAPINFOHEADER; 


typedef struct tagBITMAPFILEHEADER {
  WORD    bfType; 
  DWORD   bfSize; 
  WORD    bfReserved1; 
  WORD    bfReserved2; 
  DWORD   bfOffBits; 
} BITMAPFILEHEADER; 
#pragma pack()

/////  GB Graphics to Bitmap Files

void GbSetTile(
 BYTE *tile,
 BYTE *data,
 DWORD stride,
 BYTE clrOrigin
){
 int y;
 BYTE k1,k2;
 BYTE * bits;
 for(y=0;y<8;y++){
  k1=tile[2*y];
  k2=tile[2*y+1];
  bits=data+y*stride;
  bits[0]=clrOrigin|((k1&0x80)>>7)|((k2&0x80)>>6);
  bits[1]=clrOrigin|((k1&0x40)>>6)|((k2&0x40)>>5);
  bits[2]=clrOrigin|((k1&0x20)>>5)|((k2&0x20)>>4);
  bits[3]=clrOrigin|((k1&0x10)>>4)|((k2&0x10)>>3);
  bits[4]=clrOrigin|((k1&0x08)>>3)|((k2&0x08)>>2);
  bits[5]=clrOrigin|((k1&0x04)>>2)|((k2&0x04)>>1);
  bits[6]=clrOrigin|((k1&0x02)>>1)|((k2&0x02)   );
  bits[7]=clrOrigin|((k1&0x01)   )|((k2&0x01)<<1);
 }
}

void SaveGbBitmapTiles(
  char *filename,
  BYTE *buffer,
  DWORD sz,
  DWORD cxTile,
  DWORD cyTile,
  BOOL orient // TRUE - ltr/utd; FALSE - utd/ltr
){
 int i;
 DWORD xx=0,yy=0;
 BITMAPINFOHEADER *ret;
 BITMAPFILEHEADER bfh;
 FILE *h;
 BYTE *bits;
 DWORD stride;
 DWORD neededsz;
 DWORD numtiles=cxTile*cyTile;
 LONG width=cxTile*8;
 LONG height=cyTile*8;
 DWORD bminfo;
 BYTE *ctbl;
 bminfo=sizeof(BITMAPINFOHEADER)+1024;//header and palette
 stride=WIDTHBYTES(width,8);
 neededsz=bminfo+stride*height; //add image size
 ret=malloc(neededsz);
 if(!ret)return;
 memset(ret,0,neededsz);
 ret->biSize=sizeof(BITMAPINFOHEADER);
 ret->biWidth=width;
 ret->biHeight=-height;
 ret->biPlanes=SWAPWORD(1);
 ret->biBitCount=SWAPWORD(8);
 ret->biSize=SWAPDWORD(ret->biSize);
 ret->biWidth=SWAPDWORD(ret->biWidth);
 ret->biHeight=SWAPDWORD(ret->biHeight);
 // Calculate color table
 ctbl=((BYTE*)ret)+sizeof(BITMAPINFOHEADER);
 ctbl[0]=ctbl[1]=ctbl[2]   =0xFF;
 ctbl[4]=ctbl[5]=ctbl[6]   =0xAA;
 ctbl[8]=ctbl[9]=ctbl[10]  =0x55;
 ctbl[12]=ctbl[13]=ctbl[14]=0x00;
 // Calculate pointer to image
 bits=((BYTE*)ret)+bminfo;
 for(i=0;i<numtiles;i++){
  BYTE *d=bits+(yy<<3)*stride+(xx<<3);
  GbSetTile(buffer,d,stride,0);
  buffer+=16;
  if(orient){
   xx++;if(xx==cxTile){xx=0;yy++;}
  } else {
   yy++;if(yy==cyTile){yy=0;xx++;}
  }
 }
 bfh.bfType='B'|('M'<<8);
 bfh.bfSize=sizeof(BITMAPFILEHEADER)+neededsz;
 bfh.bfReserved1=0;
 bfh.bfReserved2=0;
 bfh.bfOffBits=sizeof(BITMAPFILEHEADER)+bminfo;
 bfh.bfType=SWAPWORD(bfh.bfType);
 bfh.bfSize=SWAPDWORD(bfh.bfSize);
 bfh.bfOffBits=SWAPDWORD(bfh.bfOffBits);
 h=fopen(filename,"wb");
 if(!h)return;
 fwrite(&bfh,sizeof(BITMAPFILEHEADER),1,h);
 fwrite(ret,neededsz,1,h);
 fclose(h);
 free(ret);
}

/////  Helper function

int xgetc(FILE *f, DWORD o){
 DWORD sav=ftell(f);
 int c;
 fseek(f,o,SEEK_SET);
 c=getc(f);
 fseek(f,sav,SEEK_SET);
 return c;
}

/////  Graphics compression

#define RLC(a) \
  ( (((a)&0x7F)<<1)|(((a)&0x80)>>7) )

#define RRC(a) \
  ( (((a)&0xFE)>>1)|(((a)&0x01)<<7) )

#define SWAP(a) \
  ( (((a)&0xF0)>>4)|(((a)&0x0F)<<4) )


#define SLA(a) \
  (((a)<<1)&0xFE)

#define SLA16(a) \
  (((a)<<1)&0xFFFE)

typedef struct{
 BYTE *ptr;
 BYTE cursize1;
 BYTE cursize2;
 BYTE size1;
 BYTE size2;
 BYTE curbyte;
 BYTE curbit;
 BYTE d084;
 BYTE d085;
 BYTE d086;
 BYTE d087;
 WORD o;
 WORD pos0;
 WORD pos1;
 WORD table1;
 WORD table2;
 WORD maxsize;
 WORD error;
} GGCONTEXT;

WORD BitMaskTable[]={
 0x0001,
 0x0003,
 0x0007,
 0x000F,
 0x001F,
 0x003F,
 0x007F,
 0x00FF,
 0x01FF,
 0x03FF,
 0x07FF,
 0x0FFF,
 0x1FFF,
 0x3FFF,
 0x7FFF,
 0xFFFF
};
BYTE BitTables[4][8]={
 {0x08,0xC4,0xE6,0x2A,0xF7,0x3B,0x19,0xD5},
 {0xF7,0x3B,0x19,0xD5,0x08,0xC4,0xE6,0x2A},
 {0x01,0x32,0x76,0x45,0xFE,0xCD,0x89,0xBA},
 {0xFE,0xCD,0x89,0xBA,0x01,0x32,0x76,0x45} 
};

BYTE Tables2[16]={
 0x00,0x08,0x04,0x0C,0x02,0x0A,0x06,0x0E,
 0x01,0x09,0x05,0x0D,0x03,0x0B,0x07,0x0F
};

#define TESTPOS(ggc,x)\
 if(x>=(ggc)->maxsize){\
  (ggc)->error=1;\
  return 0;\
 }

#define NEXTBIT(x) \
 do{\
  if(!(--ggc.curbit)){\
   ggc.curbyte=xgetc(f,offset+(ggc.o++));\
   ggc.curbit=8;\
  }\
  ggc.curbyte=RLC(ggc.curbyte);\
  x=ggc.curbyte&0x01;\
 }while(0)

#define PUTTEMP(tmp) \
 do{\
  e=tmp;\
  switch(ggc.d084){\
   case 1:\
    e=SLA(e);e=SLA(e);break;\
   case 2:\
    e=SWAP(e);break;\
   case 3:\
    e=RRC(e);e=RRC(e);break;\
  }\
  TESTPOS(&ggc,ggc.pos0);\
  ggc.ptr[ggc.pos0]|=e;\
 }while(0)

#define INCPTR  \
 do{\
  ggc.cursize2++;\
  if(ggc.cursize2!=ggc.size2){\
   ggc.pos0++;\
  } else {\
   ggc.cursize2=0;\
   if(ggc.d084){\
    ggc.d084--;\
    ggc.pos0=ggc.pos1;\
   } else {\
    ggc.d084=3;\
    ggc.cursize1+=0x08;\
    if(ggc.cursize1!=ggc.size1){\
     ggc.pos0++;\
     ggc.pos1=ggc.pos0;\
    } else {\
     ggc.cursize1=0;\
     if(!(ggc.d085&0x02)){\
      ggc.d085^=0x01;\
      ggc.d085|=0x02;\
      goto label2574;\
     } else {\
      done=TRUE;\
     }\
    }\
   }\
  }\
 }while(0)

int GetGraphicsRoutine1(GGCONTEXT *ggc, WORD hl){
 BYTE b;
 BYTE tmp,c,d;
 BOOL d087Old;
 WORD a;
 BYTE e;
 WORD i,j;
 ggc->cursize1=ggc->cursize2=0;
 ggc->pos0=ggc->pos1=hl;
 if(ggc->d087){
  ggc->table1=0;
  ggc->table2=1;
 } else {
  ggc->table1=2;
  ggc->table2=3;
 }
 e=0;
 do{
  do{
   BYTE bit;
   TESTPOS(ggc,ggc->pos0);
   a=b=ggc->ptr[ggc->pos0];
   a=SWAP(a)&0x0F;
   c=a&0x01;
   a>>=1;
   bit=(ggc->d087)?(e&0x04):(e&0x01);
   if(bit){
    a=BitTables[ggc->table2][a];
   } else {
    a=BitTables[ggc->table1][a];
   }
   if(!(c&0x01))a=SWAP(a);
   a&=0x0F;
   e=a;
   d=SWAP(a);
   a=b&0x0F;
   c=a&0x01;
   a>>=1;
   bit=(ggc->d087)?(e&0x04):(e&0x01);
   if(bit){
    a=BitTables[ggc->table2][a];
   } else {
    a=BitTables[ggc->table1][a];
   }
   if(!(c&0x01))a=SWAP(a);
   a&=0x0F;
   e=a;
   a|=d;
   TESTPOS(ggc,ggc->pos0);
   ggc->ptr[ggc->pos0]=a;
   ggc->pos0+=ggc->size1;
   ggc->cursize1+=0x08;
  }while(ggc->cursize1!=ggc->size1);
  e=0;
  ggc->cursize1=0;
  ggc->cursize2++;
  if(ggc->cursize2!=ggc->size2){
   ggc->pos1++;
   ggc->pos0=ggc->pos1;
  }
 }while(ggc->cursize2!=ggc->size2);
 ggc->cursize2=0;
 return !(ggc->error);
}

int GetGraphicsRoutine2(GGCONTEXT *ggc){
 BYTE b;
 BYTE tmp,c;
 BOOL d087Old;
 WORD a;
 WORD mask,de,hl;
 BYTE e;
 WORD i,j;
 ggc->cursize1=ggc->cursize2=0;
 ggc->pos0=(ggc->d085&0x01)?0:0x188;
 ggc->pos1=(ggc->d085&0x01)?0x188:0;
 GetGraphicsRoutine1(ggc,ggc->pos0);
 ggc->pos0=(ggc->d085&0x01)?0:0x188;
 ggc->pos1=(ggc->d085&0x01)?0x188:0;
 hl=ggc->pos0; 
 de=ggc->pos1;
 do{
  do{
   if(ggc->d087){
    TESTPOS(ggc,de);
    a=ggc->ptr[de];
    b=a;
    a=SWAP(a)&0x0F;
    c=Tables2[a];
    c=SWAP(c);
    a=b&0x0F;
    a=Tables2[a];
    a|=c;
    ggc->ptr[de]=a;
   }
   TESTPOS(ggc,hl);
   TESTPOS(ggc,de);
   a=ggc->ptr[hl++]^ggc->ptr[de];
   ggc->ptr[de++]=a;
   ggc->cursize2++;
  }while(ggc->cursize2!=ggc->size2);
  ggc->cursize2=0;
  ggc->cursize1+=0x08;
 }while(ggc->cursize1!=ggc->size1);
 ggc->cursize1=0;
 return !(ggc->error);
}

int GetGraphics(
 FILE *f,
 DWORD offset,
 BYTE *ptr,
 DWORD sz
){
 GGCONTEXT ggc;
 BYTE b;
 BYTE tmp,c;
 BOOL d087Old;
 WORD a;
 WORD mask,de,hl;
 BYTE e;
 WORD i,j;
 BOOL done=FALSE;
 BYTE tmpbuf[0x310];
 ggc.size1=0;
 ggc.size2=0;
 ggc.cursize1=0;
 ggc.cursize2=0;
 ggc.curbit=1;
 ggc.d085=0;
 ggc.d086=1;
 ggc.d084=3;
 ggc.d087=0;
 ggc.pos0=0;
 ggc.pos1=0;
 ggc.ptr=tmpbuf;
 ggc.table1=0;
 ggc.table2=0;
 ggc.o=0;
 ggc.maxsize=0x310;
 ggc.error=0;
 ggc.curbyte=xgetc(f,offset+(ggc.o++));
 if(ggc.curbyte!=0x44
  &&ggc.curbyte!=0x55
  &&ggc.curbyte!=0x66
  &&ggc.curbyte!=0x77)return 0;
 b=ggc.curbyte;
 ggc.size1=(b&0x0F)*8;
 b=SWAP(b);
 ggc.size2=(b&0x0F)*8;
 memset(tmpbuf,0,0x310);
 NEXTBIT(tmp);
 ggc.d085=tmp;
label2574:
 ggc.pos0=ggc.pos1=(ggc.d085&0x01)?0x188:0;
 if(ggc.d085&0x02){
  NEXTBIT(tmp);
  if(tmp){
   NEXTBIT(tmp);
   tmp++;
  }
  ggc.d086=tmp;
 }
 NEXTBIT(tmp);
 while(!done){
  if(tmp){
   while(1){
    NEXTBIT(tmp);
    c=tmp;
    NEXTBIT(tmp);
    tmp|=SLA(c);
    if(tmp){
     PUTTEMP(tmp);
     INCPTR;
    } else break;
   }
  }
  if(done)break;
  c=0;
  do{
   NEXTBIT(tmp);
   if(tmp)c++;
  }while(tmp);
  mask=BitMaskTable[c];
  de=0;
  c++;
  do{
   NEXTBIT(tmp);
   de=tmp|de;
   if(--c){
    de=SLA16(de);
   }
  }while(c);
  de+=mask;
  do{
   tmp=0;
   PUTTEMP(tmp);
   INCPTR;
   if(done)break;
   de--;
   if(de==0){
    tmp=1;//to continue upper loop
    break;
   }  
  }while(1);
 }
 if(ggc.d086==0){
  GetGraphicsRoutine1(&ggc,0);
  GetGraphicsRoutine1(&ggc,0x188);
 } else if(ggc.d086==1){
  GetGraphicsRoutine2(&ggc);  
 } else {
  ggc.pos0=(ggc.d085&0x01)?0:0x188;
  ggc.pos1=(ggc.d085&0x01)?0x188:0;
  d087Old=ggc.d087;
  ggc.d087=0;
  GetGraphicsRoutine1(&ggc,ggc.pos1);
  ggc.pos0=(ggc.d085&0x01)?0:0x188;
  ggc.pos1=(ggc.d085&0x01)?0x188:0;
  ggc.d087=d087Old;
  GetGraphicsRoutine2(&ggc);
 }
 for(i=0;i<0x188;i++){
  ptr[(i<<1)]=ggc.ptr[i];
  ptr[(i<<1)|1]=ggc.ptr[0x188+i];
 }
 return !(ggc.error);
}

int NumberToIndex(BYTE *ord,DWORD len,int n){
 int i;
 for(i=0;i<len;i++){
  if(ord[i]==n)return i;
 }
 return -1;
}

void RedBlueGraphics(FILE *f){
 int i;
 BYTE rbpkdx[28];
 BYTE buffer[1024];
 BYTE bmp[256];
 BYTE pb[256];
 WORD pal[4];
 BYTE palno;
 fseek(f,0x41024,SEEK_SET);
 fread(pb,256,1,f); // read internal order
 for(i=1;i<=151;i++){
  DWORD wBack,wFront;
  WORD bSize;
  DWORD o1=0x24000;
  BOOL have=TRUE;
  DWORD bank;
  int j=NumberToIndex(pb,0xBE,i)+1;
  if(i==151){
   fseek(f,0x425b,SEEK_SET);
  } else {
   DWORD o=0x383de;
   fseek(f,o+((i-1)*28),SEEK_SET);
  }
  if(j==0x15){
   bank=1;
  } else if(j==0xB6){
   bank=0x0B;
  } else if(j<0x1F){
   bank=0x09;
  } else if(j<0x4A){
   bank=0x0A;
  } else if(j<0x74){
   bank=0x0B;
  } else if(j<0x99){
   bank=0x0C;
  } else {
   bank=0x0D;
  }
  o1=(bank-1)<<14;
  fread(rbpkdx,28,1,f);
  bSize=rbpkdx[10]&0x0F;
  wFront=rbpkdx[11]|(rbpkdx[12]<<8);
  wBack=rbpkdx[13]|(rbpkdx[14]<<8);
  memset(buffer,0,1024);
  // Get front graphic
  have=GetGraphics(f,o1+wFront,buffer,1024);
  if(!have)continue;
  sprintf(bmp,"%03d.bmp",i);
  SaveGbBitmapTiles(bmp,buffer,bSize*bSize*16,bSize,bSize,FALSE);
  // Get back graphic
  have=GetGraphics(f,o1+wBack,buffer,1024);
  sprintf(bmp,"%03db.bmp",i);
  SaveGbBitmapTiles(bmp,buffer,16*16,4,4,FALSE);
 }
}

int main(int argc,char **argv){
 FILE *f=fopen("red.gb","rb");
 if(!f){
  printf("Can't open Pokemon Red English ROM.  Please name the ROM red.gb and try again.\r\n");
  return 1;
 }
 RedBlueGraphics(f);
 fclose(f);
 return 0;
}

but i need to know the reverse process (i.e. compressing).
I repost for the new page..
Anyone can help me, please?
__________________



| 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |
  #14742    
Old May 25th, 2010, 03:40 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by dustination View Post
Will someone please help with this, Whenever I get open professer birch's sprite in tile molester so I can edit him, I get this screwed up pic of him, can someone help me to fix him?

I cant post a pic, but his offset was 39DBF4 incase you want to check.
You need to change the way that the tiles are arranged. Try clicking "View > Block Size > Custom..." and then set both the number of Columns and Rows to 8. Also, I think the address is actually 0x39DC14, which is one tile (0x20 bytes) forward from 0x39DBF4.

Quote:
Originally Posted by giradialkia View Post
1. Of course you can- but, you can't change the first 5 palettes, because they're used in every single map in the game (it's the first 6 in RSE, Pals 0-5, but I'm assuming you're hacking FireRed, which I'm not totally familiar with). However, you can edit one of the palettes from around Pal 6 onwards, to whatever you want.
Um, as far as I know you can change the first 6 palettes (and it's 6 for all 3rd generation games). :\
__________________

Brother of Vrai

Last edited by colcolstyles; May 25th, 2010 at 03:44 PM. Reason: Added response to giradialkia's post
  #14743    
Old May 25th, 2010, 04:14 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by Team Fail View Post
I'm running Sappy 2005 and when I try to assemble my .s file, I get this:

Run Time Error '53':
File not found

________
| OK |
-----------

Then....

Sappy 2005 has quit working...
Windows is looking for a solution...



What can I do?
Bumping this again. I really want to insert my possible firstly-looped song. Me thinks it may have to do with some new .OCX files I installed.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
  #14744    
Old May 25th, 2010, 04:25 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by Team Fail View Post
Bumping this again. I really want to insert my possible firstly-looped song. Me thinks it may have to do with some new .OCX files I installed.
Do you have all of MID2AGB's files in the same folder as Sappy? If not, get them.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
  #14745    
Old May 25th, 2010, 04:48 PM
dustination's Avatar
dustination
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Quote:
You need to change the way that the tiles are arranged. Try clicking "View > Block Size > Custom..." and then set both the number of Columns and Rows to 8. Also, I think the address is actually 0x39DC14, which is one tile (0x20 bytes) forward from 0x39DBF4.

Yes! It worked! Thank you!
__________________
Don't underestimate the PODS

Last edited by dustination; May 25th, 2010 at 04:57 PM. Reason: Typed wrong thing
  #14746    
Old May 25th, 2010, 04:57 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by diegoisawesome View Post
Do you have all of MID2AGB's files in the same folder as Sappy? If not, get them.
It now does the exact same thing. I think Full Metal was making a new one, I read in his sig once apon a time.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
  #14747    
Old May 26th, 2010, 11:00 AM
Neox-Storm
Beginning Trainer
 
Join Date: May 2008
Gender:
Is there any way to completely wipe out the tile set in Firered, automatically?

Not the tileset as in the one I can open up in MS Paint, but the one
I use when I'm laying out the tiles on the town map.
  #14748    
Old May 26th, 2010, 02:27 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by Neox-Storm View Post
Is there any way to completely wipe out the tile set in Firered, automatically?

Not the tileset as in the one I can open up in MS Paint, but the one
I use when I'm laying out the tiles on the town map.
All you do is make a new tilemap, and overwrite the old one. No need to delete it.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
  #14749    
Old May 26th, 2010, 02:35 PM
NikoBelic999's Avatar
NikoBelic999
Friendly Hometown Mugger....XD
 
Join Date: Feb 2010
Location: STRANGER DANGER! STALKER! We dont have to know that, now do we?
Gender: Male
Nature: Brave
Send a message via AIM to NikoBelic999
There is something wrong with my Ruby Rom that I was changing in Advanced Map...

"The Position MapBankHeader can't be found!"

"AdvanceMapError(1) Try to Read at 0!"

"AdvanceMapError(5): The Value at $000000 is not a pointer!"

What does this mean?
__________________


Machamp (カイリキ Fighting)
Species: Superpower Pokemon
Height: 5'03" (1.6 m)
Weight: 286.6 (130.0 kg)


  #14750    
Old May 26th, 2010, 02:48 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by NikoBelic999 View Post
There is something wrong with my Ruby Rom that I was changing in Advanced Map...

"The Position MapBankHeader can't be found!"

"AdvanceMapError(1) Try to Read at 0!"

"AdvanceMapError(5): The Value at $000000 is not a pointer!"

What does this mean?
Did you apply a rom base? You may need a different version of the game if you apply a base.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
Closed Thread
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:59 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.