File tree Expand file tree Collapse file tree 6 files changed +985
-7
lines changed
Expand file tree Collapse file tree 6 files changed +985
-7
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ ACTOR_DIR := actors
384384LEVEL_DIRS := $(patsubst levels/% ,% ,$(dir $(wildcard levels/* /header.h) ) )
385385
386386# Directories containing source files
387- SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
387+ SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers lib/librtc actors levels bin data assets asm lib sound
388388LIBZ_SRC_DIRS := src/libz
389389GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
390390BIN_DIRS := bin bin/$(VERSION )
Original file line number Diff line number Diff line change 2222.word 0x00000000 /* Unknown */
2323#endif
2424.word 0x0000004E /* Cartridge */
25- #if defined(EEP4K) && !defined(EMU_DEFAULT_TO_GCN)
25+ #if defined(EEP4K) && !defined(EMU_DEFAULT_TO_GCN) && !defined(USE_RTC)
2626.ascii "SM" /* Cartridge ID */
2727#else
2828.ascii "ED" /* Cartridge ID */
3535 .ascii "E" /* NTSC-U (North America) */
3636#endif
3737
38+ #if defined(USE_RTC)
39+ #define RTC_BIT 0x1
40+ #else
41+ #define RTC_BIT 0x0
42+ #endif
43+
44+ /* Savetype, region, and RTC */
3845#if defined(SRAM)
39- .byte 0x32 /* Version */
46+ .byte 0x32 | RTC_BIT
4047#elif defined(EEP16K)
41- .byte 0x22 /* Version */
48+ .byte 0x22 | RTC_BIT
4249#elif defined(SRAM768K)
43- .byte 0x42 /* Version */
50+ .byte 0x42 | RTC_BIT
4451#elif defined(FLASHRAM)
45- .byte 0x52 /* Version */
52+ .byte 0x52 | RTC_BIT
4653#else
47- .byte 0x12 /* Version */
54+ .byte 0x12 | RTC_BIT
4855#endif
Original file line number Diff line number Diff line change 1010 */
1111#define INTERNAL_ROM_NAME "HackerSM64 "
1212
13+ /**
14+ * Enable the realtime clock (RTC)
15+ * See lib/librtc/librtc.h for RTC related functions
16+ */
17+ // #define USE_RTC
18+
1319/**
1420 * Force the game to delete any existing save data originating from a different hack. This requires INTERNAL_ROM_NAME to be unique to work properly.
1521 * It is recommended to enable this if any significant changes to the save file are made that could cause issues with this or other hacks.
You can’t perform that action at this time.
0 commit comments