• R/O
  • SSH
  • HTTPS

gpsp-kai: Commit


Commit MetaInfo

Revision350 (tree)
Time2007-11-04 18:47:21
Authortakka

Log Message

3.2 test 07

Change Summary

Incremental Difference

--- trunk/gpsp-kai-test/comment.txt (revision 349)
+++ trunk/gpsp-kai-test/comment.txt (revision 350)
@@ -47,51 +47,3 @@
4747
4848
4949 キーボードAPIはpsputility_osk.h
50-
51-#define SCREEN_INTERLACE 2 /* on/off */
52-#define SCREEN_RATIO 2 /* 4:3/16:9 */
53-#define SCREEN_OUT 3 /* PSP/analog/digital */
54-#define SCREEN_SCALE 5 /* non-scale/scale/full/etc 1/etc 2 */
55-
56-構造体 VIDEO_OUT
57-int u;
58-int displaymode;
59-int width;
60-int height;
61-int x;
62-int y;
63-int z;
64-
65-構造体 VIEW_PORT
66-int x;
67-int y;
68-int w;
69-int h;
70-
71-構造体 screen_parameter[SCREEN_OUT][SCREEN_RATIO][SCREEN_INTERLACE][SCREEN_SCALE]
72-
73-
74-構造体 SCREEN_PARAMATER
75-VIDEO_OUT_PARAMETER video_out;
76-int filter[2];
77-u32 screen_pitch;
78-u32 screen_width;
79-u32 screen_height;
80-u32 texture_size;
81-VIEW_PORT view;
82-SPRITE screen_setting_1;
83-SPRITE screen_setting_2;
84-
85-#define FRAME_GAME 0
86-#define FRAME_MENU 1
87-
88-ローカルの配列に設定する
89-u32 address_flip[2]
90-
91-
92-
93-
94-
95-
96-
97-
--- trunk/gpsp-kai-test/src/video_setting.c (revision 349)
+++ trunk/gpsp-kai-test/src/video_setting.c (revision 350)
@@ -22,12 +22,12 @@
2222 // VIDEO OUTの有効画素は674x450(GBAの2.85倍)?
2323 // インタレース時の有効画素は674x220?
2424
25-const SCREEN_PARAMATER screen_paramater_psp_menu_init =
25+const SCREEN_PARAMETER screen_parameter_psp_menu_init =
2626 {
2727 /* 本体出力 / MENU画面 */
2828 { 0, 0x000, 480, 272, 1, 15, 0 },
29- { 0, 1 },
30- { 480, 480, 271 },
29+ { 0, 0 },
30+ { 480, 480, 272 },
3131 { 9, 9 },
3232 { 480, 272 },
3333 { 0, 0, 480, 272 },
@@ -35,13 +35,13 @@
3535 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
3636 };
3737
38-const SCREEN_PARAMATER screen_paramater_analog_menu_init[] =
38+const SCREEN_PARAMETER screen_parameter_analog_menu_init[] =
3939 {
4040 {
4141 /* アナログ出力 / MENU画面 / 4:3 / ノンインタレース*/
4242 { 2, 0x1D2, 720, 503, 1, 15, 0 },
4343 { 0, 1 },
44- { 480, 480, 271 },
44+ { 480, 480, 272 },
4545 { 9, 9 },
4646 { 720, 503 },
4747 { 0, 0, 480, 272 },
@@ -53,7 +53,7 @@
5353 /* アナログ出力 / MENU画面 / 4:3 / インタレース*/
5454 { 2, 0x1D1, 720, 503, 1, 15, 0 },
5555 { 0, 1 },
56- { 480, 480, 271 },
56+ { 480, 480, 272 },
5757 { 9, 9 },
5858 { 720, 503 },
5959 { 0, 0, 480, 272 },
@@ -65,7 +65,7 @@
6565 /* アナログ出力 / MENU画面 / 16:9 / ノンインタレース*/
6666 { 2, 0x1D2, 720, 503, 1, 15, 0 },
6767 { 0, 1 },
68- { 480, 480, 271 },
68+ { 480, 480, 272 },
6969 { 9, 9 },
7070 { 720, 503 },
7171 { 0, 0, 480, 272 },
@@ -77,7 +77,7 @@
7777 /* アナログ出力 / MENU画面 / 16:9 / インタレース*/
7878 { 2, 0x1D1, 720, 503, 1, 15, 0 },
7979 { 0, 1 },
80- { 480, 480, 271 },
80+ { 480, 480, 272 },
8181 { 9, 9 },
8282 { 720, 503 },
8383 { 0, 0, 480, 272 },
@@ -86,13 +86,13 @@
8686 },
8787 };
8888
89-const SCREEN_PARAMATER screen_paramater_digital_menu_init[] =
89+const SCREEN_PARAMETER screen_parameter_digital_menu_init[] =
9090 {
9191 {
9292 /* デジタル出力 / MENU画面 / 4:3 / ノンインタレース*/
9393 { 0, 0x1D2, 720, 480, 1, 15, 0 },
9494 { 0, 1 },
95- { 480, 480, 271 },
95+ { 480, 480, 272 },
9696 { 9, 9 },
9797 { 720, 503 },
9898 { 0, 0, 480, 272 },
@@ -103,7 +103,7 @@
103103 /* デジタル出力 / MENU画面 / 4:3 / インタレース*/
104104 { 0, 0x1D1, 720, 503, 1, 15, 0 },
105105 { 0, 1 },
106- { 480, 480, 271 },
106+ { 480, 480, 272 },
107107 { 9, 9 },
108108 { 720, 503 },
109109 { 0, 0, 480, 272 },
@@ -115,7 +115,7 @@
115115 /* デジタル出力 / MENU画面 / 16:9 / ノンインタレース*/
116116 { 0, 0x1D2, 720, 480, 1, 15, 0 },
117117 { 0, 1 },
118- { 480, 480, 271 },
118+ { 480, 480, 272 },
119119 { 9, 9 },
120120 { 720, 503 },
121121 { 0, 0, 480, 272 },
@@ -127,7 +127,7 @@
127127 /* デジタル出力 / MENU画面 / 16:9 / インタレース*/
128128 { 0, 0x1D1, 720, 503, 1, 15, 0 },
129129 { 0, 1 },
130- { 480, 480, 271 },
130+ { 480, 480, 272 },
131131 { 9, 9 },
132132 { 720, 503 },
133133 { 0, 0, 480, 272 },
@@ -137,7 +137,7 @@
137137 };
138138
139139
140-const SCREEN_PARAMATER screen_paramater_psp_game_init[] =
140+const SCREEN_PARAMETER screen_parameter_psp_game_init[] =
141141 {
142142 {
143143 /* 本体出力 / GAME画面 / unscaled */
@@ -200,7 +200,7 @@
200200 },
201201 };
202202
203-const SCREEN_PARAMATER screen_paramater_analog_game_init[] =
203+const SCREEN_PARAMETER screen_parameter_analog_game_init[] =
204204 {
205205 {
206206 /* アナログ出力 / GAME画面 / 4:3 / ノンインタレース / unscaled */
@@ -443,7 +443,7 @@
443443 },
444444 };
445445
446-const SCREEN_PARAMATER screen_paramater_digital_game_init[] =
446+const SCREEN_PARAMETER screen_parameter_digital_game_init[] =
447447 {
448448 {
449449 /* デジタル出力 / GAME画面 / 4:3 / ノンインタレース / unscaled */
--- trunk/gpsp-kai-test/src/message.h (revision 349)
+++ trunk/gpsp-kai-test/src/message.h (revision 350)
@@ -118,7 +118,7 @@
118118 MSG_PAD_MENU_11,
119119 MSG_PAD_MENU_12,
120120
121- MSG_PAD_MENU_HELP_0,
121+ MSG_PAD_MENU_HELP_12,
122122
123123 MSG_PAD_MENU_CFG_0,
124124 MSG_PAD_MENU_CFG_1,
@@ -257,7 +257,23 @@
257257 MSG_R_16_9,
258258 MSG_I_NON,
259259 MSG_I_ON,
260+
261+ MSG_INIT_END,
260262
263+ MSG_LOAD_STATE,
264+ MSG_LOAD_STATE_END,
265+ MSG_SAVE_STATE,
266+ MSG_SAVE_STATE_END,
267+
268+ MSG_CHEAT_MENU_5,
269+ MSG_CHEAT_MENU_HELP_5,
270+
271+ MSG_CHEAT_MENU_6,
272+ MSG_CHEAT_MENU_HELP_6,
273+
274+ MSG_PAD_MENU_13,
275+ MSG_PAD_MENU_HELP_13,
276+
261277 MSG_END
262278 };
263279
--- trunk/gpsp-kai-test/src/input.c (revision 349)
+++ trunk/gpsp-kai-test/src/input.c (revision 350)
@@ -54,6 +54,8 @@
5454
5555 #define PSP_ALL_BUTTON_MASK 0x1FFFF
5656
57+u32 gamepad_config_map[MAX_GAMEPAD_CONFIG_MAP];
58+
5759 u32 last_buttons = 0;
5860 u64 button_repeat_timestamp;
5961
@@ -288,7 +290,7 @@
288290 for(i = 0; i < 16; i++)
289291 {
290292 if(non_repeat_buttons & button_psp_mask_to_config[i])
291- button_id = game_config.gamepad_config_map[i];
293+ button_id = gamepad_config_map[i];
292294 // HOMEが押されたらMENUに移行
293295 if (buttons & PSP_CTRL_HOME) button_id = BUTTON_ID_MENU;
294296
@@ -354,7 +356,7 @@
354356
355357 if(buttons & button_psp_mask_to_config[i])
356358 {
357- button_id = game_config.gamepad_config_map[i];
359+ button_id = gamepad_config_map[i];
358360 if(button_id < BUTTON_ID_MENU)
359361 {
360362 new_key |= button_id_to_gba_mask[button_id];
--- trunk/gpsp-kai-test/src/input.h (revision 349)
+++ trunk/gpsp-kai-test/src/input.h (revision 350)
@@ -21,6 +21,8 @@
2121 #ifndef INPUT_H
2222 #define INPUT_H
2323
24+#define MAX_GAMEPAD_CONFIG_MAP 16
25+
2426 typedef enum
2527 {
2628 BUTTON_L = 0x200,
@@ -88,6 +90,7 @@
8890 extern u32 sensorX;
8991 extern u32 sensorY;
9092 extern u32 sensorR;
93+extern u32 gamepad_config_map[MAX_GAMEPAD_CONFIG_MAP];
9194
9295 #endif
9396
--- trunk/gpsp-kai-test/src/video.c (revision 349)
+++ trunk/gpsp-kai-test/src/video.c (revision 350)
@@ -3248,7 +3248,7 @@
32483248
32493249 u32 screen_flip = 0;
32503250
3251-u32 frame_to_render;
3251+//u32 frame_to_render;
32523252
32533253 u32 video_out_mode;
32543254
@@ -3266,28 +3266,28 @@
32663266 #define SCREEN_RATIO 2 /* 4:3/16:9 */
32673267 #define SCREEN_SCALE 5 /* non-scale/scale/full/etc 1/etc 2 */
32683268
3269-SCREEN_PARAMATER screen_paramater_psp_game[SCREEN_SCALE];
3270-SCREEN_PARAMATER screen_paramater_psp_menu;
3269+SCREEN_PARAMETER screen_parameter_psp_game[SCREEN_SCALE];
3270+SCREEN_PARAMETER screen_parameter_psp_menu;
32713271
3272-SCREEN_PARAMATER screen_paramater_analog_game[SCREEN_RATIO][SCREEN_INTERLACE][SCREEN_SCALE];
3273-SCREEN_PARAMATER screen_paramater_analog_menu[SCREEN_RATIO][SCREEN_INTERLACE];
3272+SCREEN_PARAMETER screen_parameter_analog_game[SCREEN_RATIO][SCREEN_INTERLACE][SCREEN_SCALE];
3273+SCREEN_PARAMETER screen_parameter_analog_menu[SCREEN_RATIO][SCREEN_INTERLACE];
32743274
3275-SCREEN_PARAMATER screen_paramater_digital_game[SCREEN_RATIO][SCREEN_INTERLACE][SCREEN_SCALE];
3276-SCREEN_PARAMATER screen_paramater_digital_menu[SCREEN_RATIO][SCREEN_INTERLACE];
3275+SCREEN_PARAMETER screen_parameter_digital_game[SCREEN_RATIO][SCREEN_INTERLACE][SCREEN_SCALE];
3276+SCREEN_PARAMETER screen_parameter_digital_menu[SCREEN_RATIO][SCREEN_INTERLACE];
32773277
3278-SCREEN_PARAMATER *current_paramater;
3278+SCREEN_PARAMETER *current_parameter;
32793279
32803280 void init_video()
32813281 {
32823282 video_out_mode = 0;
32833283 video_draw_frame = FRAME_GAME;
3284- static fast_load = 0;
3284+ static u32 first_load = 0;
32853285
32863286 // パラメータの初期化
3287- if(fast_load == 0)
3287+ if(first_load == 0)
32883288 {
32893289 load_video_config();
3290- fast_load = 1;
3290+ first_load = 1;
32913291 }
32923292
32933293 sceDisplaySetMode(0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
@@ -3332,7 +3332,7 @@
33323332 gecb.finish_arg = NULL;
33333333 gecbid = sceGeSetCallback(&gecb);
33343334
3335- memcpy(screen_vertex, &screen_paramater_psp_game_init, sizeof(float) * 20);
3335+ memcpy(screen_vertex, &screen_parameter_psp_game_init, sizeof(float) * 20);
33363336 // Set framebuffer to PSP VRAM
33373337 GE_CMD(FBP, ((u32)psp_gu_vram_base & 0x00FFFFFF));
33383338 GE_CMD(FBW, (((u32)psp_gu_vram_base & 0xFF000000) >> 8) | 768);
@@ -3378,7 +3378,7 @@
33783378 ge_cmd_ptr = ge_cmd + 2;
33793379 GE_CMD(TBP0, ((u32)screen_address & 0x00FFFFFF));
33803380 GE_CMD(TBW0, (((u32)screen_address & 0xFF000000) >> 8) | screen_pitch);
3381- GE_CMD(TSIZE0, (current_paramater->texture_bit.x << 8) | current_paramater->texture_bit.y);
3381+ GE_CMD(TSIZE0, (current_parameter->texture_bit.x << 8) | current_parameter->texture_bit.y);
33823382 ge_cmd_ptr = old_ge_cmd_ptr;
33833383
33843384 // Flip to the next screen
@@ -3391,6 +3391,19 @@
33913391
33923392 void video_resolution(u32 frame)
33933393 {
3394+ static u32 first_load = 0;
3395+
3396+ if(first_load == 0)
3397+ first_load = 1;
3398+ else
3399+ {
3400+ flip_screen();
3401+ clear_screen(0);
3402+ flip_screen();
3403+ clear_screen(0);
3404+ flip_screen();
3405+ }
3406+
33943407 if(video_draw_frame != frame)
33953408 {
33963409 if(psp_model != psp_1000)
@@ -3401,51 +3414,53 @@
34013414 switch(((video_out_mode << 1) | frame))
34023415 {
34033416 case ((PSP_OUT << 1) | FRAME_GAME):
3404- current_paramater = &screen_paramater_psp_game[gpsp_config.screen_scale];
3417+ current_parameter = &screen_parameter_psp_game[gpsp_config.screen_scale];
34053418 break;
34063419 case ((PSP_OUT << 1) | FRAME_MENU):
3407- current_paramater = &screen_paramater_psp_menu;
3420+ current_parameter = &screen_parameter_psp_menu;
34083421 break;
34093422 case ((ANALOG_OUT << 1) | FRAME_GAME):
3410- current_paramater = &screen_paramater_analog_game[gpsp_config.screen_ratio][gpsp_config.screen_interlace][gpsp_config.screen_scale];
3423+ current_parameter = &screen_parameter_analog_game[gpsp_config.screen_ratio][gpsp_config.screen_interlace][gpsp_config.screen_scale];
34113424 break;
34123425 case ((ANALOG_OUT << 1) | FRAME_MENU):
3413- current_paramater = &screen_paramater_analog_menu[gpsp_config.screen_ratio][gpsp_config.screen_interlace];
3426+ current_parameter = &screen_parameter_analog_menu[gpsp_config.screen_ratio][gpsp_config.screen_interlace];
34143427 break;
34153428 case ((DIGITAL_OUT << 1) | FRAME_GAME):
3416- current_paramater = &screen_paramater_digital_game[gpsp_config.screen_ratio][gpsp_config.screen_interlace][gpsp_config.screen_scale];
3429+ current_parameter = &screen_parameter_digital_game[gpsp_config.screen_ratio][gpsp_config.screen_interlace][gpsp_config.screen_scale];
34173430 break;
34183431 case ((DIGITAL_OUT << 1) | FRAME_MENU):
3419- current_paramater = &screen_paramater_digital_menu[gpsp_config.screen_ratio][gpsp_config.screen_interlace];
3432+ current_parameter = &screen_parameter_digital_menu[gpsp_config.screen_ratio][gpsp_config.screen_interlace];
34203433 break;
34213434 }
34223435
34233436 if(psp_model != psp_1000)
3424- pspDveMgrSetVideoOut(current_paramater->video_out.u, current_paramater->video_out.displaymode, current_paramater->video_out.width,
3425- current_paramater->video_out.height, current_paramater->video_out.x, current_paramater->video_out.y, current_paramater->video_out.z);
3437+ pspDveMgrSetVideoOut(current_parameter->video_out.u, current_parameter->video_out.displaymode, current_parameter->video_out.width,
3438+ current_parameter->video_out.height, current_parameter->video_out.x, current_parameter->video_out.y, current_parameter->video_out.z);
34263439
3427- memcpy(screen_vertex, &current_paramater->screen_setting_1, sizeof(float) * 20);
3440+ memcpy(screen_vertex, &current_parameter->screen_setting_1, sizeof(float) * 20);
34283441
34293442 video_draw_frame = frame;
34303443 screen_address = (u16 *)flip_address[frame][0];
34313444 screen_flip = 0;
3432- screen_pitch = current_paramater->texture_size.pitch;
3433- screen_width = current_paramater->texture_size.width;
3434- screen_height = current_paramater->texture_size.height;
3445+ screen_pitch = current_parameter->texture_size.pitch;
3446+ screen_width = current_parameter->texture_size.width;
3447+ screen_height = current_parameter->texture_size.height;
34353448 screen_width2 = screen_width / 2;
34363449 screen_height2 = screen_height / 2;
34373450
34383451 sceGuStart(GU_DIRECT, display_list);
3439- sceGuDispBuffer(current_paramater->screen_size.width, current_paramater->screen_size.height, (void*)0, FRAME_LINE_SIZE);
3440- sceGuScissor(current_paramater->view.x, current_paramater->view.y, current_paramater->view.width, current_paramater->view.height);
3441- sceGuTexFilter(current_paramater->filter[gpsp_config.screen_filter], current_paramater->filter[gpsp_config.screen_filter]);
3452+ sceGuDispBuffer(current_parameter->screen_size.width, current_parameter->screen_size.height, (void*)0, FRAME_LINE_SIZE);
3453+ sceGuScissor(current_parameter->view.x, current_parameter->view.y, current_parameter->view.width, current_parameter->view.height);
34423454 sceGuEnable(GU_SCISSOR_TEST);
3455+ sceGuTexFilter(current_parameter->filter[gpsp_config.screen_filter], current_parameter->filter[gpsp_config.screen_filter]);
3456+ sceGuEnable(GU_TEXTURE_2D);
34433457 sceGuFinish();
3458+ sceGuSync(0, 0);
34443459
34453460 flip_screen();
3446- clear_screen(0x0000);
3461+ clear_screen(0);
34473462 flip_screen();
3448- clear_screen(0x0000);
3463+ clear_screen(0);
34493464 flip_screen();
34503465 }
34513466 }
@@ -3460,7 +3475,7 @@
34603475 // 書込バッファの設定
34613476 sceGuDrawBufferList(GU_PSM_5551, (void *)screen_offset_address, screen_pitch);
34623477 // 書込範囲の設定
3463- sceGuScissor(0, 0, current_paramater->texture_size.width, current_paramater->texture_size.height);
3478+ sceGuScissor(0, 0, current_parameter->texture_size.width, current_parameter->texture_size.height);
34643479 // クリアする色の設定 ※パレット設定にかかわらず32bitで指定する
34653480 sceGuClearColor(color32);
34663481 // 画面クリア
@@ -3474,7 +3489,7 @@
34743489 // 書込バッファの設定
34753490 sceGuDrawBufferList(GU_PSM_5551, (void *)0, FRAME_LINE_SIZE);
34763491 // 書込範囲の設定
3477- sceGuScissor(current_paramater->view.x, current_paramater->view.y, current_paramater->view.width, current_paramater->view.height);
3492+ sceGuScissor(current_parameter->view.x, current_parameter->view.y, current_parameter->view.width, current_parameter->view.height);
34783493 // GUコマンドの終了
34793494 sceGuFinish();
34803495 // GUコマンドの実行
@@ -3522,7 +3537,7 @@
35223537 void video_write_mem_savestate(FILE_TAG_TYPE savestate_file)
35233538 video_savestate_body(WRITE_MEM);
35243539
3525-#define LOAD_PARAMATER_NUMBER (SCREEN_SCALE + 1 + (SCREEN_RATIO*SCREEN_INTERLACE*SCREEN_SCALE + SCREEN_RATIO*SCREEN_INTERLACE) * 2)
3540+#define LOAD_PARAMETER_NUMBER (SCREEN_SCALE + 1 + (SCREEN_RATIO*SCREEN_INTERLACE*SCREEN_SCALE + SCREEN_RATIO*SCREEN_INTERLACE) * 2)
35263541
35273542 void load_video_config()
35283543 {
@@ -3531,15 +3546,15 @@
35313546 u32 i,loop;
35323547 int p[6][8];
35333548 float f[2][10];
3534- SCREEN_PARAMATER paramater[LOAD_PARAMATER_NUMBER];
3549+ SCREEN_PARAMETER parameter[LOAD_PARAMETER_NUMBER];
35353550
35363551 // 設定の初期化
3537- memcpy(&paramater[0], &screen_paramater_psp_menu_init, sizeof(SCREEN_PARAMATER));
3538- memcpy(&paramater[1], &screen_paramater_analog_menu_init, sizeof(SCREEN_PARAMATER)*2*2);
3539- memcpy(&paramater[5], &screen_paramater_digital_menu_init, sizeof(SCREEN_PARAMATER)*2*2);
3540- memcpy(&paramater[9], &screen_paramater_psp_game_init, sizeof(SCREEN_PARAMATER)*5);
3541- memcpy(&paramater[14], &screen_paramater_analog_game_init, sizeof(SCREEN_PARAMATER)*2*2*5);
3542- memcpy(&paramater[34], &screen_paramater_digital_game_init, sizeof(SCREEN_PARAMATER)*2*2*5);
3552+ memcpy(&parameter[0], &screen_parameter_psp_menu_init, sizeof(SCREEN_PARAMETER));
3553+ memcpy(&parameter[1], &screen_parameter_analog_menu_init, sizeof(SCREEN_PARAMETER)*2*2);
3554+ memcpy(&parameter[5], &screen_parameter_digital_menu_init, sizeof(SCREEN_PARAMETER)*2*2);
3555+ memcpy(&parameter[9], &screen_parameter_psp_game_init, sizeof(SCREEN_PARAMETER)*5);
3556+ memcpy(&parameter[14], &screen_parameter_analog_game_init, sizeof(SCREEN_PARAMETER)*2*2*5);
3557+ memcpy(&parameter[34], &screen_parameter_digital_game_init, sizeof(SCREEN_PARAMETER)*2*2*5);
35433558
35443559 // video configファイルのオープン
35453560 video_file = fopen(GPSP_CONFIG_FILENAME, "r");
@@ -3574,26 +3589,26 @@
35743589 if(i == 8)
35753590 {
35763591 // パラメータの保存
3577- memcpy(&paramater[loop].video_out.u, &p[0][0], sizeof(VIDEO_OUT_PARAMETER));
3578- memcpy(&paramater[loop].filter[0], &p[1][0], sizeof(int) * 2);
3579- memcpy(&paramater[loop].texture_size.pitch, &p[2][0], sizeof(TEXTURE_SIZE));
3580- memcpy(&paramater[loop].texture_bit.x, &p[3][0], sizeof(TEXTURE_BIT));
3581- memcpy(&paramater[loop].screen_size.width, &p[4][0], sizeof(SCREEN_SIZE));
3582- memcpy(&paramater[loop].view.x, &p[5][0], sizeof(VIEW_PORT));
3583- memcpy(&paramater[loop].screen_setting_1.u1, &f[0][0], sizeof(SPRITE));
3584- memcpy(&paramater[loop].screen_setting_2.u1, &f[1][0], sizeof(SPRITE));
3592+ memcpy(&parameter[loop].video_out.u, &p[0][0], sizeof(VIDEO_OUT_PARAMETER));
3593+ memcpy(&parameter[loop].filter[0], &p[1][0], sizeof(int) * 2);
3594+ memcpy(&parameter[loop].texture_size.pitch, &p[2][0], sizeof(TEXTURE_SIZE));
3595+ memcpy(&parameter[loop].texture_bit.x, &p[3][0], sizeof(TEXTURE_BIT));
3596+ memcpy(&parameter[loop].screen_size.width, &p[4][0], sizeof(SCREEN_SIZE));
3597+ memcpy(&parameter[loop].view.x, &p[5][0], sizeof(VIEW_PORT));
3598+ memcpy(&parameter[loop].screen_setting_1.u1, &f[0][0], sizeof(SPRITE));
3599+ memcpy(&parameter[loop].screen_setting_2.u1, &f[1][0], sizeof(SPRITE));
35853600 i = 0;
35863601 loop++;
35873602 }
3588- if(loop == LOAD_PARAMATER_NUMBER)
3603+ if(loop == LOAD_PARAMETER_NUMBER)
35893604 break;
35903605 }
35913606 }
35923607 // パラメータのセット
3593- memcpy(&screen_paramater_psp_menu, &paramater[0], sizeof(SCREEN_PARAMATER));
3594- memcpy(&screen_paramater_analog_menu, &paramater[1], sizeof(SCREEN_PARAMATER)*2*2);
3595- memcpy(&screen_paramater_digital_menu, &paramater[5], sizeof(SCREEN_PARAMATER)*2*2);
3596- memcpy(&screen_paramater_psp_game, &paramater[9], sizeof(SCREEN_PARAMATER)*5);
3597- memcpy(&screen_paramater_analog_game, &paramater[14], sizeof(SCREEN_PARAMATER)*2*2*5);
3598- memcpy(&screen_paramater_digital_game, &paramater[34], sizeof(SCREEN_PARAMATER)*2*2*5);
3608+ memcpy(&screen_parameter_psp_menu, &parameter[0], sizeof(SCREEN_PARAMETER));
3609+ memcpy(&screen_parameter_analog_menu, &parameter[1], sizeof(SCREEN_PARAMETER)*2*2);
3610+ memcpy(&screen_parameter_digital_menu, &parameter[5], sizeof(SCREEN_PARAMETER)*2*2);
3611+ memcpy(&screen_parameter_psp_game, &parameter[9], sizeof(SCREEN_PARAMETER)*5);
3612+ memcpy(&screen_parameter_analog_game, &parameter[14], sizeof(SCREEN_PARAMETER)*2*2*5);
3613+ memcpy(&screen_parameter_digital_game, &parameter[34], sizeof(SCREEN_PARAMETER)*2*2*5);
35993614 }
--- trunk/gpsp-kai-test/src/memory.c (revision 349)
+++ trunk/gpsp-kai-test/src/memory.c (revision 350)
@@ -3476,7 +3476,7 @@
34763476 if(yesno_dialog(buf) == 1)
34773477 return 0;
34783478
3479- init_progress(9, "Load State."); // TODO:メッセージファイル化
3479+ init_progress(9, msg[MSG_LOAD_STATE]);
34803480
34813481 if (slot_num != MEM_STATE_NUM)
34823482 {
@@ -3526,7 +3526,7 @@
35263526
35273527 oam_update = 1;
35283528 gbc_sound_update = 1;
3529- show_progress("Load State end."); // TODO:メッセージファイル化
3529+ show_progress(msg[MSG_LOAD_STATE_END]);
35303530
35313531 // TODO:違うROMのstatesaveファイルを読み込むとフリーズする
35323532 if(strcmp(current_gamepak_filename, gamepak_filename))
@@ -3603,7 +3603,7 @@
36033603
36043604 u64 current_time;
36053605 pspTime current_time_fix; // time関数が年月日を返さないので調整用
3606- init_progress(9, "Save State."); // TODO:メッセージファイル化
3606+ init_progress(9, msg[MSG_SAVE_STATE]);
36073607
36083608 FILE_WRITE_MEM(savestate_file, screen_capture, 240 * 160 * 2);
36093609 update_progress();
@@ -3629,7 +3629,7 @@
36293629 mem_save_flag = 1;
36303630
36313631 update_progress();
3632- show_progress("Save State end."); // TODO:メッセージファイル化
3632+ show_progress(msg[MSG_SAVE_STATE_END]);
36333633 real_frame_count = 0;
36343634 virtual_frame_count = 0;
36353635 pause_sound(0);
--- trunk/gpsp-kai-test/src/video.h (revision 349)
+++ trunk/gpsp-kai-test/src/video.h (revision 350)
@@ -165,7 +165,7 @@
165165 VIEW_PORT view; /* 表示範囲 */
166166 SPRITE screen_setting_1; /* スプライトデータ 1 */
167167 SPRITE screen_setting_2; /* スプライトデータ 1 */
168-} SCREEN_PARAMATER;
168+} SCREEN_PARAMETER;
169169
170170 extern u16 *screen_address;
171171 extern u32 screen_pitch;
@@ -173,17 +173,18 @@
173173 extern u32 screen_height;
174174 extern u32 screen_width2;
175175 extern u32 screen_height2;
176+extern u32 video_out_mode;
176177
177178 extern u32 current_scale;
178179
179-extern const SCREEN_PARAMATER screen_paramater_psp_game_init[];
180-extern const SCREEN_PARAMATER screen_paramater_psp_menu_init;
180+extern const SCREEN_PARAMETER screen_parameter_psp_game_init[];
181+extern const SCREEN_PARAMETER screen_parameter_psp_menu_init;
181182
182-extern const SCREEN_PARAMATER screen_paramater_analog_game_init[];
183-extern const SCREEN_PARAMATER screen_paramater_analog_menu_init[];
183+extern const SCREEN_PARAMETER screen_parameter_analog_game_init[];
184+extern const SCREEN_PARAMETER screen_parameter_analog_menu_init[];
184185
185-extern const SCREEN_PARAMATER screen_paramater_digital_game_init[];
186-extern const SCREEN_PARAMATER screen_paramater_digital_menu_init[];
186+extern const SCREEN_PARAMETER screen_parameter_digital_game_init[];
187+extern const SCREEN_PARAMETER screen_parameter_digital_menu_init[];
187188
188189 void set_resolution_parameter_game(video_scale_type scale);
189190 void set_resolution_parameter_menu();
--- trunk/gpsp-kai-test/src/main.c (revision 349)
+++ trunk/gpsp-kai-test/src/main.c (revision 350)
@@ -262,8 +262,8 @@
262262 int id;
263263
264264 // 終了周りのコールバック
265-// id = sceKernelCreateCallback("Exit Callback", (void *)exit_callback, NULL);
266-// sceKernelRegisterExitCallback(id);
265+ id = sceKernelCreateCallback("Exit Callback", (void *)exit_callback, NULL);
266+ sceKernelRegisterExitCallback(id);
267267
268268 // 電源周りのコールバック
269269 id = sceKernelCreateCallback("Power Callback", (void *)power_callback, NULL);
@@ -289,9 +289,11 @@
289289
290290 void quit()
291291 {
292-// if(!gpsp_config.update_backup_flag)
293- update_backup_force();
292+ save_game_config_file();
293+ save_config_file();
294294
295+ update_backup_force();
296+
295297 sound_exit();
296298 fbm_freeall();
297299
@@ -412,6 +414,7 @@
412414 sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_DATE_FORMAT,&date_format);
413415
414416 init_gpsp_config();
417+ init_game_config();
415418
416419 init_main();
417420 init_sound();
@@ -474,6 +477,8 @@
474477 load_config_file();
475478 update_progress();
476479
480+ sceImposeSetHomePopup(gpsp_config.enable_home);
481+
477482 // ROMファイル名の初期化
478483 gamepak_filename[0] = 0;
479484
@@ -496,7 +501,7 @@
496501 }
497502 update_progress();
498503
499- show_progress("Initialization end"); // TODO:メッセージファイル化
504+ show_progress(msg[MSG_INIT_END]);
500505
501506 #ifdef ADHOC_MODE
502507 // WLANのスイッチがONならばadhoc接続のテスト
@@ -688,7 +693,7 @@
688693 update_gbc_sound(cpu_ticks);
689694
690695 //TODO 調整必要
691- if(gpsp_config.screen_interlace == NON_INTERLACE)
696+ if((gpsp_config.screen_interlace == NON_INTERLACE)||(video_out_mode == 0))
692697 synchronize();
693698 else
694699 {
--- trunk/gpsp-kai-test/src/gui.c (revision 349)
+++ trunk/gpsp-kai-test/src/gui.c (revision 350)
@@ -80,9 +80,9 @@
8080 NULL, \
8181 display_string, \
8282 gamepad_config_buttons, \
83- game_config.gamepad_config_map + gamepad_config_line_to_button[number], \
83+ gamepad_config_map + gamepad_config_line_to_button[number], \
8484 sizeof(gamepad_config_buttons) / sizeof(gamepad_config_buttons[0]), \
85- gamepad_help[game_config.gamepad_config_map[ \
85+ gamepad_help[gamepad_config_map[ \
8686 gamepad_config_line_to_button[number]]], \
8787 number, \
8888 STRING_SELECTION_TYPE \
@@ -95,9 +95,9 @@
9595 NULL, \
9696 display_string, \
9797 gamepad_config_buttons, \
98- game_config.gamepad_config_map + number + 12, \
98+ gamepad_config_map + number + 12, \
9999 sizeof(gamepad_config_buttons) / sizeof(gamepad_config_buttons[0]), \
100- gamepad_help[game_config.gamepad_config_map[number + 12]], \
100+ gamepad_help[gamepad_config_map[number + 12]], \
101101 number + 2, \
102102 STRING_SELECTION_TYPE \
103103 } \
@@ -270,8 +270,6 @@
270270 /******************************************************************************
271271 * ローカル関数の宣言
272272 ******************************************************************************/
273-static s32 save_game_config_file();
274-static s32 save_config_file();
275273 static void get_savestate_snapshot(char *savestate_filename, u32 slot_num);
276274 static void get_savestate_filename(u32 slot, char *name_buffer);
277275 static int sort_function(const void *dest_str_ptr, const void *src_str_ptr);
@@ -739,6 +737,27 @@
739737 return return_value;
740738 }
741739
740+//標準のキーマップ
741+const u32 gamepad_config_map_init[MAX_GAMEPAD_CONFIG_MAP] =
742+{
743+ BUTTON_ID_MENU, /* △ */
744+ BUTTON_ID_A, /* ○ */
745+ BUTTON_ID_B, /* × */
746+ BUTTON_ID_FPS, /* □ */
747+ BUTTON_ID_L, /* [L] */
748+ BUTTON_ID_R, /* [R] */
749+ BUTTON_ID_DOWN, /* ↓ */
750+ BUTTON_ID_LEFT, /* ← */
751+ BUTTON_ID_UP, /* ↑ */
752+ BUTTON_ID_RIGHT, /* → */
753+ BUTTON_ID_SELECT, /* [SELECT] */
754+ BUTTON_ID_START, /* [START] */
755+ BUTTON_ID_UP, /* (↑) */
756+ BUTTON_ID_DOWN, /* (↓) */
757+ BUTTON_ID_LEFT, /* (←) */
758+ BUTTON_ID_RIGHT /* (→) */
759+};
760+
742761 /*--------------------------------------------------------
743762 game cfgの初期化
744763 --------------------------------------------------------*/
@@ -745,26 +764,6 @@
745764 void init_game_config()
746765 {
747766 u32 i;
748- //標準のキーマップ
749- const u32 gamepad_config_map_init[MAX_GAMEPAD_CONFIG_MAP] =
750- {
751- BUTTON_ID_MENU, /* △ */
752- BUTTON_ID_A, /* ○ */
753- BUTTON_ID_B, /* × */
754- BUTTON_ID_FPS, /* □ */
755- BUTTON_ID_L, /* [L] */
756- BUTTON_ID_R, /* [R] */
757- BUTTON_ID_DOWN, /* ↓ */
758- BUTTON_ID_LEFT, /* ← */
759- BUTTON_ID_UP, /* ↑ */
760- BUTTON_ID_RIGHT, /* → */
761- BUTTON_ID_SELECT, /* [SELECT] */
762- BUTTON_ID_START, /* [START] */
763- BUTTON_ID_UP, /* (↑) */
764- BUTTON_ID_DOWN, /* (↓) */
765- BUTTON_ID_LEFT, /* (←) */
766- BUTTON_ID_RIGHT /* (→) */
767- };
768767 game_config.frameskip_type = auto_frameskip;
769768 game_config.frameskip_value = 9;
770769 game_config.random_skip = 0;
@@ -777,6 +776,7 @@
777776 game_config.cheats_flag[i].cheat_name[0] = 0;
778777 }
779778 memcpy(game_config.gamepad_config_map, gamepad_config_map_init, sizeof(gamepad_config_map_init));
779+ game_config.use_default_gamepad_map = 1;
780780 }
781781
782782 /*--------------------------------------------------------
@@ -791,6 +791,9 @@
791791 gpsp_config.enable_audio = 1;
792792 gpsp_config.enable_analog = 1;
793793 gpsp_config.analog_sensitivity_level = 4;
794+ gpsp_config.enable_home = 0;
795+ memcpy(gpsp_config.gamepad_config_map, gamepad_config_map_init, sizeof(gamepad_config_map_init));
796+ memcpy(gamepad_config_map, gpsp_config.gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
794797 }
795798
796799 /*--------------------------------------------------------
@@ -828,6 +831,8 @@
828831 {
829832 case 0x10000: /* 1.0 */
830833 FILE_READ_VARIABLE(game_config_file, game_config);
834+ if(game_config.use_default_gamepad_map == 0)
835+ memcpy(gamepad_config_map, gpsp_config.gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
831836 break;
832837 }
833838 FILE_CLOSE(game_config_file);
@@ -871,6 +876,7 @@
871876 break;
872877 }
873878 FILE_CLOSE(gpsp_config_file);
879+ memcpy(gamepad_config_map, gpsp_config.gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
874880 return 0;
875881 }
876882 // 読み込めなかった場合の初期値の設定
@@ -921,6 +927,8 @@
921927 auto void submenu_savestate();
922928 auto void submenu_main();
923929 auto void reload_cheats_page();
930+ auto void home_mode();
931+ auto void set_gamepad();
924932
925933 char *gamepad_help[] =
926934 {
@@ -957,7 +965,6 @@
957965
958966 void menu_quit()
959967 {
960- save_config_file();
961968 quit();
962969 }
963970
@@ -1097,12 +1104,12 @@
10971104 {
10981105 clear_help();
10991106 current_option->help_string =
1100- gamepad_help[game_config.gamepad_config_map[gamepad_config_line_to_button[current_option_num]]];
1107+ gamepad_help[gamepad_config_map[gamepad_config_line_to_button[current_option_num]]];
11011108 }
11021109
11031110 void submenu_graphics_sound()
11041111 {
1105-
1112+
11061113 }
11071114
11081115 void submenu_cheats_misc()
@@ -1195,13 +1202,17 @@
11951202 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_1], yes_no_options, &gpsp_config.screen_filter, 2, msg[MSG_G_S_MENU_HELP_1], 1),
11961203 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_9], ratio_options, &gpsp_config.screen_ratio, 2, msg[MSG_G_S_MENU_HELP_9], 2),
11971204 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_10], interlace_options, &gpsp_config.screen_interlace, 2, msg[MSG_G_S_MENU_HELP_10], 3),
1205+
11981206 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_2], frameskip_options, &game_config.frameskip_type, 3, msg[MSG_G_S_MENU_HELP_2], 5),
11991207 NUMERIC_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_3], &game_config.frameskip_value, 100, msg[MSG_G_S_MENU_HELP_3], 6),
12001208 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_4], frameskip_variation_options, &game_config.random_skip, 2, msg[MSG_G_S_MENU_HELP_4], 7),
1209+
12011210 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_5], yes_no_options, &gpsp_config.enable_audio, 2, msg[MSG_G_S_MENU_HELP_5], 9),
12021211 STRING_SELECTION_OPTION(NULL, msg[MSG_G_S_MENU_6], audio_buffer_options, &game_config.audio_buffer_size_number, 11, msg[MSG_G_S_MENU_HELP_6], 11),
1212+
12031213 ACTION_OPTION(menu_save_ss, NULL, msg[MSG_G_S_MENU_7], msg[MSG_G_S_MENU_HELP_7], 12),
1204- SUBMENU_OPTION(NULL, msg[MSG_G_S_MENU_8], msg[MSG_G_S_MENU_HELP_8], 14)
1214+
1215+ SUBMENU_OPTION(NULL, msg[MSG_G_S_MENU_8], msg[MSG_G_S_MENU_HELP_8], 15)
12051216 };
12061217
12071218 MAKE_MENU(graphics_sound, submenu_graphics_sound, NULL);
@@ -1221,15 +1232,12 @@
12211232 CHEAT_OPTION((10 * menu_cheat_page) + 7),
12221233 CHEAT_OPTION((10 * menu_cheat_page) + 8),
12231234 CHEAT_OPTION((10 * menu_cheat_page) + 9),
1235+ NUMERIC_SELECTION_OPTION(reload_cheats_page, msg[MSG_CHEAT_MENU_5], &menu_cheat_page, MAX_CHEATS_PAGE, msg[MSG_CHEAT_MENU_HELP_5], 10),
1236+ ACTION_OPTION(menu_load_cheat_file, NULL, msg[MSG_CHEAT_MENU_1], msg[MSG_CHEAT_MENU_HELP_1], 11),
12241237
1225- NUMERIC_SELECTION_OPTION(reload_cheats_page, "cheat page: %d", &menu_cheat_page, MAX_CHEATS_PAGE, "cheat page", 10),
1226-
1227- ACTION_OPTION(menu_load_cheat_file, NULL, msg[MSG_CHEAT_MENU_1], msg[MSG_CHEAT_MENU_HELP_1], 11),
1228-
1229- STRING_SELECTION_OPTION(NULL, msg[MSG_CHEAT_MENU_2], clock_speed_options, &game_config.clock_speed_number, 10, msg[MSG_CHEAT_MENU_HELP_2], 13),
1230-
1231- STRING_SELECTION_OPTION(NULL, msg[MSG_CHEAT_MENU_3], update_backup_options, &game_config.update_backup_flag, 2, msg[MSG_CHEAT_MENU_HELP_3], 14),
1232-
1238+ STRING_SELECTION_OPTION(NULL, msg[MSG_CHEAT_MENU_2], clock_speed_options, &game_config.clock_speed_number, 10, msg[MSG_CHEAT_MENU_HELP_2], 13),
1239+ STRING_SELECTION_OPTION(NULL, msg[MSG_CHEAT_MENU_3], update_backup_options, &game_config.update_backup_flag, 2, msg[MSG_CHEAT_MENU_HELP_3], 14),
1240+ STRING_SELECTION_OPTION(home_mode, msg[MSG_CHEAT_MENU_6], yes_no_options, &gpsp_config.enable_home, 2, msg[MSG_CHEAT_MENU_HELP_6], 15),
12331241 SUBMENU_OPTION(NULL, msg[MSG_CHEAT_MENU_4], msg[MSG_CHEAT_MENU_HELP_4], 16)
12341242 };
12351243
@@ -1241,7 +1249,6 @@
12411249 MENU_OPTION_TYPE savestate_options[] =
12421250 {
12431251 NUMERIC_SELECTION_HIDE_OPTION(menu_load_state, menu_change_state, msg[MSG_STATE_MENU_0], &SAVESTATE_SLOT, 11, msg[MSG_STATE_MENU_HELP_0], 6),
1244-
12451252 NUMERIC_SELECTION_HIDE_OPTION(menu_save_state, menu_change_state, msg[MSG_STATE_MENU_1], &SAVESTATE_SLOT, 11, msg[MSG_STATE_MENU_HELP_1], 7),
12461253
12471254 NUMERIC_SELECTION_HIDE_OPTION(menu_load_state_file, menu_change_state, msg[MSG_STATE_MENU_2], &SAVESTATE_SLOT, 11, msg[MSG_STATE_MENU_HELP_2], 9),
@@ -1248,7 +1255,9 @@
12481255
12491256 NUMERIC_SELECTION_OPTION(menu_change_state, msg[MSG_STATE_MENU_3], &SAVESTATE_SLOT, 11, msg[MSG_STATE_MENU_HELP_3], 11),
12501257
1251- SUBMENU_OPTION(NULL, msg[MSG_STATE_MENU_4], msg[MSG_STATE_MENU_HELP_4], 13)
1258+
1259+
1260+ SUBMENU_OPTION(NULL, msg[MSG_STATE_MENU_4], msg[MSG_STATE_MENU_HELP_4], 15)
12521261 };
12531262
12541263 MAKE_MENU(savestate, submenu_savestate, NULL);
@@ -1271,7 +1280,9 @@
12711280 GAMEPAD_CONFIG_OPTION(msg[MSG_PAD_MENU_10], 10),
12721281 GAMEPAD_CONFIG_OPTION(msg[MSG_PAD_MENU_11], 11),
12731282
1274- SUBMENU_OPTION(NULL, msg[MSG_PAD_MENU_12], msg[MSG_PAD_MENU_HELP_0], 13)
1283+ STRING_SELECTION_OPTION(set_gamepad, msg[MSG_PAD_MENU_13], yes_no_options, &game_config.use_default_gamepad_map, 2, msg[MSG_PAD_MENU_HELP_13], 13),
1284+
1285+ SUBMENU_OPTION(NULL, msg[MSG_PAD_MENU_12], msg[MSG_PAD_MENU_HELP_12], 15)
12751286 };
12761287
12771288 MAKE_MENU(gamepad_config, submenu_gamepad, NULL);
@@ -1285,9 +1296,18 @@
12851296 ANALOG_CONFIG_OPTION(msg[MSG_A_PAD_MENU_1], 1),
12861297 ANALOG_CONFIG_OPTION(msg[MSG_A_PAD_MENU_2], 2),
12871298 ANALOG_CONFIG_OPTION(msg[MSG_A_PAD_MENU_3], 3),
1299+
1300+
1301+
12881302 STRING_SELECTION_OPTION(NULL, msg[MSG_A_PAD_MENU_4], yes_no_options, &gpsp_config.enable_analog, 2, msg[MSG_A_PAD_MENU_HELP_0], 7),
12891303 NUMERIC_SELECTION_OPTION(NULL, msg[MSG_A_PAD_MENU_5], &gpsp_config.analog_sensitivity_level, 10, msg[MSG_A_PAD_MENU_HELP_1], 8),
1290- SUBMENU_OPTION(NULL, msg[MSG_A_PAD_MENU_6], msg[MSG_A_PAD_MENU_HELP_2], 11)
1304+
1305+ STRING_SELECTION_OPTION(set_gamepad, msg[MSG_PAD_MENU_13], yes_no_options, &game_config.use_default_gamepad_map, 2, msg[MSG_PAD_MENU_HELP_13], 10),
1306+
1307+
1308+
1309+
1310+ SUBMENU_OPTION(NULL, msg[MSG_A_PAD_MENU_6], msg[MSG_A_PAD_MENU_HELP_2], 15)
12911311 };
12921312
12931313 MAKE_MENU(analog_config, submenu_analog, NULL);
@@ -1298,15 +1318,20 @@
12981318 MENU_OPTION_TYPE main_options[] =
12991319 {
13001320 SUBMENU_OPTION(&graphics_sound_menu, msg[MSG_MAIN_MENU_0], msg[MSG_MAIN_MENU_HELP_0], 0), /* 0行目 */
1321+
13011322 NUMERIC_SELECTION_ACTION_OPTION(menu_load_state, NULL, msg[MSG_MAIN_MENU_1], &SAVESTATE_SLOT, 11, msg[MSG_MAIN_MENU_HELP_1], 2), /* 2行目 */
13021323 NUMERIC_SELECTION_ACTION_OPTION(menu_save_state, NULL, msg[MSG_MAIN_MENU_2], &SAVESTATE_SLOT, 11, msg[MSG_MAIN_MENU_HELP_2], 3), /* 3行目 */
13031324 SUBMENU_OPTION(&savestate_menu, msg[MSG_MAIN_MENU_3], msg[MSG_MAIN_MENU_HELP_3], 4), /* 4行目 */
1325+
13041326 SUBMENU_OPTION(&gamepad_config_menu, msg[MSG_MAIN_MENU_4], msg[MSG_MAIN_MENU_HELP_4], 6), /* 6行目 */
13051327 SUBMENU_OPTION(&analog_config_menu, msg[MSG_MAIN_MENU_5], msg[MSG_MAIN_MENU_HELP_5], 7), /* 7行目 */
1328+
13061329 SUBMENU_OPTION(&cheats_misc_menu, msg[MSG_MAIN_MENU_6], msg[MSG_MAIN_MENU_HELP_6], 9), /* 9行目 */
1330+
13071331 ACTION_OPTION(menu_load, NULL, msg[MSG_MAIN_MENU_7], msg[MSG_MAIN_MENU_HELP_7], 11), /* 11行目 */
13081332 ACTION_OPTION(menu_restart, NULL, msg[MSG_MAIN_MENU_8], msg[MSG_MAIN_MENU_HELP_8], 12), /* 12行目 */
13091333 ACTION_OPTION(menu_exit, NULL, msg[MSG_MAIN_MENU_9], msg[MSG_MAIN_MENU_HELP_9], 13), /* 13行目 */
1334+
13101335 ACTION_OPTION(menu_quit, NULL, msg[MSG_MAIN_MENU_10], msg[MSG_MAIN_MENU_HELP_10], 15) /* 15行目 */
13111336 };
13121337
@@ -1345,6 +1370,25 @@
13451370 }
13461371 }
13471372
1373+ void home_mode()
1374+ {
1375+ sceImposeSetHomePopup(gpsp_config.enable_home);
1376+ }
1377+
1378+ void set_gamepad()
1379+ {
1380+ if(game_config.use_default_gamepad_map == 1)
1381+ {
1382+ memcpy(game_config.gamepad_config_map, gamepad_config_map, sizeof(game_config.gamepad_config_map));
1383+ memcpy(gamepad_config_map, gpsp_config.gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
1384+ }
1385+ else
1386+ {
1387+ memcpy(gpsp_config.gamepad_config_map, gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
1388+ memcpy(gamepad_config_map, game_config.gamepad_config_map, sizeof(game_config.gamepad_config_map));
1389+ }
1390+ }
1391+
13481392 // ローカル関数の定義 終了
13491393
13501394 // ここからメニューの処理
@@ -1771,13 +1815,10 @@
17711815 change_ext(gamepak_filename, name_buffer, savestate_ext);
17721816 }
17731817
1774-/******************************************************************************
1775- * ローカル関数の定義
1776- ******************************************************************************/
17771818 /*--------------------------------------------------------
17781819 game cfgファイルの書込
17791820 --------------------------------------------------------*/
1780-static s32 save_game_config_file()
1821+s32 save_game_config_file()
17811822 {
17821823 char game_config_filename[MAX_FILE];
17831824 char game_config_path[MAX_PATH];
@@ -1792,6 +1833,9 @@
17921833 else
17931834 strcpy(game_config_path, game_config_filename);
17941835
1836+ if(game_config.use_default_gamepad_map == 0)
1837+ memcpy(game_config.gamepad_config_map, gamepad_config_map, sizeof(game_config.gamepad_config_map));
1838+
17951839 FILE_OPEN(game_config_file, game_config_path, WRITE);
17961840 if(FILE_CHECK_VALID(game_config_file))
17971841 {
@@ -1808,16 +1852,19 @@
18081852 /*--------------------------------------------------------
18091853 gpSP cfgファイルの書込
18101854 --------------------------------------------------------*/
1811-static s32 save_config_file()
1855+s32 save_config_file()
18121856 {
18131857 char gpsp_config_path[MAX_PATH];
18141858 FILE_ID gpsp_config_file;
18151859
18161860 sprintf(gpsp_config_path, "%s/%s", main_path, GPSP_CONFIG_FILENAME);
1817- FILE_OPEN(gpsp_config_file, gpsp_config_path, WRITE);
18181861
18191862 save_game_config_file();
18201863
1864+ if(game_config.use_default_gamepad_map == 1)
1865+ memcpy(gpsp_config.gamepad_config_map, gamepad_config_map, sizeof(gpsp_config.gamepad_config_map));
1866+
1867+ FILE_OPEN(gpsp_config_file, gpsp_config_path, WRITE);
18211868 if(FILE_CHECK_VALID(gpsp_config_file))
18221869 {
18231870 FILE_WRITE(gpsp_config_file, (int *)GPSP_CONFIG_HEADER, sizeof(u32));
@@ -1830,6 +1877,9 @@
18301877 return -1;
18311878 }
18321879
1880+/******************************************************************************
1881+ * ローカル関数の定義
1882+ ******************************************************************************/
18331883 static void get_savestate_snapshot(char *savestate_filename, u32 slot_num)
18341884 {
18351885 u16 snapshot_buffer[240 * 160];
@@ -2054,4 +2104,3 @@
20542104 // sceKernelDcacheWritebackAll();
20552105 invalidate_all_cache();
20562106 }
2057-
--- trunk/gpsp-kai-test/src/gui.h (revision 349)
+++ trunk/gpsp-kai-test/src/gui.h (revision 350)
@@ -36,6 +36,8 @@
3636 u32 enable_audio;
3737 u32 enable_analog;
3838 u32 analog_sensitivity_level;
39+ u32 enable_home;
40+ u32 gamepad_config_map[MAX_GAMEPAD_CONFIG_MAP];
3941 } GPSP_CONFIG_V10;
4042
4143 typedef struct
@@ -48,6 +50,7 @@
4850 u32 update_backup_flag;
4951 CHEAT_TYPE cheats_flag[MAX_CHEATS];
5052 u32 gamepad_config_map[MAX_GAMEPAD_CONFIG_MAP];
53+ u32 use_default_gamepad_map;
5154 } GAME_CONFIG_V10;
5255
5356 /******************************************************************************
@@ -69,6 +72,9 @@
6972 s32 load_file(char **wildcards, char *result, char *default_dir_name);
7073 s32 load_game_config_file();
7174 s32 load_config_file();
75+s32 save_game_config_file();
76+s32 save_config_file();
77+
7278 u32 menu(u16 *original_screen);
7379
7480 u32 load_dircfg(char *file_name);
--- trunk/gpsp-kai-test/src/common.h (revision 349)
+++ trunk/gpsp-kai-test/src/common.h (revision 350)
@@ -55,6 +55,7 @@
5555 #include <pspkernel.h>
5656 #include <psputility.h>
5757 #include <kubridge.h>
58+#include <pspimpose_driver.h>
5859
5960 #ifdef ADHOC_MODE
6061 #include <pspnet.h>
--- trunk/gpsp-kai-test/readme_kai_jp.txt (revision 349)
+++ trunk/gpsp-kai-test/readme_kai_jp.txt (revision 350)
@@ -1,6 +1,18 @@
11 -- gameplaySP Gameboy Advance emulator for Playstation Portable --
22
33 -- Release log --
4+-UnOfficial gpSP kai 3.2 test 06 svn rev.
5+ メッセージファイルの変更
6+ MENUのチート/その他の設定にHOMEボタンの有効/無効を追加
7+ MENUのグラフィック/サウンドの設定にTV出力時のratio/interlaceの設定を追加
8+ gpsp.cfgにHOMEボタンの設定値を追加
9+ gpsp.cfgにキーマップの設定値を追加
10+ (サイズが36byte->104byteになっていますが、自動で更新されます)
11+ PSP本体のメニュー画面にフィルタがかからないように、video.cfgを更新
12+ キーマップをデフォルトかゲーム固有に切り替えられるようにした
13+ 終了時にgame cfgが保存されていなかったのを修正
14+ フィルタの設定が反映されなかったのを修正
15+
416 -UnOfficial gpSP kai 3.2 test 06 svn rev.346
517 メッセージファイルの変更
618 ロシア語用のメッセージ/フォントファイルのファイル名を変更
Show on old repository browser