Registrarse

[pokeemerald] Corregir el error de "Wrong Save Type"

Draizehn

Retired.
Miembro del equipo
Moderador/a
Hola Wah, son las 1:08am y les traigo mi primer aporte para esta hermosa parte del Rom Hacking.
Me pasé a Decomp hace 2-3 días y vengo con una traducción de éste post de PokéCommunity, los créditos van para el usuario Aron822.

no pregunten de que va, miren el título
No me enrollo más, vamos con el tutorial.


***

¿Qué necesitamos?
  • Nuestro repositorio, obviamente.
  • Visual Studio Code o Notepad++
  • Un cerebro.
- Paso 1 -
Abre el VSCode, clickea "Open folder" (CTRL+K * CTRL+O).
Ahora, dirígete a src, abre el archivo save_failed_screen.c y pega éste código al final del archivo:
Código:
void CB2_FlashNotDetectedScreen(void){
    static const struct WindowTemplate textWin[] = {
        {
            .bg = 0,
            .tilemapLeft = 3,
            .tilemapTop = 2,
            .width = 24,
            .height = 16,
            .paletteNum = 15,
            .baseBlock = 1,
        }
    };
   
    static const char errorMsg[] = _(
        "{COLOR RED}ERROR!\n"
        "{COLOR DARK_GRAY}Flash memory not detected.\n\n"
        "Set your emulator's save type\nsetting to Flash 1Mb / 128K\n"
        "and reload the rom."
    );

    if (!gMain.state){
        SetGpuReg(REG_OFFSET_DISPCNT, 0);
    SetGpuReg(REG_OFFSET_BLDCNT, 0);
        SetGpuReg(REG_OFFSET_BG0CNT, 0);
        SetGpuReg(REG_OFFSET_BG0HOFS, 0);
        SetGpuReg(REG_OFFSET_BG0VOFS, 0);
        DmaFill16(3, 0, VRAM, VRAM_SIZE);
        DmaFill32(3, 0, OAM, OAM_SIZE);
        DmaFill16(3, 0, PLTT, PLTT_SIZE);
    ResetBgsAndClearDma3BusyFlags(0);
        InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates));
        LoadBgTiles(0, gTextWindowFrame1_Gfx, 0x120, 0x214);
        DeactivateAllTextPrinters();
        ResetTasks();
        ResetPaletteFade();
    LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20);
        LoadPalette(gStandardMenuPalette, 0xF0, 0x20);
    InitWindows(textWin);
    DrawStdFrameWithCustomTileAndPalette(0, TRUE, 0x214, 0xE);
        SaveFailedScreenTextPrint(errorMsg, 1, 0);
    TransferPlttBuffer();
    *(u16*)PLTT = RGB(17, 18, 31);
    ShowBg(0);
        gMain.state++;
    }
}
- Paso 2 -
Ahora abre el archivo main.c (en src) y añade ésta línea algún lugar después de los #include:

Código:
extern void CB2_FlashNotDetectedScreen(void);

Ahora, busquen ésta línea:
Código:
SetMainCallback2(NULL);

Y reemplacen con ésta:
Código:
SetMainCallback2(CB2_FlashNotDetectedScreen);

Y con eso ya estaría, buena suerte. Nos vemos en un próximo DraicoTuto(?)
Ciao!
 
Última edición:
Arriba