explicit conversions to get rid of some warnings

fixed some issues with structures (types' size)
This commit is contained in:
damdoum 2007-02-23 14:23:02 +00:00
parent a2a2547351
commit a3e5dd1261
9 changed files with 480 additions and 357 deletions

View File

@ -238,7 +238,6 @@ void GPU_setVideoProp(GPU * gpu, u32 p)
u16 WinBG=0; u16 WinBG=0;
struct _DISPCNT * cnt; struct _DISPCNT * cnt;
cnt = &(gpu->dispx_st)->dispx_DISPCNT.bits; cnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
// cnt = &gpu->dispCnt.bits;
(gpu->dispx_st)->dispx_DISPCNT.val = p; (gpu->dispx_st)->dispx_DISPCNT.val = p;
@ -354,6 +353,7 @@ void GPU_remove(GPU * gpu, u8 num)
} }
void GPU_addBack(GPU * gpu, u8 num) void GPU_addBack(GPU * gpu, u8 num)
{ {
REG_DISPx_pack_test(gpu);
if (num == 4) gpu->dispOBJ = 1; if (num == 4) gpu->dispOBJ = 1;
else gpu->dispBG[num] = 1; else gpu->dispBG[num] = 1;
GPU_resortBGs(gpu); GPU_resortBGs(gpu);
@ -377,63 +377,6 @@ void GPU_scrollXY(GPU * gpu, u8 num, u32 v)
gpu->BGSY[num] = (v >> 16); gpu->BGSY[num] = (v >> 16);
} }
void GPU_setX(GPU * gpu, u8 num, u32 v)
{
gpu->BGX[num] = (((s32)(v<<4))>>4);
}
void GPU_setXH(GPU * gpu, u8 num, u16 v)
{
gpu->BGX[num] = (((s32)((s16)(v<<4)))<<12) | (gpu->BGX[num]&0xFFFF);
}
void GPU_setXL(GPU * gpu, u8 num, u16 v)
{
gpu->BGX[num] = (gpu->BGX[num]&0xFFFF0000) | v;
}
void GPU_setY(GPU * gpu, u8 num, u32 v)
{
gpu->BGY[num] = (((s32)(v<<4))>>4);
}
void GPU_setYH(GPU * gpu, u8 num, u16 v)
{
gpu->BGY[num] = (((s32)((s16)(v<<4)))<<12) | (gpu->BGY[num]&0xFFFF);
}
void GPU_setYL(GPU * gpu, u8 num, u16 v)
{
gpu->BGY[num] = (gpu->BGY[num]&0xFFFF0000) | v;
}
/*****************************************************************************/
// PARAMETERS OF ROTOSCALE
/*****************************************************************************/
void GPU_setPA(GPU * gpu, u8 num, u16 v)
{
gpu->BGPA[num] = (s32)v;
}
void GPU_setPB(GPU * gpu, u8 num, u16 v)
{
gpu->BGPB[num] = (s32)v;
}
void GPU_setPC(GPU * gpu, u8 num, u16 v)
{
gpu->BGPC[num] = (s32)v;
}
void GPU_setPD(GPU * gpu, u8 num, u16 v)
{
gpu->BGPD[num] = (s32)v;
}
void GPU_setPAPB(GPU * gpu, u8 num, u32 v)
{
gpu->BGPA[num] = (s16)v;
gpu->BGPB[num] = (s16)(v>>16);
}
void GPU_setPCPD(GPU * gpu, u8 num, u32 v)
{
gpu->BGPC[num] = (s16)v;
gpu->BGPD[num] = (s16)(v>>16);
}
/*****************************************************************************/ /*****************************************************************************/
// PARAMETERS OF EFFECTS // PARAMETERS OF EFFECTS
/*****************************************************************************/ /*****************************************************************************/
@ -454,10 +397,6 @@ void GPU_setMOSAIC(GPU *gpu, u16 v)
{ {
gpu->MOSAIC = v ; gpu->MOSAIC = v ;
} }
void GPU_setMASTER_BRIGHT (GPU *gpu, u16 v)
{
// gpu->masterBright.val = v;
}
/*****************************************************************************/ /*****************************************************************************/
// PARAMETERS OF WINDOWS // PARAMETERS OF WINDOWS
@ -1498,7 +1437,7 @@ BOOL bright_init=FALSE;
// #define BRIGHT_TABLES // #define BRIGHT_TABLES
void calc_bright_colors() { void calc_bright_colors() {
int base = /*gpu->masterBright.bits.FactorEx? 63:*/ 31 ; int base = 31 ;
int factor; int factor;
u16 red, green, blue; u16 red, green, blue;
COLOR color_more, color_less, color_ref; COLOR color_more, color_less, color_ref;
@ -1671,7 +1610,7 @@ void GPU_ligne(NDS_Screen * screen, u16 l)
srcA = (u16*)dst; srcA = (u16*)dst;
if (!capcnt->Source_B) { if (!capcnt->Source_B) {
vram_bank = gpu->dispCnt.bits.VRAM_Block ; vram_bank = dispCnt->VRAM_Block ;
if (MMU.vram_mode[vram_bank] & 4) { if (MMU.vram_mode[vram_bank] & 4) {
srcB = (u16*)(ARM9Mem.ARM9_LCD srcB = (u16*)(ARM9Mem.ARM9_LCD
+ (MMU.vram_mode[vram_bank] & 3) * 0x20000 + (MMU.vram_mode[vram_bank] & 3) * 0x20000
@ -1793,7 +1732,7 @@ void GPU_ligne(NDS_Screen * screen, u16 l)
g = dstColor.bits.green; g = dstColor.bits.green;
b = dstColor.bits.blue; b = dstColor.bits.blue;
// Bright up and clamp to 5bit <-- automatic // Bright up and clamp to 5bit <-- automatic
base = /*gpu->masterBright.bits.FactorEx? 63:*/ 31 ; base = 31 ;
dstColor.bits.red = r + ((base-r)*masterBrightFactor)/16; dstColor.bits.red = r + ((base-r)*masterBrightFactor)/16;
dstColor.bits.green = g + ((base-g)*masterBrightFactor)/16; dstColor.bits.green = g + ((base-g)*masterBrightFactor)/16;
dstColor.bits.blue = b + ((base-b)*masterBrightFactor)/16; dstColor.bits.blue = b + ((base-b)*masterBrightFactor)/16;

View File

@ -131,12 +131,12 @@ typedef struct {
*******************************************************************************/ *******************************************************************************/
typedef struct { typedef struct {
u16 BGxPA; s16 BGxPA;
u16 BGxPB; s16 BGxPB;
u16 BGxPC; s16 BGxPC;
u16 BGxPD; s16 BGxPD;
u32 BGxX; s32 BGxX;
u32 BGxY; s32 BGxY;
} BGxPARMS; } BGxPARMS;
@ -189,7 +189,8 @@ struct _DISP3DCNT
/*12*/ u8 AckColorBufferUnderflow:1; // Color Buffer RDLINES Underflow (0=None, 1=Underflow/Acknowledge) /*12*/ u8 AckColorBufferUnderflow:1; // Color Buffer RDLINES Underflow (0=None, 1=Underflow/Acknowledge)
/*13*/ u8 AckVertexRAMOverflow:1; // Polygon/Vertex RAM Overflow (0=None, 1=Overflow/Acknowledge) /*13*/ u8 AckVertexRAMOverflow:1; // Polygon/Vertex RAM Overflow (0=None, 1=Overflow/Acknowledge)
/*14*/ u8 RearPlaneMode:1; // 0=Blank, 1=Bitmap /*14*/ u8 RearPlaneMode:1; // 0=Blank, 1=Bitmap
/*15*/ u8 :17; /*15*/ u8 :1;
/*16*/ u16 :16;
}; };
typedef union typedef union
@ -243,7 +244,8 @@ struct _MASTER_BRIGHT
{ {
/* 0*/ u8 Factor:4; // combine with (Factor / 16) of white/black /* 0*/ u8 Factor:4; // combine with (Factor / 16) of white/black
/* 4*/ u8 FactorEx:1; // if true use white or black /* 4*/ u8 FactorEx:1; // if true use white or black
/* 5*/ u8 :9; /* 5*/ u8 :3;
/* 8*/ u8 :5;
/*14*/ u8 Mode:2; // 0=off, 1=Lighten, 2=Darken, 3=? /*14*/ u8 Mode:2; // 0=off, 1=Lighten, 2=Darken, 3=?
}; };
@ -275,26 +277,6 @@ typedef struct _reg_dispx {
MASTER_BRIGHT dispx_MASTERBRIGHT; // 0x0400x06C MASTER_BRIGHT dispx_MASTERBRIGHT; // 0x0400x06C
} REG_DISPx ; } REG_DISPx ;
// normally should have same addresses
static void REG_DISPx_pack_test(GPU * gpu)
{
REG_DISPx * r = gpu->dispx_st;
printf ("%08x %02x\n", r, (long)(&r->dispx_DISPCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPSTAT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_VCOUNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BGxCNT[0]) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BGxOFS[0]) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BG2PARMS) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BG3PARMS) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_WINCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_MISC) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISP3DCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPCAPCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPMMEMFIFO) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_MASTERBRIGHT) - (long)r);
}
@ -538,10 +520,7 @@ struct _GPU
// some functions too (no need to recopy some vars as it is done by MMU) // some functions too (no need to recopy some vars as it is done by MMU)
REG_DISPx * dispx_st; REG_DISPx * dispx_st;
// DISPCNT dispCnt;
DISPCAPCNT dispCapCnt; DISPCAPCNT dispCapCnt;
// BGxCNT bgCnt[4];
// MASTER_BRIGHT masterBright;
BOOL LayersEnable[5]; BOOL LayersEnable[5];
itemsForPriority_t itemsForPriority[NB_PRIORITIES]; itemsForPriority_t itemsForPriority[NB_PRIORITIES];
u8 sprWin[256*2][256]; u8 sprWin[256*2][256];
@ -558,13 +537,6 @@ struct _GPU
u16 BGSX[4]; u16 BGSX[4];
u16 BGSY[4]; u16 BGSY[4];
s32 BGX[4];
s32 BGY[4];
s16 BGPA[4];
s16 BGPB[4];
s16 BGPC[4];
s16 BGPD[4];
u8 lcd; u8 lcd;
u8 core; u8 core;
@ -594,6 +566,27 @@ struct _GPU
void (*spriteRender)(GPU * gpu, u16 l, u8 * dst, u8 * prioTab); void (*spriteRender)(GPU * gpu, u16 l, u8 * dst, u8 * prioTab);
}; };
// normally should have same addresses
static void REG_DISPx_pack_test(GPU * gpu)
{
REG_DISPx * r = gpu->dispx_st;
printf ("%08x %02x\n", r, (long)(&r->dispx_DISPCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPSTAT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_VCOUNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BGxCNT[0]) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BGxOFS[0]) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BG2PARMS) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_BG3PARMS) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_WINCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_MISC) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISP3DCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPCAPCNT) - (long)r);
printf ("\t%02x\n", (long)(&r->dispA_DISPMMEMFIFO) - (long)r);
printf ("\t%02x\n", (long)(&r->dispx_MASTERBRIGHT) - (long)r);
printf ("\t%04x\n", r->dispx_MASTERBRIGHT);
}
extern u8 GPU_screen[4*256*192]; extern u8 GPU_screen[4*256*192];
@ -651,23 +644,7 @@ void GPU_setBGProp(GPU *, u16 num, u16 p);
void GPU_scrollX(GPU *, u8 num, u16 v); void GPU_scrollX(GPU *, u8 num, u16 v);
void GPU_scrollY(GPU *, u8 num, u16 v); void GPU_scrollY(GPU *, u8 num, u16 v);
// no more useful if using REG_DISPx
void GPU_setXH(GPU *, u8 num, u16 v);
void GPU_setXL(GPU *, u8 num, u16 v);
void GPU_setYH(GPU *, u8 num, u16 v);
void GPU_setYL(GPU *, u8 num, u16 v);
void GPU_setPA(GPU *, u8 num, u16 v);
void GPU_setPB(GPU *, u8 num, u16 v);
void GPU_setPC(GPU *, u8 num, u16 v);
void GPU_setPD(GPU *, u8 num, u16 v);
void GPU_scrollXY(GPU *, u8 num, u32 v); void GPU_scrollXY(GPU *, u8 num, u32 v);
// no more useful if using REG_DISPx
void GPU_setX(GPU *, u8 num, u32 v);
void GPU_setY(GPU *, u8 num, u32 v);
void GPU_setPAPB(GPU *, u8 num, u32 v);
void GPU_setPCPD(GPU *, u8 num, u32 v);
void GPU_setBLDCNT(GPU *gpu, u16 v) ; void GPU_setBLDCNT(GPU *gpu, u16 v) ;
void GPU_setBLDALPHA(GPU *gpu, u16 v) ; void GPU_setBLDALPHA(GPU *gpu, u16 v) ;
@ -684,7 +661,6 @@ void GPU_setWINDOW_OUTCNT(GPU *gpu, u16 v) ;
void GPU_setWINDOW_INCNT_Component(GPU *gpu, u8 v,u8 num) ; void GPU_setWINDOW_INCNT_Component(GPU *gpu, u8 v,u8 num) ;
void GPU_setWINDOW_OUTCNT_Component(GPU *gpu, u8 v,u8 num) ; void GPU_setWINDOW_OUTCNT_Component(GPU *gpu, u8 v,u8 num) ;
void GPU_setMASTER_BRIGHT (GPU *gpu, u16 v);
void GPU_remove(GPU *, u8 num); void GPU_remove(GPU *, u8 num);
void GPU_addBack(GPU *, u8 num); void GPU_addBack(GPU *, u8 num);

View File

@ -1062,18 +1062,6 @@ void FASTCALL MMU_write8(u32 proc, u32 adr, u8 val)
case REG_DISPB_WINOUT+1: case REG_DISPB_WINOUT+1:
if(proc == ARMCPU_ARM9) GPU_setWINDOW_OUTCNT_Component(SubScreen.gpu,val,1) ; if(proc == ARMCPU_ARM9) GPU_setWINDOW_OUTCNT_Component(SubScreen.gpu,val,1) ;
break ; break ;
case REG_DISPA_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (MainScreen.gpu, (val & 0xFF) | (T1ReadWord((u8 *)REG_DISPA_MASTERBRIGHT,0) & 0xFF00));
break;
case REG_DISPA_MASTERBRIGHT+1:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (MainScreen.gpu, (val & 0xFF00) | (T1ReadWord((u8 *)REG_DISPA_MASTERBRIGHT,0) & 0xFF));
break;
case REG_DISPB_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (SubScreen.gpu, (val & 0xFF) | (T1ReadWord((u8 *)REG_DISPB_MASTERBRIGHT,0) & 0xFF00));
break;
case REG_DISPB_MASTERBRIGHT+1:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (SubScreen.gpu, (val & 0xFF00) | (T1ReadWord((u8 *)REG_DISPB_MASTERBRIGHT,0) & 0xFF));
break;
#ifdef LOG_CARD #ifdef LOG_CARD
case 0x040001A0 : /* TODO (clear): ??? */ case 0x040001A0 : /* TODO (clear): ??? */
@ -1363,102 +1351,6 @@ void FASTCALL MMU_write16(u32 proc, u32 adr, u16 val)
case REG_DISPB_BG3VOFS : case REG_DISPB_BG3VOFS :
if(proc == ARMCPU_ARM9) GPU_scrollY(SubScreen.gpu, 3, val); if(proc == ARMCPU_ARM9) GPU_scrollY(SubScreen.gpu, 3, val);
return; return;
case REG_DISPA_BG2PA :
if(proc == ARMCPU_ARM9) GPU_setPA(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2PB :
if(proc == ARMCPU_ARM9) GPU_setPB(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2PC :
if(proc == ARMCPU_ARM9) GPU_setPC(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2PD :
if(proc == ARMCPU_ARM9) GPU_setPD(MainScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PA :
if(proc == ARMCPU_ARM9) GPU_setPA(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PB :
if(proc == ARMCPU_ARM9) GPU_setPB(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PC :
if(proc == ARMCPU_ARM9) GPU_setPC(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PD :
if(proc == ARMCPU_ARM9) GPU_setPD(SubScreen.gpu, 2, val);
return;
case REG_DISPA_BG3PA :
if(proc == ARMCPU_ARM9) GPU_setPA(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3PB :
if(proc == ARMCPU_ARM9) GPU_setPB(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3PC :
if(proc == ARMCPU_ARM9) GPU_setPC(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3PD :
if(proc == ARMCPU_ARM9) GPU_setPD(MainScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PA :
if(proc == ARMCPU_ARM9) GPU_setPA(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PB :
if(proc == ARMCPU_ARM9) GPU_setPB(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PC :
if(proc == ARMCPU_ARM9) GPU_setPC(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PD :
if(proc == ARMCPU_ARM9) GPU_setPD(SubScreen.gpu, 3, val);
return;
case REG_DISPA_BG2XL :
if(proc == ARMCPU_ARM9) GPU_setXL(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2XH :
if(proc == ARMCPU_ARM9) GPU_setXH(MainScreen.gpu, 2, val);
return;
case REG_DISPB_BG2XL :
if(proc == ARMCPU_ARM9) GPU_setXL(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2XH :
if(proc == ARMCPU_ARM9) GPU_setXH(SubScreen.gpu, 2, val);
return;
case REG_DISPA_BG3XL :
if(proc == ARMCPU_ARM9) GPU_setXL(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3XH :
if(proc == ARMCPU_ARM9) GPU_setXH(MainScreen.gpu, 3, val);
return;
case REG_DISPB_BG3XL :
if(proc == ARMCPU_ARM9) GPU_setXL(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3XH :
if(proc == ARMCPU_ARM9) GPU_setXH(SubScreen.gpu, 3, val);
return;
case REG_DISPA_BG2YL :
if(proc == ARMCPU_ARM9) GPU_setYL(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2YH :
if(proc == ARMCPU_ARM9) GPU_setYH(MainScreen.gpu, 2, val);
return;
case REG_DISPB_BG2YL :
if(proc == ARMCPU_ARM9) GPU_setYL(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2YH :
if(proc == ARMCPU_ARM9) GPU_setYH(SubScreen.gpu, 2, val);
return;
case REG_DISPA_BG3YL :
if(proc == ARMCPU_ARM9) GPU_setYL(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3YH :
if(proc == ARMCPU_ARM9) GPU_setYH(MainScreen.gpu, 3, val);
return;
case REG_DISPB_BG3YL :
if(proc == ARMCPU_ARM9) GPU_setYL(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3YH :
if(proc == ARMCPU_ARM9) GPU_setYH(SubScreen.gpu, 3, val);
return;
case REG_DISPA_BG0CNT : case REG_DISPA_BG0CNT :
//GPULOG("MAIN BG0 SETPROP 16B %08X\r\n", val); //GPULOG("MAIN BG0 SETPROP 16B %08X\r\n", val);
if(proc == ARMCPU_ARM9) GPU_setBGProp(MainScreen.gpu, 0, val); if(proc == ARMCPU_ARM9) GPU_setBGProp(MainScreen.gpu, 0, val);
@ -1523,12 +1415,6 @@ void FASTCALL MMU_write16(u32 proc, u32 adr, u16 val)
case REG_DISPB_MOSAIC: case REG_DISPB_MOSAIC:
if(proc == ARMCPU_ARM9) GPU_setMOSAIC(SubScreen.gpu,val) ; if(proc == ARMCPU_ARM9) GPU_setMOSAIC(SubScreen.gpu,val) ;
break ; break ;
case REG_DISPA_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (MainScreen.gpu, val);
break;
case REG_DISPB_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (SubScreen.gpu, val);
break;
case REG_DISPA_WIN0H: case REG_DISPA_WIN0H:
if(proc == ARMCPU_ARM9) GPU_setWINDOW_XDIM(MainScreen.gpu,val,0) ; if(proc == ARMCPU_ARM9) GPU_setWINDOW_XDIM(MainScreen.gpu,val,0) ;
break ; break ;
@ -1932,56 +1818,6 @@ void FASTCALL MMU_write32(u32 proc, u32 adr, u32 val)
if (proc == ARMCPU_ARM9) gl_print_cmd(adr); if (proc == ARMCPU_ARM9) gl_print_cmd(adr);
return; return;
case REG_DISPA_BG2PA :
if (proc == ARMCPU_ARM9) GPU_setPAPB(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2PC :
if (proc == ARMCPU_ARM9) GPU_setPCPD(MainScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PA :
if (proc == ARMCPU_ARM9) GPU_setPAPB(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2PC :
if (proc == ARMCPU_ARM9) GPU_setPCPD(SubScreen.gpu, 2, val);
return;
case REG_DISPA_BG3PA :
if (proc == ARMCPU_ARM9) GPU_setPAPB(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3PC :
if (proc == ARMCPU_ARM9) GPU_setPCPD(MainScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PA :
if (proc == ARMCPU_ARM9) GPU_setPAPB(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3PC :
if (proc == ARMCPU_ARM9) GPU_setPCPD(SubScreen.gpu, 3, val);
return;
case REG_DISPA_BG2XL :
if (proc == ARMCPU_ARM9) GPU_setX(MainScreen.gpu, 2, val);
return;
case REG_DISPA_BG2YL :
if (proc == ARMCPU_ARM9) GPU_setY(MainScreen.gpu, 2, val);
return;
case REG_DISPB_BG2XL :
if (proc == ARMCPU_ARM9) GPU_setX(SubScreen.gpu, 2, val);
return;
case REG_DISPB_BG2YL :
if (proc == ARMCPU_ARM9) GPU_setY(SubScreen.gpu, 2, val);
return;
case REG_DISPA_BG3XL :
if (proc == ARMCPU_ARM9) GPU_setX(MainScreen.gpu, 3, val);
return;
case REG_DISPA_BG3YL :
if (proc == ARMCPU_ARM9) GPU_setY(MainScreen.gpu, 3, val);
return;
case REG_DISPB_BG3XL :
if (proc == ARMCPU_ARM9) GPU_setX(SubScreen.gpu, 3, val);
return;
case REG_DISPB_BG3YL :
if (proc == ARMCPU_ARM9) GPU_setY(SubScreen.gpu, 3, val);
return;
case REG_DISPA_BG0HOFS : case REG_DISPA_BG0HOFS :
if (proc == ARMCPU_ARM9) GPU_scrollXY(MainScreen.gpu, 0, val); if (proc == ARMCPU_ARM9) GPU_scrollXY(MainScreen.gpu, 0, val);
return; return;
@ -2032,12 +1868,6 @@ void FASTCALL MMU_write32(u32 proc, u32 adr, u32 val)
GPU_setWINDOW_OUTCNT(SubScreen.gpu, (val >> 16) & 0xFFFF) ; GPU_setWINDOW_OUTCNT(SubScreen.gpu, (val >> 16) & 0xFFFF) ;
} }
break ; break ;
case REG_DISPA_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (MainScreen.gpu, val & 0xFFFF);
break;
case REG_DISPB_MASTERBRIGHT:
if(proc == ARMCPU_ARM9) GPU_setMASTER_BRIGHT (SubScreen.gpu, val & 0xFFFF);
break;
case REG_VRAMCNTA: case REG_VRAMCNTA:
case REG_VRAMCNTE: case REG_VRAMCNTE:
MMU_write8(proc,adr,val & 0xFF) ; MMU_write8(proc,adr,val & 0xFF) ;

View File

@ -100,7 +100,7 @@ ROMReader_struct GZIPROMReader =
void * GZIPROMReaderInit(const char * filename) void * GZIPROMReaderInit(const char * filename)
{ {
return gzopen(filename, "rb"); return (void*)gzopen(filename, "rb");
} }
void GZIPROMReaderDeInit(void * file) void GZIPROMReaderDeInit(void * file)

View File

@ -1,7 +1,7 @@
[Project] [Project]
FileName=DeSmuME.dev FileName=DeSmuME.dev
Name=DeSmuME Name=DeSmuME
UnitCount=69 UnitCount=107
Type=1 Type=1
Ver=1 Ver=1
ObjFiles= ObjFiles=
@ -20,7 +20,7 @@ ObjectOutput=
OverrideOutput=0 OverrideOutput=0
OverrideOutputName=DeSmuME.exe OverrideOutputName=DeSmuME.exe
HostApplication= HostApplication=
Folders=gtk-glade,gtk-glade/dTools Folders=gtk-glade,gtk-glade/dTools,nocompile,nocompile/cli,nocompile/gtk,nocompile/windows
CommandLine= CommandLine=
UseCustomMakefile=0 UseCustomMakefile=0
CustomMakefile= CustomMakefile=
@ -132,7 +132,7 @@ BuildCmd=
[Unit11] [Unit11]
FileName=..\ARM9.h FileName=..\ARM9.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -142,7 +142,7 @@ BuildCmd=
[Unit12] [Unit12]
FileName=..\arm_instructions.c FileName=..\arm_instructions.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -152,7 +152,7 @@ BuildCmd=
[Unit13] [Unit13]
FileName=..\arm_instructions.h FileName=..\arm_instructions.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -162,7 +162,7 @@ BuildCmd=
[Unit14] [Unit14]
FileName=..\armcpu.c FileName=..\armcpu.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -172,7 +172,7 @@ BuildCmd=
[Unit15] [Unit15]
FileName=..\armcpu.h FileName=..\armcpu.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -182,7 +182,7 @@ BuildCmd=
[Unit16] [Unit16]
FileName=..\bios.c FileName=..\bios.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -192,7 +192,7 @@ BuildCmd=
[Unit17] [Unit17]
FileName=..\bios.h FileName=..\bios.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -202,7 +202,7 @@ BuildCmd=
[Unit18] [Unit18]
FileName=..\bits.h FileName=..\bits.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -212,7 +212,7 @@ BuildCmd=
[Unit19] [Unit19]
FileName=..\cflash.c FileName=..\cflash.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -222,7 +222,7 @@ BuildCmd=
[Unit20] [Unit20]
FileName=..\cflash.h FileName=..\cflash.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -232,7 +232,7 @@ BuildCmd=
[Unit21] [Unit21]
FileName=..\config.h FileName=..\config.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -242,7 +242,7 @@ BuildCmd=
[Unit22] [Unit22]
FileName=..\cp15.c FileName=..\cp15.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -252,7 +252,7 @@ BuildCmd=
[Unit23] [Unit23]
FileName=..\cp15.h FileName=..\cp15.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -262,7 +262,7 @@ BuildCmd=
[Unit24] [Unit24]
FileName=..\ctrlssdl.c FileName=..\ctrlssdl.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -272,7 +272,7 @@ BuildCmd=
[Unit25] [Unit25]
FileName=..\ctrlssdl.h FileName=..\ctrlssdl.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -282,7 +282,7 @@ BuildCmd=
[Unit26] [Unit26]
FileName=..\debug.c FileName=..\debug.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -292,7 +292,7 @@ BuildCmd=
[Unit27] [Unit27]
FileName=..\debug.h FileName=..\debug.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -302,7 +302,7 @@ BuildCmd=
[Unit28] [Unit28]
FileName=..\Disassembler.c FileName=..\Disassembler.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -312,7 +312,7 @@ BuildCmd=
[Unit29] [Unit29]
FileName=..\Disassembler.h FileName=..\Disassembler.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -322,7 +322,7 @@ BuildCmd=
[Unit30] [Unit30]
FileName=..\dscard.h FileName=..\dscard.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -332,7 +332,7 @@ BuildCmd=
[Unit31] [Unit31]
FileName=..\fat.h FileName=..\fat.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -342,7 +342,7 @@ BuildCmd=
[Unit32] [Unit32]
FileName=..\FIFO.c FileName=..\FIFO.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -352,7 +352,7 @@ BuildCmd=
[Unit33] [Unit33]
FileName=..\FIFO.h FileName=..\FIFO.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -362,7 +362,7 @@ BuildCmd=
[Unit34] [Unit34]
FileName=..\fs.h FileName=..\fs.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -372,7 +372,7 @@ BuildCmd=
[Unit35] [Unit35]
FileName=..\fs-windows.c FileName=..\fs-windows.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -382,7 +382,7 @@ BuildCmd=
[Unit36] [Unit36]
FileName=..\GPU.c FileName=..\GPU.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -392,7 +392,7 @@ BuildCmd=
[Unit37] [Unit37]
FileName=..\GPU.h FileName=..\GPU.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -402,7 +402,7 @@ BuildCmd=
[Unit38] [Unit38]
FileName=..\mc.c FileName=..\mc.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -412,7 +412,7 @@ BuildCmd=
[Unit39] [Unit39]
FileName=..\mc.h FileName=..\mc.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -422,7 +422,7 @@ BuildCmd=
[Unit40] [Unit40]
FileName=..\mem.h FileName=..\mem.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -432,7 +432,7 @@ BuildCmd=
[Unit41] [Unit41]
FileName=..\MMU.c FileName=..\MMU.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -442,7 +442,7 @@ BuildCmd=
[Unit42] [Unit42]
FileName=..\MMU.h FileName=..\MMU.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -452,7 +452,7 @@ BuildCmd=
[Unit43] [Unit43]
FileName=..\NDSSystem.c FileName=..\NDSSystem.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -462,7 +462,7 @@ BuildCmd=
[Unit44] [Unit44]
FileName=..\NDSSystem.h FileName=..\NDSSystem.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -472,7 +472,7 @@ BuildCmd=
[Unit45] [Unit45]
FileName=..\registers.h FileName=..\registers.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -482,7 +482,7 @@ BuildCmd=
[Unit46] [Unit46]
FileName=..\ROMReader.c FileName=..\ROMReader.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -492,7 +492,7 @@ BuildCmd=
[Unit47] [Unit47]
FileName=..\ROMReader.h FileName=..\ROMReader.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -502,7 +502,7 @@ BuildCmd=
[Unit48] [Unit48]
FileName=..\saves.c FileName=..\saves.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -512,7 +512,7 @@ BuildCmd=
[Unit49] [Unit49]
FileName=..\saves.h FileName=..\saves.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -522,7 +522,7 @@ BuildCmd=
[Unit50] [Unit50]
FileName=..\sndsdl.c FileName=..\sndsdl.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -532,7 +532,7 @@ BuildCmd=
[Unit51] [Unit51]
FileName=..\sndsdl.h FileName=..\sndsdl.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -542,7 +542,7 @@ BuildCmd=
[Unit52] [Unit52]
FileName=..\SPU.c FileName=..\SPU.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -552,7 +552,7 @@ BuildCmd=
[Unit53] [Unit53]
FileName=..\SPU.h FileName=..\SPU.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -562,7 +562,7 @@ BuildCmd=
[Unit54] [Unit54]
FileName=..\thumb_instructions.c FileName=..\thumb_instructions.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -572,7 +572,7 @@ BuildCmd=
[Unit55] [Unit55]
FileName=..\thumb_instructions.h FileName=..\thumb_instructions.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -582,7 +582,7 @@ BuildCmd=
[Unit56] [Unit56]
FileName=..\types.h FileName=..\types.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -592,7 +592,7 @@ BuildCmd=
[Unit57] [Unit57]
FileName=..\wifi.c FileName=..\wifi.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -602,7 +602,7 @@ BuildCmd=
[Unit58] [Unit58]
FileName=..\wifi.h FileName=..\wifi.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -710,7 +710,7 @@ BuildCmd=
[Unit67] [Unit67]
FileName=..\gl_vertex.c FileName=..\gl_vertex.c
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -720,7 +720,7 @@ BuildCmd=
[Unit68] [Unit68]
FileName=..\gl_vertex.h FileName=..\gl_vertex.h
CompileCpp=0 CompileCpp=0
Folder=DeSmuME Folder=
Compile=1 Compile=1
Link=1 Link=1
Priority=1000 Priority=1000
@ -737,3 +737,381 @@ Priority=1000
OverrideBuildCmd=0 OverrideBuildCmd=0
BuildCmd= BuildCmd=
[Unit70]
FileName=..\cli\main.c
CompileCpp=0
Folder=nocompile/cli
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c main.c -o main.o $(CFLAGS)
[Unit71]
FileName=..\gtk\desmume.c
CompileCpp=0
Folder=nocompile/gtk
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c desmume.c -o desmume.o $(CFLAGS)
[Unit72]
FileName=..\gtk\desmume.h
CompileCpp=0
Folder=nocompile/gtk
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit73]
FileName=..\gtk\dTool.h
CompileCpp=0
Folder=nocompile/gtk
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit74]
FileName=..\gtk\dToolsList.c
CompileCpp=0
Folder=nocompile/gtk
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c dToolsList.c -o dToolsList.o $(CFLAGS)
[Unit75]
FileName=..\gtk\globals.h
CompileCpp=0
Folder=nocompile/gtk
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit76]
FileName=..\gtk\gtk-compat.c
CompileCpp=0
Folder=nocompile/gtk
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c gtk-compat.c -o gtk-compat.o $(CFLAGS)
[Unit77]
FileName=..\gtk\gtk-compat.h
CompileCpp=0
Folder=nocompile/gtk
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit78]
FileName=..\gtk\main.c
CompileCpp=0
Folder=nocompile/gtk
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c main.c -o main.o $(CFLAGS)
[Unit79]
FileName=..\gtk\tools\ioregsView.c
CompileCpp=0
Folder=nocompile/gtk
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c ioregsView.c -o ioregsView.o $(CFLAGS)
[Unit80]
FileName=..\gtk\tools\ioregsView.h
CompileCpp=0
Folder=nocompile/gtk
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit81]
FileName=..\windows\memView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit82]
FileName=..\windows\oamView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c oamView.c -o oamView.o $(CFLAGS)
[Unit83]
FileName=..\windows\oamView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit84]
FileName=..\windows\palView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c palView.c -o palView.o $(CFLAGS)
[Unit85]
FileName=..\windows\palView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit86]
FileName=..\windows\resource.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit87]
FileName=..\windows\resources.rc
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit88]
FileName=..\windows\snddx.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c snddx.c -o snddx.o $(CFLAGS)
[Unit89]
FileName=..\windows\snddx.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit90]
FileName=..\windows\tileView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c tileView.c -o tileView.o $(CFLAGS)
[Unit91]
FileName=..\windows\tileView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit92]
FileName=..\windows\yopyop_private.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit93]
FileName=..\windows\yopyop_private.rc
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit94]
FileName=..\windows\ConfigKeys.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c ConfigKeys.c -o ConfigKeys.o $(CFLAGS)
[Unit95]
FileName=..\windows\ConfigKeys.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit96]
FileName=..\windows\CWindow.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c CWindow.c -o CWindow.o $(CFLAGS)
[Unit97]
FileName=..\windows\CWindow.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit98]
FileName=..\windows\disView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c disView.c -o disView.o $(CFLAGS)
[Unit99]
FileName=..\windows\disView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit100]
FileName=..\windows\ginfo.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c ginfo.c -o ginfo.o $(CFLAGS)
[Unit101]
FileName=..\windows\ginfo.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit102]
FileName=..\windows\IORegView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c IORegView.c -o IORegView.o $(CFLAGS)
[Unit103]
FileName=..\windows\IORegView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit104]
FileName=..\windows\main.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c main.c -o main.o $(CFLAGS)
[Unit105]
FileName=..\windows\mapView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c mapView.c -o mapView.o $(CFLAGS)
[Unit106]
FileName=..\windows\mapView.h
CompileCpp=0
Folder=nocompile/windows
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit107]
FileName=..\windows\memView.c
CompileCpp=0
Folder=nocompile/windows
Compile=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c memView.c -o memView.o $(CFLAGS)

View File

@ -206,7 +206,7 @@ gboolean on_wDrawScreen_scroll_event (GtkWidget *widget, GdkEvent *event, gpoin
int scr = dyn_CAST(int,user_data); int scr = dyn_CAST(int,user_data);
// separate zoom factors not supported yet // separate zoom factors not supported yet
scr = 0; scr = 0;
resize_incremental(scr,event); resize_incremental(scr,(GdkEventScroll*)event);
} }
void set_touch_pos (int x, int y) { void set_touch_pos (int x, int y) {
@ -383,7 +383,7 @@ void ask_joy_axis(u8 key, u8 opposite_key)
char current_button[50], opposite_button[50]; char current_button[50], opposite_button[50];
u16 joykey; u16 joykey;
GtkWidget * dlg; GtkWidget * dlg;
GtkWidget * btn; GtkButton * btn;
key--; /* remove 1 to get index */ key--; /* remove 1 to get index */
opposite_key--; opposite_key--;
@ -398,11 +398,11 @@ void ask_joy_axis(u8 key, u8 opposite_key)
get_set_joy_axis(key, opposite_key); get_set_joy_axis(key, opposite_key);
sprintf(text,"%s : %d\0\0",key_names[key],joypad_cfg[key]); sprintf(text,"%s : %d\0\0",key_names[key],joypad_cfg[key]);
btn = (GtkWidget*)glade_xml_get_widget(xml, current_button); btn = (GtkButton*)glade_xml_get_widget(xml, current_button);
gtk_button_set_label(btn,text); gtk_button_set_label(btn,text);
sprintf(text,"%s : %d\0\0",key_names[opposite_key],joypad_cfg[opposite_key]); sprintf(text,"%s : %d\0\0",key_names[opposite_key],joypad_cfg[opposite_key]);
btn = (GtkWidget*)glade_xml_get_widget(xml, opposite_button); btn = (GtkButton*)glade_xml_get_widget(xml, opposite_button);
gtk_button_set_label(btn,text); gtk_button_set_label(btn,text);
gtk_widget_hide((GtkWidget*)dlg); gtk_widget_hide((GtkWidget*)dlg);

View File

@ -24,7 +24,7 @@
void init_combo_palette(GtkComboBox *combo, u16 ** addresses) { void init_combo_palette(GtkComboBox *combo, u16 ** addresses) {
GtkTreeIter iter; GtkTreeIter iter;
GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING); GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING);
gtk_combo_box_set_model(combo, model); gtk_combo_box_set_model(combo, (GtkTreeModel*)model);
int i=0; int i=0;

View File

@ -24,7 +24,7 @@
void init_combo_memory(GtkComboBox *combo, u8 ** addresses) { void init_combo_memory(GtkComboBox *combo, u8 ** addresses) {
GtkTreeIter iter; GtkTreeIter iter;
GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING); GtkListStore* model = gtk_list_store_new(1, G_TYPE_STRING);
gtk_combo_box_set_model(combo, model); gtk_combo_box_set_model(combo, (GtkTreeModel*)model);
int i=0; int i=0;
#define DO(str,addr,r) \ #define DO(str,addr,r) \
@ -261,6 +261,7 @@ void other_screen (GtkWidget * widget, int screen) {
glClear( GL_COLOR_BUFFER_BIT ); glClear( GL_COLOR_BUFFER_BIT );
GPU * gpu = &SubScreen; GPU * gpu = &SubScreen;
struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
_OAM_ * spriteInfo = (_OAM_*)(gpu->oam + 127);// + 127; _OAM_ * spriteInfo = (_OAM_*)(gpu->oam + 127);// + 127;
u16 i; int mode; u16 i; int mode;
u8 prioTab[256]; u8 prioTab[256];
@ -315,7 +316,7 @@ void other_screen (GtkWidget * widget, int screen) {
{ {
src = (gpu->sprMem) + (spriteInfo->TileIndex<<4) + (y<<gpu->sprBMPBoundary); src = (gpu->sprMem) + (spriteInfo->TileIndex<<4) + (y<<gpu->sprBMPBoundary);
if (gpu->dispCnt.bits.OBJ_BMP_2D_dim) // 256*256 if (dispCnt->OBJ_BMP_2D_dim) // 256*256
src = (gpu->sprMem) + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8) << 1); src = (gpu->sprMem) + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8) << 1);
else // 128 * 512 else // 128 * 512
src = (gpu->sprMem) + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8) << 1); src = (gpu->sprMem) + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8) << 1);
@ -323,7 +324,7 @@ void other_screen (GtkWidget * widget, int screen) {
} }
if(gpu->dispCnt.bits.OBJ_Tile_1D) if(dispCnt->OBJ_Tile_1D)
if (spriteInfo->Depth) { if (spriteInfo->Depth) {
//256 colors //256 colors
@ -343,14 +344,13 @@ void other_screen (GtkWidget * widget, int screen) {
pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core *0x400); pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core *0x400);
#endif #endif
} }
struct _DISPCNT * dispcnt = &(gpu->dispCnt.bits);
int boundary = 32; int boundary = 32;
if (dispcnt->OBJ_Tile_1D) if (dispCnt->OBJ_Tile_1D)
boundary <<= dispcnt->OBJ_Tile_1D_Bound; boundary <<= dispCnt->OBJ_Tile_1D_Bound;
int bmpboundary = 128; int bmpboundary = 128;
bmpboundary <<= (dispcnt->OBJ_BMP_mapping & dispcnt->OBJ_BMP_1D_Bound); bmpboundary <<= (dispCnt->OBJ_BMP_mapping & dispCnt->OBJ_BMP_1D_Bound);
guint Textures[3]; guint Textures[3];
glGenTextures(3, Textures); glGenTextures(3, Textures);