Skip to content

Commit

Permalink
Fill in missing objects in bank 8 objects.json (#340)
Browse files Browse the repository at this point in the history
* Fill out missing objects in objects.json
Also tweak a couple splits, and output missing objects when running splits_generate_sources.py

* tweak this as well while we're at it
Will be necessary down the line

* Fix smaller build issues

* Move RVL_SDK .c files to RVL_SDK/src
Required to distinguish between public and internal headers

* Re-integrate wpad_11dec2009 more cleanly

* Fix build of WPAD files

* Fix WPAD mismatch
  • Loading branch information
TheNathannator authored Sep 24, 2024
1 parent 8855194 commit 6d6b28e
Show file tree
Hide file tree
Showing 55 changed files with 2,265 additions and 713 deletions.
1,294 changes: 1,216 additions & 78 deletions config/SZBE69_B8/objects.json

Large diffs are not rendered by default.

574 changes: 287 additions & 287 deletions config/SZBE69_B8/splits.txt

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ def apply_base_cflags(key: str):
Equivalent = config.non_matching
NonMatching = False

config.warn_missing_config = False
config.warn_missing_config = True
config.warn_missing_source = False

def get_object_completed(status: str) -> bool:
if status == "Matching":
if status == "MISSING":
return NonMatching
elif status == "Matching":
return Matching
elif status == "NonMatching":
return NonMatching
Expand Down
4 changes: 4 additions & 0 deletions doc/objects_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
"description": "The match status of the object.",
"type": "string",
"oneOf": [
{
"description": "This object has no source file yet.",
"const": "MISSING"
},
{
"description": "This object is fully matching.",
"const": "Matching"
Expand Down
24 changes: 12 additions & 12 deletions src/band3/game/Defines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

TrackType ScoreTypeToTrackType(ScoreType scoreType) {
TrackType trackType;
switch(scoreType) {
case 0:

switch (scoreType) {
case 0:
break;
}
return trackType;
}

ControllerType TrackTypeToControllerType(TrackType trackType) {
switch (trackType) {
case 0:
case 0:
return kControllerDrum;
case 1:
case 2:
case 1:
case 2:
return kControllerGuitar;
case 3:
case 3:
return kControllerVocals;
case 4:
case 5:
case 4:
case 5:
return kControllerNone;
case 6:
case 8:
case 6:
case 8:
return (ControllerType)4;
default:
default:
return (ControllerType)5;
}
}
5 changes: 3 additions & 2 deletions src/band3/meta_band/Campaign.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
#define METABAND_CAMPAIGN_H

#include "obj/Data.h"
#include "os/User.h"

class Campaign {
public:
LocalUser* GetUser() const;
Symbol GetLaunchUser() const;
};

static Campaign* TheCampaign;
extern Campaign* TheCampaign;

#endif // METABAND_CAMPAIGN_H
#endif // METABAND_CAMPAIGN_H
4 changes: 4 additions & 0 deletions src/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include "compiler_macros.h"

// Useful macros

#define STR_(x) #x
#define STR(x) STR_(x)

#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MINEQ(x, y) ((x) <= (y) ? (x) : (y))
Expand Down
1 change: 0 additions & 1 deletion src/sdk/RVL_SDK/revolution/OS.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ extern "C" {
#include "revolution/os/OSLink.h"
#include "revolution/os/OSMemory.h"
#include "revolution/os/OSMessage.h"
#include "revolution/os/OSMutex.h"
#include "revolution/os/OSNet.h"
#include "revolution/os/OSPlayRecord.h"
#include "revolution/os/OSPlayTime.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,55 @@
#ifndef CONTEXT_BTE_H
#define CONTEXT_BTE_H

// TODO: Remove this file when bte is properly implemented

#include <stdint.h>

/* Contains the context of the BTE library that the WPAD library needs to
* compile.
*
* This is not the full context; the other half of the context is in
* "context_rvl.h".
*
* Most of this code is copyright (C) 2003-2012 Broadcom Corporation under the
* Apache 2.0 License; however, some of the code is modified. Comments will be
* marked with my name to show where and what I modified.
* Apache 2.0 License <http://www.apache.org/licenses/LICENSE-2.0>. The original
* source can be found at
* <https://android.googlesource.com/platform/external/bluetooth/bluedroid>;
* specifically, I used the earliest commit available (late 2012, commit hash
* 5738f83aeb59361a0a2eda2460113f6dc9194271).
*/

/* License redistribution conditions
*
* a. You may obtain a copy of the License at
* <http://www.apache.org/licenses/LICENSE-2.0>.
* b. Some of the code is modified. Comments will be marked with my name
* (muff1n) to show what I modified and where.
* c. See the following comment block, which is copied verbatim from bluedroid
* source.
* d. No NOTICE file is present in the commit that I used.
*/

/******************************************************************************
*
* Copyright (C) 2003-2012 Broadcom Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/

// from bluedroid source

typedef uint8_t UINT8;
typedef uint16_t UINT16;
typedef uint32_t UINT32;
typedef uint8_t byte_t;

typedef int8_t INT8;

Expand Down
59 changes: 32 additions & 27 deletions src/sdk/RVL_SDK/revolution/nand/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,47 @@ extern "C" {
// Forward declarations
typedef struct NANDCommandBlock;

typedef enum {
NAND_RESULT_FATAL_ERROR = -128,
NAND_RESULT_UNKNOWN = -64,

NAND_RESULT_MAXDEPTH = -16,
NAND_RESULT_AUTHENTICATION,
NAND_RESULT_OPENFD,
NAND_RESULT_NOTEMPTY,
NAND_RESULT_NOEXISTS,
NAND_RESULT_MAXFILES,
NAND_RESULT_MAXFD,
NAND_RESULT_MAXBLOCKS,
NAND_RESULT_INVALID,

NAND_RESULT_EXISTS = -6,
NAND_RESULT_ECC_CRIT,
NAND_RESULT_CORRUPT,
NAND_RESULT_BUSY,
NAND_RESULT_ALLOC_FAILED,
NAND_RESULT_ACCESS,

NAND_RESULT_OK,
} NANDResult;
typedef s32 NANDResult;
enum NANDResult_et {
NAND_RESULT_OK = 0,

NAND_RESULT_FATAL_ERROR = -128,
NAND_RESULT_UNKNOWN = -64,

NAND_RESULT_ACCESS = -1,
NAND_RESULT_ALLOC_FAILED = -2,
NAND_RESULT_BUSY = -3,
NAND_RESULT_CORRUPT = -4,
NAND_RESULT_ECC_CRIT = -5,
NAND_RESULT_EXISTS = -6,

NAND_RESULT_INVALID = -8,
NAND_RESULT_MAXBLOCKS = -9,
NAND_RESULT_MAXFD = -10,
NAND_RESULT_MAXFILES = -11,
NAND_RESULT_NOEXISTS = -12,
NAND_RESULT_NOTEMPTY = -13,
NAND_RESULT_OPENFD = -14,
NAND_RESULT_AUTHENTICATION = -15,
NAND_RESULT_MAXDEPTH = -16,

#define NAND_ESUCCESS NAND_RESULT_OK
#define NAND_EFATAL NAND_RESULT_FATAL_ERROR
};

typedef enum {
NAND_SEEK_BEG,
NAND_SEEK_SET,
NAND_SEEK_CUR,
NAND_SEEK_END,
NAND_SEEK_END
} NANDSeekMode;

typedef enum {
typedef u8 NANDAccessType;
enum NANDAccessType_et {
NAND_ACCESS_NONE,
NAND_ACCESS_READ,
NAND_ACCESS_WRITE,
NAND_ACCESS_RW
} NANDAccessType;
};

typedef enum {
NAND_FILE_TYPE_NONE,
Expand Down
27 changes: 15 additions & 12 deletions src/sdk/RVL_SDK/revolution/os/OS.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
extern "C" {
#endif

typedef enum {
typedef u32 OSConsoleType;
enum OSConsoleType_et {
OS_CONSOLE_MASK = 0xF0000000,
OS_CONSOLE_MASK_RVL = 0x00000000,
OS_CONSOLE_MASK_EMU = 0x10000000,
Expand All @@ -24,15 +25,17 @@ typedef enum {
OS_CONSOLE_NDEV_1_2 = 0x10000012,
OS_CONSOLE_NDEV_2_0 = 0x10000020,
OS_CONSOLE_NDEV_2_1 = 0x10000021,
} OSConsoleType;
};

typedef enum {
typedef u8 OSAppType;
enum OSAppType_et {
OS_APP_TYPE_IPL = 0x40,
OS_APP_TYPE_DVD = 0x80,
OS_APP_TYPE_CHANNEL = 0x81,
} OSAppType;
};

typedef enum {
typedef u8 OSExceptionType;
enum OSExceptionType_et {
OS_EXC_SYSTEM_RESET,
OS_EXC_MACHINE_CHECK,
OS_EXC_DSI,
Expand All @@ -50,7 +53,7 @@ typedef enum {
OS_EXC_THERMAL_INT,

OS_EXC_MAX
} OSExceptionType;
};

typedef struct OSIOSRev {
u8 idHi; // at 0x0
Expand All @@ -62,7 +65,7 @@ typedef struct OSIOSRev {
u16 buildYear; // at 0x6
} OSIOSRev;

typedef void (*OSExceptionHandler)(u8 type, OSContext* ctx);
typedef void (*OSExceptionHandler)(OSExceptionType type, OSContext* ctx);

extern BOOL __OSInIPL;
extern BOOL __OSInNandBoot;
Expand All @@ -73,16 +76,16 @@ extern OSExecParams __OSRebootParams;
void __OSFPRInit(void);
u32 __OSGetHollywoodRev(void);
void __OSGetIOSRev(OSIOSRev* rev);
u32 OSGetConsoleType(void);
OSConsoleType OSGetConsoleType(void);
void OSInit(void);
OSExceptionHandler __OSSetExceptionHandler(u8 type, OSExceptionHandler handler);
OSExceptionHandler __OSGetExceptionHandler(u8 type);
void OSDefaultExceptionHandler(u8 type, OSContext* ctx);
OSExceptionHandler __OSSetExceptionHandler(OSExceptionType type, OSExceptionHandler handler);
OSExceptionHandler __OSGetExceptionHandler(OSExceptionType type);
void OSDefaultExceptionHandler(OSExceptionType type, OSContext* ctx);
void __OSPSInit(void);
u32 __OSGetDIConfig(void);
void OSRegisterVersion(const char* ver);
const char* OSGetAppGamename(void);
u8 OSGetAppType(void);
OSAppType OSGetAppType(void);

#ifdef __cplusplus
}
Expand Down
25 changes: 14 additions & 11 deletions src/sdk/RVL_SDK/revolution/os/OSAddress.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
#ifndef RVL_SDK_OS_ADDRESS_H
#define RVL_SDK_OS_ADDRESS_H

#include "types.h"

#ifdef __cplusplus
extern "C" {
#endif

static inline void* OSPhysicalToCached(u32 ofs) {
return (void*)(ofs + 0x80000000);
}

static inline void* OSPhysicalToUncached(u32 ofs) {
return (void*)(ofs + 0xC0000000);
}

static inline void* OSCachedToPhysical(const void* ofs) {
return (char*)ofs - 0x80000000;
}
#if defined(NDEBUG)
# define OSPhysicalToCached(addr) (void *)((u32)(addr) + 0x80000000)
# define OSPhysicalToUncached(addr) (void *)((u32)(addr) + 0xC0000000)
# define OSCachedToPhysical(addr) (void *)((u32)(addr) - 0x80000000)
# define OSUncachedToPhysical(addr) (void *)((u32)(addr) - 0xC0000000)
#else
void *(OSPhysicalToCached)(void *addr);
void *(OSPhysicalToUncached)(void *addr);
void *(OSCachedToPhysical)(void *addr);
void *(OSUncachedToPhysical)(void *addr);
#endif

#ifdef __cplusplus
}
#endif

#endif
33 changes: 0 additions & 33 deletions src/sdk/RVL_SDK/revolution/os/OSMutex.h

This file was deleted.

Loading

0 comments on commit 6d6b28e

Please sign in to comment.