more modularity; fixed an assert in sm64.ld so it doesnt trip if ext ram is defined

This commit is contained in:
someone2639
2021-05-27 00:34:53 -04:00
parent bd79934f00
commit 0ee319a300
3 changed files with 8 additions and 5 deletions

View File

@@ -210,9 +210,10 @@
CMD_BBH(0x20, 0x04, 0x0000)
#define LOAD_MODEL_FROM_DL(model, dl, layer) \
CMD_BBH(0x21, 0x0C, 0), \
CMD_BBH(0x21, 0x10, 0), \
CMD_PTR(dl), \
CMD_HH(layer, model)
CMD_W(layer), \
CMD_W(model)
#define LOAD_MODEL_FROM_GEO(model, geo) \
CMD_BBH(0x22, 0x0C, 0), \

View File

@@ -231,7 +231,9 @@ SECTIONS
__mainPoolSize = RAM_END - .;
__expansionRamStart = 0x80400000;
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
#ifndef USE_EXT_RAM
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
#endif
BEGIN_SEG(entry, 0x10000000)

View File

@@ -375,8 +375,8 @@ static void level_cmd_end_area(void) {
}
static void level_cmd_load_model_from_dl(void) {
ModelID model = CMD_GET(ModelID, 0xA);
s16 layer = CMD_GET(u16, 0x8);
ModelID model = CMD_GET(ModelID, 0xC);
s16 layer = CMD_GET(u32, 0x8);
void *dl_ptr = CMD_GET(void *, 4);
if (model < ARRAY_COUNT(gGraphNodePointers)) {