Skip to content

Commit

Permalink
Update to v2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sterophonick committed Aug 20, 2019
1 parent 3d52aab commit e1ae1e8
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 27 deletions.
Binary file modified SYSTEM/PLUG/arc.mb
Binary file not shown.
Binary file added SYSTEM/PLUG/sb.gba
Binary file not shown.
Binary file added SYSTEM/PLUG/vga.gba
Binary file not shown.
Binary file added SYSTEM/PLUG/vgl.gba
Binary file not shown.
Binary file added SYSTEM/PLUG/vgm.gba
Binary file not shown.
2 changes: 1 addition & 1 deletion source/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <gba_dma.h>

#include "lang.h"
#include "hzk12.h"
#include "HZK12.h"
#include "asc126.h"


Expand Down
66 changes: 49 additions & 17 deletions source/ezkernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
//Second Page for settings
//Start Random Game option
//Launching .mbz file
//Toggleable cheats in-game

char *mod_ee;

Expand Down Expand Up @@ -101,6 +102,7 @@ u16 gl_select_lang;
u16 gl_engine_sel;

u16 gl_show_Thumbnail;
u16 gl_toggle_reset;
u16 gl_ingame_RTC_open_status;


Expand Down Expand Up @@ -1277,6 +1279,10 @@ void CheckSwitch(void)
if( (gl_show_Thumbnail != 0x0) && (gl_show_Thumbnail != 0x1)) {
gl_show_Thumbnail = 0x0;
}
gl_toggle_reset = Read_SET_info(14);
if( (gl_toggle_reset != 0x0) && (gl_toggle_reset != 0x1)) {
gl_toggle_reset = 0x0;
}
gl_ingame_RTC_open_status = Read_SET_info(13);
if( (gl_ingame_RTC_open_status != 0x0) && (gl_ingame_RTC_open_status != 0x1)) {
gl_ingame_RTC_open_status = 0x1;
Expand Down Expand Up @@ -1514,7 +1520,7 @@ u32 IWRAM_CODE LoadEMU2PSRAM(TCHAR *filename,u32 is_EMU)
Address=blocknum;
while(Address>=0x400000) {
Address-=0x400000;
page+=0x8000;
page+=0x800;
}
SetPSRampage(page);
dmaCopy((void*)pReadCache,PSRAMBase_S98 + rom_start_address + Address, 0x20000);
Expand Down Expand Up @@ -1550,6 +1556,7 @@ void save_set_info_SELECT(void)
SET_info_buffer[address] = Read_SET_info(address);
}
SET_info_buffer[12] = gl_show_Thumbnail;
SET_info_buffer[14] = gl_toggle_reset;
//save to nor
Save_SET_info(SET_info_buffer,0x200);
}
Expand Down Expand Up @@ -1757,6 +1764,8 @@ int main(void)
u32 shift;
u32 short_filename=0;
u8 error_num;
gl_show_Thumbnail = Read_SET_info(12);
gl_toggle_reset = Read_SET_info(14);
gl_currentpage = 0x8002 ;//kernel mode
SetMode (MODE_3 | BG2_ENABLE );
SD_Disable();
Expand Down Expand Up @@ -1821,6 +1830,16 @@ int main(void)
memset(pNorFS,00,sizeof(FM_NOR_FS)*MAX_NOR);
Save_NOR_info(pNorFS,sizeof(FM_NOR_FS)*MAX_NOR);
}
else {
VBlankIntrWait();
scanKeys();
if(keysDownRepeat() & KEY_L || keysDown() & KEY_L)
{
page_num = NOR_list;
goto load_file;
}
}

refind_file:
if(page_num== SD_list) {
folder_total = 0;
Expand Down Expand Up @@ -2113,12 +2132,23 @@ int main(void)
Show_MENU_btn();
u8 MENU_line = 0;
u8 re_menu=1;
u8 MENU_max = 0;
u8 MENU_max = 1;
u16 name_color = 0;
while(1)
{
if(re_menu == 1)
{
Show_Extra_Menu(MENU_line);
if(MENU_line== 1) {
name_color = gl_color_selected;
}
else {
name_color = gl_color_text;
}
if(gl_toggle_reset)
DrawHZText12("(ON)", 32, 60+(6*13), 44, name_color, 1);
else
DrawHZText12("(OFF)", 32, 60+(6*13), 44, name_color, 1);
re_menu=0;
}
re_menu = 0;
Expand All @@ -2131,20 +2161,12 @@ int main(void)
MENU_line++;
re_menu=1;
}
else if(MENU_line == MENU_max) {
MENU_line=0;
re_menu=1;
}
}
else if(keysdown & KEY_UP) {
if (MENU_line ) {
if (MENU_line > 0) {
MENU_line--;
re_menu=1;
}
else if(MENU_line == 0) {
MENU_line=MENU_max;
re_menu=1;
}
}
else if(keysup & KEY_B) {
gl_cheat_count = 0;
Expand All @@ -2161,10 +2183,17 @@ int main(void)
gl_show_Thumbnail = !gl_show_Thumbnail;
save_set_info_SELECT();
updata=1;
Refresh_filename(show_offset,file_select,updata,gl_show_Thumbnail&&is_GBA);
goto refind_file;
Refresh_filename(show_offset,file_select,updata,gl_show_Thumbnail&&is_GBA);
goto refind_file;
}
else if(MENU_line==1) {
gl_toggle_reset = !gl_toggle_reset;
save_set_info_SELECT();
updata=1;
Refresh_filename(show_offset,file_select,updata,gl_show_Thumbnail&&is_GBA);
goto refind_file;
}
else if(MENU_line==2) {
//StartRandomROM(currentpath);
}
}
Expand Down Expand Up @@ -2375,6 +2404,9 @@ int main(void)
}
ShowTime(page_num,page_mode);
} //3
load_file:


Clear(0, 0, 240, 160, gl_color_cheat_black, 1);
DrawHZText12(gl_Loading,0,(240-strlen(gl_Loading)*6)/2,74, gl_color_text,1);
u32 gamefilesize=0;
Expand Down Expand Up @@ -2567,7 +2599,7 @@ int main(void)
int bootmode=((is_EMU > 3)&&(is_EMU < 9)) ?
((is_EMU == 6) ? 2
: (is_EMU == 7) ? 4
: ((is_EMU == 8) ? 5 : 3)) : !key_L;
: ((is_EMU == 8) ? 5 : 3)) : gl_toggle_reset;
SetRompageWithHardReset(0x200, bootmode);
while(1) {
VBlankIntrWait();
Expand Down Expand Up @@ -2598,7 +2630,7 @@ int main(void)
Send_FATbuffer(FAT_table_buffer,0);
GBApatch_Cleanrom(PSRAMBase_S98,gamefilesize);
//wait_btn();
SetRompageWithHardReset(0x200,!key_L);
SetRompageWithHardReset(0x200,gl_toggle_reset);
break;
case 1://PSRAM BOOT WITH ADDON
gl_reset_on = Read_SET_info(1);
Expand Down Expand Up @@ -2650,7 +2682,7 @@ int main(void)
Make_pat_file(pfilename);
}
//wait_btn();
SetRompageWithHardReset(0x200,!key_L);
SetRompageWithHardReset(0x200,gl_toggle_reset);
break;
case 2://WRITE TO NOR CLEAN
f_chdir(currentpath);//return to game folder
Expand Down Expand Up @@ -2717,4 +2749,4 @@ void IWRAM_CODE StartRandomROM(TCHAR path)
char* msg;
sprintf(msg,"%d",randfile);
DrawHZText12(msg,0,3,20, 0x7FFF,1);
}
}
1 change: 1 addition & 0 deletions source/ezkernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ extern u16 gl_color_NORFULL;
extern u16 gl_color_btn_clean;

u32 Setting_window(void);
extern u16 gl_toggle_reset;


u32 LoadRTSfile(TCHAR *filename);
Expand Down
10 changes: 5 additions & 5 deletions source/lang.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const char zh_language[]=" LANGUAGE";
const char zh_error_6[]="RTS文件错误";

const char zh_theme_credit[]="Sterophonick的SimpleLight主";
const char zh_theme_credit2[]="題2.3";
const char zh_theme_credit2[]="題2.5";

const char zh_copying_data[]="复制ROM ...";

Expand All @@ -184,10 +184,9 @@ const char *zh_nor_op[3]={

const char *zh_more_options[2]={
"切换缩略图",
"",
"切换重置",
};


//英文
const char en_init_error[]="Failed to initialize microSD card.";
const char en_power_off[]="Power off the console.";
Expand Down Expand Up @@ -224,7 +223,7 @@ const char en_ok_btn[]=" OK";
const char en_formatnor_info1[]="Sure? This will be";
const char en_formatnor_info2[]=" about 4 minutes.";

const char en_theme_credit[]="SimpleLight theme 2.3 by";
const char en_theme_credit[]="SimpleLight theme 2.5 by";
const char en_theme_credit2[]="Sterophonick.";

const char en_check_sav[]="Checking Save Data...";
Expand Down Expand Up @@ -285,7 +284,8 @@ const char *en_nor_op[3]={
};
const char *en_more_options[2]={
"Toggle thumbnail",
"",//Start Random Game
"Toggle reset",
//Start Random Game
};

//---------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions source/setwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,7 @@ void save_set_info(void)
SET_info_buffer[12] = gl_show_Thumbnail;

SET_info_buffer[13] = gl_ingame_RTC_open_status;
SET_info_buffer[14] = gl_toggle_reset;

//save to nor
Save_SET_info(SET_info_buffer,0x200);
Expand Down
8 changes: 4 additions & 4 deletions source/showcht.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,13 @@ void Show_KEY_val(u32 total,u32 Select,u32 showoffset)
if(line== Select)
name_color = gl_color_selected;
else
name_color = gl_color_text;
name_color = 0x7FFF;

u8 select = ((FM_CHT_LINE*)pCHTbuffer)[showoffset+line].select;

if( ((FM_CHT_LINE*)pCHTbuffer)[showoffset+line].is_section==1)
{
Clear(X_offset+3, Y_offset+line*line_x+4, 4, 4, gl_color_text, 1);//section flag
Clear(X_offset+3, Y_offset+line*line_x+4, 4, 4, 0x7FFF, 1);//section flag

sprintf(msg,"%s",((FM_CHT_LINE*)pCHTbuffer)[showoffset+line].LINEname);

Expand Down Expand Up @@ -833,7 +833,7 @@ void Show_num(u32 totalcount,u32 select)
Clear(186, 3, 7*6, 15, gl_color_chtBG, 1);
sprintf(msg,"[%03lu/%03lu]",select,totalcount);

DrawHZText12(msg,0,182,3, gl_color_text,1);
DrawHZText12(msg,0,182,3, 0x7FFF,1);
}
//------------------------------------------------------------------
void Open_cht_file(TCHAR *gamefilename,u32 havecht)
Expand Down Expand Up @@ -873,7 +873,7 @@ void Open_cht_file(TCHAR *gamefilename,u32 havecht)
Get_KEY_val(&gfile,"GameInfo","Name",buffer);
sprintf(msg,"%s ",buffer);

DrawHZText12(msg,30,2,4, gl_color_text,1);
DrawHZText12(msg,30,2,4, 0x7FFF,1);

u32 all_count = Get_all_Section_val(&gfile);
u32 Select = 1;
Expand Down

0 comments on commit e1ae1e8

Please sign in to comment.