version 2.0

main v2.0.0
Nichole Mattera 2 years ago
parent 243f523f0e
commit 9330ac4c53
  1. 13075
      Image.c
  2. 4
      Makefile
  3. 377
      font.c
  4. 439
      main.c
  5. 211
      pg.c
  6. 20
      pg.h

13075
Image.c

File diff suppressed because it is too large Load Diff

@ -6,12 +6,12 @@ CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LIBS = -lpspumd -lpspgu -lpsppower -lpng -lz -lm
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_ICON = ICON0.png
PSP_EBOOT_TITLE = FlashMod Version 1.5
PSP_EBOOT_TITLE = FlashMod Version 2.0
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

377
font.c

@ -1,377 +0,0 @@
// font for Hello World PSP
const unsigned char font[]={
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
// ;20 !"#$%&'()*+,-./
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// ;21 !
0x38,0x38,0x38,0x30,0x00,0x30,0x30,0x00,
// ;22 "
0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,
// ;23 #
0x48,0xFE,0x48,0x48,0xFE,0x48,0x48,0x00,
// ;24 $
0x7C,0xAA,0xA8,0x7C,0x2A,0xAA,0x7C,0x00,
// ;25 %
0xC2,0xC4,0x08,0x10,0x20,0x46,0x86,0x00,
// ;26 &
0x38,0x44,0x48,0x30,0x4A,0x84,0x7A,0x00,
// ;27 '
0x18,0x18,0x10,0x00,0x00,0x00,0x00,0x00,
// ;28 (
0x18,0x20,0x20,0x20,0x20,0x20,0x18,0x00,
// ;29 )
0x60,0x10,0x10,0x10,0x10,0x10,0x60,0x00,
// ;2a *
0x92,0x92,0x54,0x38,0x54,0x92,0x92,0x00,
// ;2b +
0x30,0x30,0x30,0xFC,0x30,0x30,0x30,0x00,
// ;2c ,
0x00,0x00,0x00,0x00,0x00,0x18,0x08,0x10,
// ;2d -
0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,
// ;2e .
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,
// ;2f
0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x00,
// ;30 0123456789:;<=>?
0x7C,0xC6,0xCE,0xD6,0xE6,0xC6,0x7C,0x00,
//
0x18,0x38,0x18,0x18,0x18,0x18,0x18,0x00,
//
0x7C,0xC6,0x06,0x0C,0x30,0xC0,0xFE,0x00,
//
0x7C,0xC6,0x06,0x1C,0x06,0xC6,0x7C,0x00,
//
0x0C,0x1C,0x2C,0x4C,0xCC,0xFE,0x0C,0x00,
//
0xFE,0xC0,0xFC,0xC6,0x06,0xC6,0x7C,0x00,
//
0x7C,0xC6,0xC0,0xFC,0xC6,0xC6,0x7C,0x00,
//
0xFE,0x06,0x06,0x0C,0x18,0x30,0x30,0x00,
//
0x7C,0xC6,0xC6,0x7C,0xC6,0xC6,0x7C,0x00,
//
0x7C,0xC6,0xC6,0x7E,0x06,0xC6,0x7C,0x00,
// ;3a :
0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,
// ;3b ;
0x00,0x18,0x18,0x00,0x00,0x18,0x08,0x10,
// ;3c <
0x04,0x08,0x10,0x20,0x10,0x08,0x04,0x00,
// ;3d =
0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,
// ;3e >
0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x00,
// ;3f ?
0x3C,0x42,0x02,0x0C,0x18,0x00,0x18,0x00,
// ;40 @ABCDEFGHIJKLMNO
0x7C,0x82,0xB2,0xAA,0xBC,0x80,0x7E,0x00,
//
0x3C,0x62,0xC2,0xFE,0xC2,0xC2,0xC2,0x00,
//
0xFC,0xC2,0xC2,0xFC,0xC2,0xC2,0xFC,0x00,
//
0x7C,0xC2,0xC0,0xC0,0xC0,0xC2,0x7C,0x00,
//
0xF8,0xC4,0xC2,0xC2,0xC2,0xC4,0xF8,0x00,
//
0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xFE,0x00,
//
0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xC0,0x00,
//
0x7C,0xC0,0xC0,0xCE,0xC2,0xC2,0x7C,0x00,
//
0xC2,0xC2,0xC2,0xFE,0xC2,0xC2,0xC2,0x00,
//
0xFC,0x30,0x30,0x30,0x30,0x30,0xFC,0x00,
//
0x1E,0x0C,0x0C,0x0C,0x0C,0x8C,0x78,0x00,
//
0xC2,0xC4,0xC8,0xD0,0xE8,0xC4,0xC2,0x00,
//
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFE,0x00,
//
0xC2,0xE6,0xDA,0xDA,0xC2,0xC2,0xC2,0x00,
//
0xC2,0xE2,0xD2,0xCA,0xC6,0xC2,0xC2,0x00,
//
0x7C,0xC2,0xC2,0xC2,0xC2,0xC2,0x7C,0x00,
// ;50 PQRSTUVWXYZ[\]^_
0xFC,0xC2,0xC2,0xFC,0xC0,0xC0,0xC0,0x00,
//
0x7C,0xC2,0xC2,0xC2,0xCA,0xC4,0x7A,0x00,
//
0xFC,0xC2,0xC2,0xFC,0xC8,0xC4,0xC2,0x00,
//
0x7C,0xC2,0xC0,0x3C,0x02,0xC2,0x7C,0x00,
//
0xFE,0x38,0x38,0x38,0x38,0x38,0x38,0x00,
//
0xC2,0xC2,0xC2,0xC2,0xC2,0xC2,0x7C,0x00,
//
0xC2,0xC2,0xC2,0xC2,0xC4,0xC8,0x70,0x00,
//
0xC2,0xC2,0xC2,0xD2,0xD2,0xEA,0xC4,0x00,
//
0x86,0x86,0x4C,0x38,0x64,0xC2,0xC2,0x00,
//
0xC2,0xC2,0xC4,0x78,0x30,0x30,0x30,0x00,
//
0xFE,0x06,0x0C,0x18,0x30,0x60,0xFE,0x00,
// ;5B [\]^_
0x78,0x60,0x60,0x60,0x60,0x60,0x78,0x00,
// ;5C \
0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x00,
// ;5D ]
0x78,0x18,0x18,0x18,0x18,0x18,0x78,0x00,
// ;5E ^
0x18,0x24,0x00,0x00,0x00,0x00,0x00,0x00,
// ;5F _
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,
//60..
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
//
0x7C,0x82,0xB2,0xAA,0xBC,0x80,0x7E,0x00,
//
0x3C,0x62,0xC2,0xFE,0xC2,0xC2,0xC2,0x00,
//
0xFC,0xC2,0xC2,0xFC,0xC2,0xC2,0xFC,0x00,
//
0x7C,0xC2,0xC0,0xC0,0xC0,0xC2,0x7C,0x00,
//
0xF8,0xC4,0xC2,0xC2,0xC2,0xC4,0xF8,0x00,
//
0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xFE,0x00,
//
0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xC0,0x00,
//
0x7C,0xC0,0xC0,0xCE,0xC2,0xC2,0x7C,0x00,
//
0xC2,0xC2,0xC2,0xFE,0xC2,0xC2,0xC2,0x00,
//
0xFC,0x30,0x30,0x30,0x30,0x30,0xFC,0x00,
//
0x1E,0x0C,0x0C,0x0C,0x0C,0x8C,0x78,0x00,
//
0xC2,0xC4,0xC8,0xD0,0xE8,0xC4,0xC2,0x00,
//
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFE,0x00,
//
0xC2,0xE6,0xDA,0xDA,0xC2,0xC2,0xC2,0x00,
//
0xC2,0xE2,0xD2,0xCA,0xC6,0xC2,0xC2,0x00,
//
0x7C,0xC2,0xC2,0xC2,0xC2,0xC2,0x7C,0x00,
// ;50 PQRSTUVWXYZ[\]^_
0xFC,0xC2,0xC2,0xFC,0xC0,0xC0,0xC0,0x00,
//
0x7C,0xC2,0xC2,0xC2,0xCA,0xC4,0x7A,0x00,
//
0xFC,0xC2,0xC2,0xFC,0xC8,0xC4,0xC2,0x00,
//
0x7C,0xC2,0xC0,0x3C,0x02,0xC2,0x7C,0x00,
//
0xFE,0x38,0x38,0x38,0x38,0x38,0x38,0x00,
//
0xC2,0xC2,0xC2,0xC2,0xC2,0xC2,0x7C,0x00,
//
0xC2,0xC2,0xC2,0xC2,0xC4,0xC8,0x70,0x00,
//
0xC2,0xC2,0xC2,0xD2,0xD2,0xEA,0xC4,0x00,
//
0x86,0x86,0x4C,0x38,0x64,0xC2,0xC2,0x00,
//
0xC2,0xC2,0xC4,0x78,0x30,0x30,0x30,0x00,
//
0xFE,0x06,0x0C,0x18,0x30,0x60,0xFE,0x00,
//7b
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,
};

439
main.c

@ -4,6 +4,8 @@
#include <pspctrl.h>
#include <pspiofilemgr.h>
#include <pspgu.h>
#include <pspumd.h>
#include <psppower.h>
#include <png.h>
#include <stdlib.h>
#include <string.h>
@ -14,210 +16,117 @@
PSP_MODULE_INFO("FlashMod", 0, 1, 1);
int exist = 0;
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
int exit_callback(int arg1, int arg2, void *common);
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
int CallbackThread(SceSize args, void *argp);
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0)
{
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int SetupCallbacks(void);
char write_buffer[128*1024];
void screenblit(int posx, int posy, int sizex, int sizey, Image* imagevar);
void write_file(const char *readpath, const char *writepath)
{
int fdin;
int fdout;
void lookforumd();
fdin = sceIoOpen(readpath, PSP_O_RDONLY, 0777);
if(fdin >= 0)
{
int bytesRead = 1;
fdout = sceIoOpen(writepath, PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
bytesRead = sceIoRead(fdin, write_buffer, sizeof(write_buffer));
while((bytesRead > 0) && (fdout >= 0))
{
sceIoWrite(fdout, write_buffer, bytesRead);
bytesRead = sceIoRead(fdin, write_buffer, sizeof(write_buffer));
}
if(fdout >= 0)
{
sceIoClose(fdout);
}
char write_buffer[128*1024];
if(fdin >= 0)
{
sceIoClose(fdin);
}
}
}
void check(const char* zFile);
void write_file(const char *readpath, const char *writepath);
int main() {
int i = 0; SceCtrlData pad;
int menu = 1;
char menu_one_buffer[200];
char menu_two_buffer[200];
char menu_three_buffer[200];
char menu_four_buffer[200];
char menu_five_buffer[200];
char flash_complete_buffer[200];
Image* menu_one;
Image* menu_two;
Image* menu_three;
Image* menu_four;
Image* menu_five;
Image* flash_complete;
SetupCallbacks();
initGraphics();
int C = 0;
char copyright_buffer[200];
Image* copyright;
sprintf(copyright_buffer, "./Images/Copyright.png");
copyright = loadImage(copyright_buffer);
while(C < 50){
screenblit(0, 0, 480, 272, copyright);
flipScreen();
C++;
}
int i = 0; int h = 0; SceCtrlData pad; int menu = 1; int fd;
char menu_one_buffer[200]; char menu_two_buffer[200]; char menu_three_buffer[200]; char menu_four_buffer[200]; char menu_five_buffer[200]; char menu_six_buffer[200]; char menu_seven_buffer[200]; char menu_eight_buffer[200]; char menu_nine_buffer[200]; char flash_complete_buffer[200]; char insert_umd_buffer[200];
Image* menu_one; Image* menu_two; Image* menu_three; Image* menu_four; Image* menu_five; Image* menu_six; Image* menu_seven; Image* menu_eight; Image* menu_nine; Image* flash_complete; Image* insert_umd;
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_DIGITAL);
sceIoUnassign("flash0:");
sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", 0, NULL, 0);
sprintf(menu_one_buffer,"menu1.png");
menu_one = loadImage(menu_one_buffer);
sprintf(menu_two_buffer,"menu2.png");
menu_two = loadImage(menu_two_buffer);
sprintf(menu_three_buffer,"menu3.png");
menu_three = loadImage(menu_three_buffer);
sprintf(menu_four_buffer,"menu4.png");
menu_four = loadImage(menu_four_buffer);
sprintf(menu_five_buffer,"menu5.png");
menu_five = loadImage(menu_five_buffer);
sprintf(flash_complete_buffer,"complete.png");
flash_complete = loadImage(flash_complete_buffer);
sprintf(menu_one_buffer,"./Images/Menu1.png"); sprintf(menu_two_buffer,"./Images/Menu2.png"); sprintf(menu_three_buffer,"./Images/Menu3.png"); sprintf(menu_four_buffer,"./Images/Menu4.png"); sprintf(menu_five_buffer,"./Images/Menu5.png"); sprintf(menu_six_buffer,"./Images/Menu6.png"); sprintf(menu_seven_buffer,"./Images/Menu7.png"); sprintf(menu_eight_buffer,"./Images/Menu8.png"); sprintf(menu_nine_buffer,"./Images/Menu9.png"); sprintf(flash_complete_buffer,"./Images/FlashComplete.png"); sprintf(insert_umd_buffer,"./Images/UMD.png");
menu_one = loadImage(menu_one_buffer); menu_two = loadImage(menu_two_buffer); menu_three = loadImage(menu_three_buffer); menu_four = loadImage(menu_four_buffer); menu_five = loadImage(menu_five_buffer); menu_six = loadImage(menu_six_buffer); menu_seven = loadImage(menu_seven_buffer); menu_eight = loadImage(menu_eight_buffer); menu_nine = loadImage(menu_nine_buffer); flash_complete = loadImage(flash_complete_buffer); insert_umd = loadImage(insert_umd_buffer);
int x = 0;
int y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_one, x, y);
y += 272;
}
x += 480;
y = 0;
}
flipScreen();
screenblit(0, 0, 480, 272, menu_one);
while (1) {
sceCtrlReadBufferPositive(&pad, 1);
if (menu == 1) {
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_one, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, menu_one);
flipScreen();
}
if (menu == 2) {
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_two, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, menu_two);
flipScreen();
}
if (menu == 3) {
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_three, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, menu_three);
flipScreen();
}
if (menu == 4) {
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_four, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, menu_four);
flipScreen();
}
if (menu == 5) {
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, menu_five, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, menu_five);
flipScreen();
}
if (menu == 6) {
screenblit(0, 0, 480, 272, menu_six);
flipScreen();
}
if (menu == 7) {
screenblit(0, 0, 480, 272, menu_seven);
flipScreen();
}
if (menu == 8) {
screenblit(0, 0, 480, 272, menu_eight);
flipScreen();
}
if (menu == 9) {
screenblit(0, 0, 480, 272, menu_nine);
flipScreen();
}
if (pad.Buttons & PSP_CTRL_UP) {
if (menu > 1) {
menu--;
for(i=0; i<5; i++) {
for(i=0; i<10; i++) {
sceDisplayWaitVblankStart();
}
}
}
if (pad.Buttons & PSP_CTRL_DOWN) {
if (menu < 5) {
if (menu < 9) {
menu++;
for(i=0; i<5; i++) {
for(i=0; i<10; i++) {
sceDisplayWaitVblankStart();
}
}
@ -225,48 +134,88 @@ int main() {
if (pad.Buttons & PSP_CTRL_CROSS) {
if (menu == 1) {
write_file("./ASURA_EFFECT_OFF/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco");
h = sceUmdCheckMedium(0);
if (h == 0) {
screenblit(0,0,480,272,insert_umd);
flipScreen();
}
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, flash_complete, x, y);
y += 272;
}
x += 480;
y = 0;
while (h == 0) {
h = sceUmdCheckMedium(0);
}
flipScreen();
for(i=0; i<30; i++) {
sceDisplayWaitVblankStart();
h = sceUmdActivate(1, "disc0:");
sceIoUnassign("flash0:");
sceIoUnassign("flash1:");
sceIoAssign("flash0:", "msstor0p1:/" , "fatms0:/Flash0/", IOASSIGN_RDWR, NULL, 0);
sceIoAssign("flash1:", "msstor0p1:/" , "fatms0:/Flash1/", IOASSIGN_RDWR, NULL, 0);
scePowerSetClockFrequency(333, 333, 166);
fd = sceIoOpen("disc0:/UMD_DATA.BIN", PSP_O_RDONLY, 0777);
char game_id[10];
sceIoRead(fd, game_id, 10);
sceIoClose(fd);
fd = sceIoOpen("./GAMES/UCUS-98615/UMD_DATA.BIN", PSP_O_RDONLY, 0777);
char socom_game_id[10];
sceIoRead(fd, socom_game_id, 10);
sceIoClose(fd);
if(game_id == socom_game_id) {
sceKernelLoadExec("./GAMES/UCUS-98615/BOOT.BIN",0);
}
else
{
sceKernelLoadExec("disc0:/PSP_GAME/SYSDIR/BOOT.BIN",0);
}
}
if (menu == 2) {
h = sceUmdCheckMedium(0);
if (h == 0) {
screenblit(0,0,480,272,insert_umd);
flipScreen();
}
while (h == 0) {
h = sceUmdCheckMedium(0);
}
h = sceUmdActivate(1, "disc0:");
scePowerSetClockFrequency(333, 333, 166);
sceKernelLoadExec("disc0:/PSP_GAME/SYSDIR/BOOT.BIN",0);
}
if (menu == 3) {
write_file("./ASURA_EFFECT_ON/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco");
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, flash_complete, x, y);
y += 272;
}
x += 480;
y = 0;
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 4) {
write_file("./ASURA_EFFECT_OFF/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco");
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<30; i++) {
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 3) {
if (menu == 5) {
write_file("ms0:/01.bmp","flash0:/vsh/resource/01.bmp");
write_file("ms0:/02.bmp","flash0:/vsh/resource/02.bmp");
write_file("ms0:/03.bmp","flash0:/vsh/resource/03.bmp");
@ -280,25 +229,14 @@ int main() {
write_file("ms0:/11.bmp","flash0:/vsh/resource/11.bmp");
write_file("ms0:/12.bmp","flash0:/vsh/resource/12.bmp");
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, flash_complete, x, y);
y += 272;
}
x += 480;
y = 0;
}
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<30; i++) {
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 4) {
if (menu == 6) {
write_file("./DEFAULT_BG/01.bmp","flash0:/vsh/resource/01.bmp");
write_file("./DEFAULT_BG/02.bmp","flash0:/vsh/resource/02.bmp");
write_file("./DEFAULT_BG/03.bmp","flash0:/vsh/resource/03.bmp");
@ -312,25 +250,34 @@ int main() {
write_file("./DEFAULT_BG/11.bmp","flash0:/vsh/resource/11.bmp");
write_file("./DEFAULT_BG/12.bmp","flash0:/vsh/resource/12.bmp");
x = 0;
y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 272) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, flash_complete, x, y);
y += 272;
}
x += 480;
y = 0;
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 7) {
write_file("ms0:/topmenu_plugin.rco","flash0:/vsh/resource/topmenu_plugin.rco");
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<30; i++) {
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 5) {
if (menu == 8) {
write_file("./DEFAULT_MENU/topmenu_plugin.rco","flash0:/vsh/resource/topmenu_plugin.rco");
screenblit(0, 0, 480, 272, flash_complete);
flipScreen();
for(i=0; i<50; i++) {
sceDisplayWaitVblankStart();
}
}
if (menu == 9) {
break;
}
}
@ -338,4 +285,84 @@ int main() {
sceKernelExitGame();
return 0;
}
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0)
{
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
void screenblit(int posx, int posy, int sizex, int sizey, Image* imagevar) {
int x = 0;
int y = 0;
sceDisplayWaitVblankStart();
while (x < sizex) {
while (y < sizey) {
blitAlphaImageToScreen(posx ,posy ,sizex , sizey, imagevar, x, y);
y += sizey;
}
x += sizex;
y = 0;
}
}
void check(const char* zFile){
int fd3;
fd3 = sceIoOpen(zFile, PSP_O_RDONLY, 0);
if(fd3 < 0) {
exist = 0;
}
else {
exist = 1;
}
sceIoClose(fd3);
}
void write_file(const char *readpath, const char *writepath) {
check(readpath);
if(exist == 1) {
int fdin;
int fdout;
fdin = sceIoOpen(readpath, PSP_O_RDONLY, 0777);
if(fdin >= 0)
{
int bytesRead = 1;
fdout = sceIoOpen(writepath, PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
bytesRead = sceIoRead(fdin, write_buffer, sizeof(write_buffer));
while((bytesRead > 0) && (fdout >= 0))
{
sceIoWrite(fdout, write_buffer, bytesRead);
bytesRead = sceIoRead(fdin, write_buffer, sizeof(write_buffer));
}
if(fdout >= 0)
{
sceIoClose(fdout);
}
if(fdin >= 0)
{
sceIoClose(fdin);
}
}
}
}

211
pg.c

@ -1,211 +0,0 @@
// primitive graphics for Hello World PSP
#include "pg.h"
#include "font.c"
//system call
void sceDisplayWaitVblankStart();
void sceDisplaySetMode(long,long,long);
void sceDisplaySetFrameBuf(char *topaddr,long linesize,long pixelsize,long);
//constants
#define PIXELSIZE 1 //in short
#define LINESIZE 512 //in short
#define FRAMESIZE 0x44000 //in byte
//480*272 = 60*38
#define CMAX_X 60
#define CMAX_Y 38
#define CMAX2_X 30
#define CMAX2_Y 19
#define CMAX4_X 15
#define CMAX4_Y 9
//variables
char *pg_vramtop=(char *)0x04000000;
long pg_screenmode;
long pg_showframe;
long pg_drawframe;
void pgWaitVn(unsigned long count)
{
for (; count>0; --count) {
sceDisplayWaitVblankStart();
}
}
void pgWaitV()
{
sceDisplayWaitVblankStart();
}
char *pgGetVramAddr(unsigned long x,unsigned long y)
{
return pg_vramtop+(pg_drawframe?FRAMESIZE:0)+x*PIXELSIZE*2+y*LINESIZE*2+0x40000000;
}
void pgInit()
{
sceDisplaySetMode(0,SCREEN_WIDTH,SCREEN_HEIGHT);
pgScreenFrame(0,0);
}
void pgPrint(unsigned long x,unsigned long y,unsigned long color,const char *str)
{
while (*str!=0 && x<CMAX_X && y<CMAX_Y) {
pgPutChar(x*8,y*8,color,0,*str,1,0,1);
str++;
x++;
if (x>=CMAX_X) {
x=0;
y++;
}
}
}
void pgPrint2(unsigned long x,unsigned long y,unsigned long color,const char *str)
{
while (*str!=0 && x<CMAX2_X && y<CMAX2_Y) {
pgPutChar(x*16,y*16,color,0,*str,1,0,2);
str++;
x++;
if (x>=CMAX2_X) {
x=0;
y++;
}
}
}
void pgPrint4(unsigned long x,unsigned long y,unsigned long color,const char *str)
{
while (*str!=0 && x<CMAX4_X && y<CMAX4_Y) {
pgPutChar(x*32,y*32,color,0,*str,1,0,4);
str++;
x++;
if (x>=CMAX4_X) {
x=0;
y++;
}
}
}
void pgFillvram(unsigned long color)
{
unsigned char *vptr0; //pointer to vram
unsigned long i;
vptr0=pgGetVramAddr(0,0);
for (i=0; i<FRAMESIZE/2; i++) {
*(unsigned short *)vptr0=color;
vptr0+=PIXELSIZE*2;
}
}
void pgBitBlt(unsigned long x,unsigned long y,unsigned long w,unsigned long h,unsigned long mag,const unsigned short *d)
{
unsigned char *vptr0; //pointer to vram
unsigned char *vptr; //pointer to vram
unsigned long xx,yy,mx,my;
const unsigned short *dd;
vptr0=pgGetVramAddr(x,y);
for (yy=0; yy<h; yy++) {
for (my=0; my<mag; my++) {
vptr=vptr0;
dd=d;
for (xx=0; xx<w; xx++) {
for (mx=0; mx<mag; mx++) {
*(unsigned short *)vptr=*dd;
vptr+=PIXELSIZE*2;
}
dd++;
}
vptr0+=LINESIZE*2;
}
d+=w;
}
}
void pgPutChar(unsigned long x,unsigned long y,unsigned long color,unsigned long bgcolor,unsigned char ch,char drawfg,char drawbg,char mag)
{
unsigned char *vptr0; //pointer to vram
unsigned char *vptr; //pointer to vram
const unsigned char *cfont; //pointer to font
unsigned long cx,cy;
unsigned long b;
char mx,my;
if (ch>255) return;
cfont=font+ch*8;
vptr0=pgGetVramAddr(x,y);
for (cy=0; cy<8; cy++) {
for (my=0; my<mag; my++) {
vptr=vptr0;
b=0x80;
for (cx=0; cx<8; cx++) {
for (mx=0; mx<mag; mx++) {
if ((*cfont&b)!=0) {
if (drawfg) *(unsigned short *)vptr=color;
} else {
if (drawbg) *(unsigned short *)vptr=bgcolor;
}
vptr+=PIXELSIZE*2;
}
b=b>>1;
}
vptr0+=LINESIZE*2;
}
cfont++;
}
}
void pgScreenFrame(long mode,long frame)
{
pg_screenmode=mode;
frame=(frame?1:0);
pg_showframe=frame;
if (mode==0) {
//screen off
pg_drawframe=frame;
sceDisplaySetFrameBuf(0,0,0,1);
} else if (mode==1) {
//show/draw same
pg_drawframe=frame;
sceDisplaySetFrameBuf(pg_vramtop+(pg_showframe?FRAMESIZE:0),LINESIZE,PIXELSIZE,1);
} else if (mode==2) {
//show/draw different
pg_drawframe=(frame?0:1);
sceDisplaySetFrameBuf(pg_vramtop+(pg_showframe?FRAMESIZE:0),LINESIZE,PIXELSIZE,1);
}
}
void pgScreenFlip()
{
pg_showframe=(pg_showframe?0:1);
pg_drawframe=(pg_drawframe?0:1);
sceDisplaySetFrameBuf(pg_vramtop+(pg_showframe?FRAMESIZE:0),LINESIZE,PIXELSIZE,0);
}
void pgScreenFlipV()
{
pgWaitV();
pgScreenFlip();
}

20
pg.h

@ -1,20 +0,0 @@
// primitive graphics for Hello World PSP
void pgInit();
void pgcontroller();
void pgWaitV();
void pgWaitVn(unsigned long count);
void pgScreenFrame(long mode,long frame);
void pgScreenFlip();
void pgScreenFlipV();
void pgPrint(unsigned long x,unsigned long y,unsigned long color,const char *str);
void pgPrint2(unsigned long x,unsigned long y,unsigned long color,const char *str);
void pgPrint4(unsigned long x,unsigned long y,unsigned long color,const char *str);
void pgFillvram(unsigned long color);
void pgBitBlt(unsigned long x,unsigned long y,unsigned long w,unsigned long h,unsigned long mag,const unsigned short *d);
void pgPutChar(unsigned long x,unsigned long y,unsigned long color,unsigned long bgcolor,unsigned char ch,char drawfg,char drawbg,char mag);
#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 272
Loading…
Cancel
Save