mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-24 15:07:09 -05:00
quick sav
This commit is contained in:
parent
91ae3c4c24
commit
8a7eeca82a
|
|
@ -4,27 +4,6 @@
|
|||
gUnknown_8270000: @ 8270000
|
||||
@ replacing .incbin "baserom.gba", 0x00270000, 0x2724
|
||||
|
||||
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.4byte Ground_Text
|
||||
.4byte GroundScript_Text
|
||||
.4byte Dungeon_Text
|
||||
.4byte Sound_Text
|
||||
.4byte Bgm_Text
|
||||
.4byte Se_Text
|
||||
.4byte Flag_Text
|
||||
.4byte Memory_Text
|
||||
.4byte MemoryCard_Text
|
||||
.4byte Performance_Text
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.4byte sGameInternalVersion
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x0f, 0x00
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ u32 sub_8011C1C(void);
|
|||
void sub_8011C28(u32 in);
|
||||
s32 sub_8011C34(void);
|
||||
void sub_8011C40(s32 in);
|
||||
char *GetGameInternalName(void);
|
||||
const char *GetGameInternalName(void);
|
||||
void sub_8011CA8(u32 *out, s32 size);
|
||||
u32 ReadSaveFromPak(u32 *a);
|
||||
u32 WriteSavetoPak(s32 *param_1, u32 param_2);
|
||||
|
|
@ -103,4 +103,4 @@ bool8 ValidateChecksum(u8 *in, u32 size);
|
|||
s32 sub_80121D4(s32 *a, u8 *src, s32 size);
|
||||
u32 sub_80121E0(u32);
|
||||
|
||||
#endif // GUARD_SAVE_H
|
||||
#endif // GUARD_SAVE_H
|
||||
|
|
|
|||
28
src/debug.c
28
src/debug.c
|
|
@ -7,8 +7,8 @@
|
|||
extern void Hang();
|
||||
static void FatalErrorHang(void) __attribute__((noreturn));
|
||||
|
||||
EWRAM_DATA_2 bool32 gNDS_DebugEnabled = {0};
|
||||
EWRAM_DATA_2 u8 gUnknown_203B150 = {0};
|
||||
EWRAM_INIT bool32 gNDS_DebugEnabled = {0};
|
||||
EWRAM_INIT u8 gUnknown_203B150 = {0};
|
||||
|
||||
ALIGNED(4) const char gFuncFileLineString[] = "func = '%s'\nfile = '%s' line = %5d";
|
||||
|
||||
|
|
@ -21,17 +21,19 @@ ALIGNED(4) const char debug_fill14[] = "pksdir0";
|
|||
ALIGNED(4) const char gDebugPrintPrefix[] = " Print ";
|
||||
ALIGNED(4) static const char debug_fill13[] = "pksdir0";
|
||||
|
||||
ALIGNED(4) const char Performance_Text[] = "Performance";
|
||||
ALIGNED(4) const char MemoryCard_Text[] = "Memory Card";
|
||||
ALIGNED(4) const char Memory_Text[] = "Memory";
|
||||
ALIGNED(4) const char Flag_Text[] = "Flag";
|
||||
ALIGNED(4) const char Se_Text[] = "Se";
|
||||
ALIGNED(4) const char Bgm_Text[] = "Bgm";
|
||||
ALIGNED(4) const char Sound_Text[] = "Sound";
|
||||
ALIGNED(4) const char Dungeon_Text[] = "Dungeon";
|
||||
ALIGNED(4) const char GroundScript_Text[] = "GroundScript";
|
||||
ALIGNED(4) const char Ground_Text[] = "Ground";
|
||||
|
||||
static UNUSED EWRAM_INIT const char *sUnusedEwramDebugStrings[] =
|
||||
{
|
||||
"Ground",
|
||||
"GroundScript",
|
||||
"Dungeon",
|
||||
"Sound",
|
||||
"Bgm",
|
||||
"Se",
|
||||
"Flag",
|
||||
"Memory",
|
||||
"Memory Card",
|
||||
"Performance",
|
||||
};
|
||||
|
||||
ALIGNED(4) const char gNotMountText[] = "not mount log system";
|
||||
ALIGNED(4) static const char debug_fill9[] = "pksdir0";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "quick_save_read.h"
|
||||
#include "save.h"
|
||||
|
||||
static EWRAM_DATA_2 QuickSaveRead *sQuickSaveRead = {0};
|
||||
static EWRAM_INIT QuickSaveRead *sQuickSaveRead = {NULL};
|
||||
|
||||
#include "data/quick_save_read.h"
|
||||
|
||||
|
|
@ -62,4 +62,4 @@ void FinishQuickSaveRead(void)
|
|||
MemoryFree(sQuickSaveRead);
|
||||
sQuickSaveRead = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "quick_save_write.h"
|
||||
#include "save.h"
|
||||
|
||||
static EWRAM_DATA_2 QuickSaveWrite *sQuickSaveWrite = {0};
|
||||
static EWRAM_INIT QuickSaveWrite *sQuickSaveWrite = {NULL};
|
||||
|
||||
#include "data/quick_save_write.h"
|
||||
|
||||
|
|
@ -89,4 +89,4 @@ void FinishQuickSaveWrite()
|
|||
MemoryFree(sQuickSaveWrite);
|
||||
sQuickSaveWrite = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
20
src/save.c
20
src/save.c
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "string_format.h"
|
||||
#include "code_8097670.h"
|
||||
|
|
@ -12,12 +13,6 @@
|
|||
#include "random.h"
|
||||
#include "save.h"
|
||||
|
||||
EWRAM_DATA s32 gUnknown_202DE28 = {0};
|
||||
|
||||
EWRAM_DATA_2 u32 gUnknown_203B17C = {0};
|
||||
EWRAM_DATA_2 char *gUnknown_203B180 = {0};
|
||||
EWRAM_DATA_2 struct UnkStruct_203B184 *gUnknown_203B184 = {0};
|
||||
|
||||
// size: 0x800
|
||||
struct unk_struct
|
||||
{
|
||||
|
|
@ -30,8 +25,11 @@ struct unk_struct
|
|||
u32 padding[503];
|
||||
};
|
||||
|
||||
ALIGNED(4) static const char debug_fill8[] = "pksdir0";
|
||||
ALIGNED(4) const char sGameInternalVersion[] = _("POKE_DUNGEON__05");
|
||||
EWRAM_DATA s32 gUnknown_202DE28 = {0};
|
||||
|
||||
EWRAM_INIT u32 gUnknown_203B17C = {0};
|
||||
EWRAM_INIT const char *gUnknown_203B180 = {"POKE_DUNGEON__05"};
|
||||
EWRAM_INIT struct UnkStruct_203B184 *gUnknown_203B184 = {0};
|
||||
|
||||
ALIGNED(4) static const char fill_save0[] = _("pksdir0");
|
||||
ALIGNED(4) static const char fill_save1[] = _("pksdir0");
|
||||
|
|
@ -72,7 +70,7 @@ void sub_8011C40(s32 x)
|
|||
gUnknown_202DE28 = x;
|
||||
}
|
||||
|
||||
char *GetGameInternalName(void)
|
||||
const char *GetGameInternalName(void)
|
||||
{
|
||||
return gUnknown_203B180; // returns POKE_DUNGEON__05
|
||||
}
|
||||
|
|
@ -321,7 +319,7 @@ bool8 IsSaveCorrupted(void)
|
|||
u32 WriteSavetoPak(s32 *param_1, u32 param_2)
|
||||
{
|
||||
struct UnkStruct_sub_8011DAC *playerSave;
|
||||
char *gameName;
|
||||
const char *gameName;
|
||||
int saveStatus1;
|
||||
int saveStatus2;
|
||||
u8 *array_ptr;
|
||||
|
|
@ -384,7 +382,7 @@ s32 sub_80121D4(s32 *a, u8 *src, s32 size)
|
|||
u32 sub_80121E0(u32 r0)
|
||||
{
|
||||
u32 temp;
|
||||
char *gameName;
|
||||
const char *gameName;
|
||||
u32 saveStatus;
|
||||
struct unk_struct *r4 = MemoryAlloc(sizeof(struct unk_struct), 5);
|
||||
temp = 0x1F;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "save.h"
|
||||
#include "save_read.h"
|
||||
|
||||
EWRAM_DATA_2 SavePakRead *gSavePakRead = {0};
|
||||
EWRAM_INIT SavePakRead *gSavePakRead = {NULL};
|
||||
|
||||
#include "data/save_read.h"
|
||||
|
||||
|
|
@ -62,4 +62,4 @@ void FinishReadSavePak(void)
|
|||
MemoryFree(gSavePakRead);
|
||||
gSavePakRead = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "save.h"
|
||||
#include "save_write.h"
|
||||
|
||||
static EWRAM_DATA_2 SavePakWrite *sSavePakWrite = {0};
|
||||
static EWRAM_INIT SavePakWrite *sSavePakWrite = {NULL};
|
||||
|
||||
#include "data/save_write.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
.align 2
|
||||
|
||||
.include "src/debug.o"
|
||||
.space 0x2B
|
||||
|
||||
.include "src/save.o"
|
||||
.include "src/save_read.o"
|
||||
.include "src/save_write.o"
|
||||
.include "src/quick_save_read.o"
|
||||
.include "src/quick_save_write.o"
|
||||
|
||||
|
||||
|
||||
|
||||
gUnknown_203B198: /* 203B198 (sub_8014248 - sub_8014A88) */
|
||||
.space 0x60
|
||||
|
|
|
|||
|
|
@ -15,3 +15,9 @@
|
|||
.include "src/code_800DAC0.o"
|
||||
.include "src/code_800ED38.o"
|
||||
.include "src/code_8010EF0.o"
|
||||
.include "src/debug.o"
|
||||
.include "src/save.o"
|
||||
.include "src/save_read.o"
|
||||
.include "src/save_write.o"
|
||||
.include "src/quick_save_read.o"
|
||||
.include "src/quick_save_write.o"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user