Embedded Fonts no longer required for Qoob users

This commit is contained in:
emukidid 2008-10-07 07:07:52 +00:00
parent fb29e53241
commit 4d2eb0e408
6 changed files with 27 additions and 16 deletions

View file

@ -8,8 +8,8 @@ CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-DCPU_SHUTDOWN -DSPC700_SHUTDOWN -DVAR_CYCLES -DSOUND \
-DNOASM -DNGC -DNOASM -DPIXEL_FORMAT=RGB565 \
-fno-exceptions -Wno-unused-parameter -pipe \
-DUSE_GUI -DSHOW_DEBUG -DTHREADED_AUDIO -DEMBEDDED_FONTS -DUSE_TLB_CACHE
# -DDEBUGON -DGLN64_SDLOG -DUSE_EXPANSION -DEMBEDDED_FONTS -DUSE_RECOMP_CACHE -DPPC_DYNAREC
-DUSE_GUI -DSHOW_DEBUG -DTHREADED_AUDIO -DUSE_TLB_CACHE -DUSE_RECOMP_CACHE
# -DDEBUGON -DGLN64_SDLOG -DUSE_EXPANSION -DUSE_RECOMP_CACHE -DPPC_DYNAREC
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
LDFLAGS = $(MACHDEP) -mogc -Wl,-Map,$(notdir $@).map -Wl,--cref

View file

@ -17,7 +17,7 @@ CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-fno-exceptions -Wno-unused-parameter -pipe \
-DUSE_GUI -DSHOW_DEBUG -DWII -DHW_RVL -DTHREADED_AUDIO -DUSE_RECOMP_CACHE -DUSE_TLB_CACHE
# -DPROGRESSIVE_DISPLAY
# -DDEBUGON -DUSE_ROM_CACHE_L1 -DPRINTGECKO -DGLN64_SDLOG -DEMBEDDED_FONTS -DUSE_EXPANSION -DPPC_DYNAREC
# -DDEBUGON -DUSE_ROM_CACHE_L1 -DPRINTGECKO -DGLN64_SDLOG -DUSE_EXPANSION -DPPC_DYNAREC
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
LDFLAGS = $(MACHDEP) -mrvl -Wl,-Map,$(notdir $@).map -Wl,--cref

View file

@ -16,7 +16,7 @@ CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-DNOASM -DNGC -DNOASM -DPIXEL_FORMAT=RGB565 \
-fno-exceptions -Wno-unused-parameter -pipe \
-DUSE_GUI -DSHOW_DEBUG -DTHREADED_AUDIO -DUSE_TLB_CACHE
# -DEMBEDDED_FONTS -DPRINTGECKO
# -DPRINTGECKO
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
LDFLAGS = $(MACHDEP) -mogc -Wl,-Map,$(notdir $@).map -Wl,--cref

View file

@ -11,7 +11,6 @@ CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) -fmodulo-sched \
-DUSE_GUI -DSHOW_DEBUG -DPROFILE -DWII \
-DTHREADED_AUDIO -DUSE_TLB_CACHE
#-DPRINTGECKO
#-DEMBEDDED_FONTS
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
LDFLAGS = $(MACHDEP) -mrvl -Wl,-Map,$(notdir $@).map -Wl,--cref

View file

@ -9,7 +9,7 @@ CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-DNOASM -DNGC -DNOASM -DPIXEL_FORMAT=RGB565 \
-fno-exceptions -Wno-unused-parameter -pipe \
-DUSE_GUI -DSHOW_DEBUG -DTHREADED_AUDIO -DUSE_TLB_CACHE
# -DEMBEDDED_FONTS -DPRINTGECKO
# -DPRINTGECKO
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
LDFLAGS = $(MACHDEP) -mogc -Wl,-Map,$(notdir $@).map -Wl,--cref

View file

@ -35,6 +35,25 @@ typedef struct
//unsigned char* GXfontTexture;
static unsigned char fontFont[ 0x40000 ] __attribute__((aligned(32)));
//lowlevel Qoob Modchip disable
void ipl_set_config(unsigned char c)
{
volatile unsigned long* exi = (volatile unsigned long*)0xCC006800;
unsigned long val,addr;
addr=0xc0000000;
val = c << 24;
exi[0] = ((((exi[0]) & 0x405) | 256) | 48); //select IPL
//write addr of IPL
exi[0 * 5 + 4] = addr;
exi[0 * 5 + 3] = ((4 - 1) << 4) | (1 << 2) | 1;
while (exi[0 * 5 + 3] & 1);
exi[0 * 5 + 4] = val;
exi[0 * 5 + 3] = ((4 - 1) << 4) | (1 << 2) | 1;
while (exi[0 * 5 + 3] & 1);
exi[0] &= 0x405; //deselect IPL
}
/****************************************************************************
* YAY0 Decoding
****************************************************************************/
@ -129,10 +148,6 @@ void TF_I2toI4(unsigned char *dst, unsigned char *src, int xres, int yres)
CHAR_INFO fontChars;
extern void __SYS_ReadROM(void *buf,u32 len,u32 offset);
#ifdef EMBEDDED_FONTS
#include "ARIAL.H"
#endif
void init_font(void)
{
static unsigned char fontWork[ 0x20000 ] __attribute__((aligned(32)));
@ -140,11 +155,8 @@ void init_font(void)
// dont read system rom fonts because this breaks on qoob modchip
memset(fontFont,0,0x3000);
#ifdef EMBEDDED_FONTS
memcpy(&fontFont, &arial[0], ARIAL_LEN);
#else
ipl_set_config(6);
__SYS_ReadROM(( unsigned char *)&fontFont,0x3000,0x1FCF00);
#endif
yay0_decode((unsigned char *)&fontFont, (unsigned char *)&fontWork);
FONT_HEADER *fnt;
@ -180,7 +192,7 @@ void write_font_init_GX(GXColor fontColor)
Mtx44 GXprojection2D;
Mtx GXmodelView2D;
// Reset various parameters from gfx plugin
// Reset various parameters from gfx plugin
GX_SetCoPlanar(GX_DISABLE);
GX_SetClipMode(GX_CLIP_DISABLE);
GX_SetScissor(0,0,vmode->fbWidth,vmode->efbHeight);
@ -192,7 +204,7 @@ void write_font_init_GX(GXColor fontColor)
GX_LoadPosMtxImm(GXmodelView2D,GX_PNMTX0);
guOrtho(GXprojection2D, 0, 479, 0, 639, 0, 700);
GX_LoadProjectionMtx(GXprojection2D, GX_ORTHOGRAPHIC);
GX_SetViewport (0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
GX_SetViewport (0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
GX_SetZMode(GX_DISABLE,GX_ALWAYS,GX_TRUE);