sdcard picomite: sync with upstream

This commit is contained in:
Yatao Li
2025-06-15 21:31:45 +08:00
parent f305e6def6
commit eb3b15e188
37 changed files with 3695 additions and 449 deletions

View File

@@ -497,7 +497,6 @@ void __not_in_flash_func(routinechecks)(void){
if(clocktimer==0 && Option.RTC){
if(classicread==0 && nunchuckread==0){
RtcGetTime(0);
clocktimer=(1000*60*60);
}
}
#ifndef USBKEYBOARD
@@ -3282,16 +3281,16 @@ void MIPS32 __not_in_flash_func(HDMIloop3)(void){
case SCREENMODE2: //400 X 300 x 4bit-colour mapped to 256 or 424 X 240 x 4bit-colour mapped to 256
{
uint16_t *p=(uint16_t *)HDMIlines[line_to_load];
uint8_t l,d,s;
uint8_t l,d;
int pp= (Line_dup)*vgaloop4;
for(int i=0; i<vgaloop4 ; i++){
l=LayerBuf[pp+i];d=DisplayBuf[pp+i];s=SecondLayer[pp+i];
l=LayerBuf[pp+i];d=DisplayBuf[pp+i];
if((l&0xf)!=transparent){
*p++=map16d[l&0xf];
} else {
*p++=map16d[d&0xf];
}
d>>=4;l>>=4;s>>=4;
d>>=4;l>>=4;
if((l&0xf)!=transparent){
*p++=map16d[l&0xf];
} else {
@@ -4095,16 +4094,6 @@ int MIPS16 main(){
LoadOptions();
#ifdef rp2350
if(rom_get_last_boot_type()==BOOT_TYPE_FLASH_UPDATE)restart_reason=0xFFFFFFFC;
// if(Option.PSRAM_CS_PIN){
// gpio_init(47);
// gpio_set_dir(47, GPIO_OUT);
// gpio_put(47,GPIO_PIN_SET);
//}
// if(!rp2350a){
// gpio_init(47);
// gpio_set_dir(47, GPIO_OUT);
// gpio_put(47,GPIO_PIN_SET);
// }
#else
if(restart_reason==0x10001 || restart_reason==0x101)restart_reason=0xFFFFFFFC;
#endif
@@ -4637,7 +4626,7 @@ autorun:
i=0;
WatchdogSet=savewatchdog;
CommandToken tkn=commandtbl_decode(tknbuf);
if(tkn==GetCommandValue((unsigned char *)"RUN"))i=1;
if(tkn==GetCommandValue((unsigned char *)"RUN") || tkn==GetCommandValue((unsigned char *)"EDIT") || tkn==GetCommandValue((unsigned char *)"AUTOSAVE"))i=1;
if (setjmp(jmprun) != 0) {
PrepareProgram(false);
CurrentLinePtr = 0;