mirror of
https://github.com/pret/pokediamond.git
synced 2026-09-30 04:17:11 -05:00
3
.gitignore
vendored
3
.gitignore
vendored
@@ -40,3 +40,6 @@ arm9/modules/module_*.cfg
|
||||
# Dism scripts
|
||||
dism.sh
|
||||
asmdiff.sh
|
||||
|
||||
# Symbols CSV
|
||||
symbols.csv
|
||||
|
||||
2
Makefile
2
Makefile
@@ -183,7 +183,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
ASFLAGS = -proc arm5te
|
||||
CFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -ir include -ir include-mw -ir arm9/lib/include -W all
|
||||
CFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/include -W all
|
||||
LDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
||||
@@ -89,7 +89,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm7_thumb.s -o arm7.o
|
||||
ASFLAGS = -proc arm4t -i ..
|
||||
CFLAGS = -O4,p -proc arm7tdmi -fp soft -lang c99 -Cpp_exceptions off -ir ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all
|
||||
CFLAGS = -O4,p -proc arm7tdmi -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all
|
||||
LDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef POKEDIAMOND_ARM7_OS_INIT_H
|
||||
#define POKEDIAMOND_ARM7_OS_INIT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "OS_system.h"
|
||||
|
||||
void OS_Init(void);
|
||||
|
||||
@@ -1,36 +1,15 @@
|
||||
#ifndef POKEDIAMOND_ARM7_OS_SYSTEM_H
|
||||
#define POKEDIAMOND_ARM7_OS_SYSTEM_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
//todo consts.h
|
||||
#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode
|
||||
|
||||
#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ
|
||||
#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ
|
||||
#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ
|
||||
|
||||
typedef enum {
|
||||
OS_PROCMODE_USER=16,
|
||||
OS_PROCMODE_FIQ=17,
|
||||
OS_PROCMODE_IRQ=18,
|
||||
OS_PROCMODE_SVC=19,
|
||||
OS_PROCMODE_ABORT=23,
|
||||
OS_PROCMODE_UNDEF=27,
|
||||
OS_PROCMODE_SYS=31
|
||||
} OSProcMode;
|
||||
|
||||
typedef enum {
|
||||
OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ,
|
||||
OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ,
|
||||
OS_INTRMODE_ENABLE = 0
|
||||
} OSIntrMode;
|
||||
#include "nitro/types.h"
|
||||
#include "consts.h"
|
||||
#include "nitro/OS_system_shared.h"
|
||||
|
||||
OSIntrMode OS_EnableInterrupts(void);
|
||||
OSIntrMode OS_DisableInterrupts(void);
|
||||
OSIntrMode OS_RestoreInterrupts(register OSIntrMode state);
|
||||
OSIntrMode OS_RestoreInterrupts(OSIntrMode state);
|
||||
OSIntrMode OS_DisableInterrupts_IrqAndFiq(void);
|
||||
OSIntrMode OS_RestoreInterrupts_IrqAndFiq(register OSIntrMode state);
|
||||
OSIntrMode OS_RestoreInterrupts_IrqAndFiq(OSIntrMode state);
|
||||
OSProcMode OS_GetProcMode(void);
|
||||
void OS_SpinWait(u32 cycle);
|
||||
|
||||
|
||||
6
arm7/lib/include/consts.h
Normal file
6
arm7/lib/include/consts.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef POKEDIAMOND_ARM7_CONSTS_H
|
||||
#define POKEDIAMOND_ARM7_CONSTS_H
|
||||
|
||||
#include "nitro/consts_shared.h"
|
||||
|
||||
#endif //POKEDIAMOND_ARM7_CONSTS_H
|
||||
@@ -184,8 +184,8 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
ASFLAGS = -proc arm5te -i ..
|
||||
CFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -ir ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
|
||||
CXXFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -ir ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
|
||||
CFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
|
||||
CXXFLAGS = -O4,p -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
|
||||
LDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NITRO_CARD_BACKUP_H_
|
||||
#define NITRO_CARD_BACKUP_H_
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
BOOL CARD_TryWaitBackupAsync(void);
|
||||
|
||||
#endif //NITRO_CARD_BACKUP_H_
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NITRO_CARD_PULLOUT_H_
|
||||
#define NITRO_CARD_PULLOUT_H_
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
BOOL CARD_IsPulledOut(void);
|
||||
|
||||
#endif //NITRO_CARD_PULLOUT_H_
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef NITRO_CARD_ROM_H_
|
||||
#define NITRO_CARD_ROM_H_
|
||||
|
||||
#include "nitro/types.h"
|
||||
#include "MI_exMemory.h"
|
||||
#include "MI_dma.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef POKEDIAMOND_CP_CONTEXT_H
|
||||
#define POKEDIAMOND_CP_CONTEXT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef struct CPContext {
|
||||
u64 div_numer;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NITRO_CTRDG_COMMON_H_
|
||||
#define NITRO_CTRDG_COMMON_H_
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
BOOL CTRDG_IsPulledOut(void);
|
||||
|
||||
#endif //NITRO_CTRDG_COMMON_H_
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NITRO_DGT_DGT_H_
|
||||
#define NITRO_DGT_DGT_H_
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
void DGT_Hash2CalcHmac(void* digest, void* bin_ptr, u32 bin_len, void* key_ptr, u32 keylen);
|
||||
|
||||
#endif //NITRO_DGT_DGT_H_
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef POKEDIAMOND_FS_COMMAND_DEFAULT_H
|
||||
#define POKEDIAMOND_FS_COMMAND_DEFAULT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "FS_archive.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "FS_archive.h"
|
||||
#include "FS_file.h"
|
||||
#include "CARD_rom.h"
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
extern FSArchive fsi_arc_rom;
|
||||
extern s32 fsi_card_lock_id;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_MATH_CRC_H
|
||||
#define GUARD_MATH_CRC_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef u8 MATHCRC8Context;
|
||||
typedef u16 MATHCRC16Context;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define GUARD_MATH_DGT_H
|
||||
|
||||
#include "dgt.h"
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef struct DGTHash1Context MATHMD5Context;
|
||||
typedef struct DGTHash2Context MATHSHA1Context;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_MATH_POP_H
|
||||
#define GUARD_MATH_POP_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
u8 MATH_CountPopulation(u32);
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-06.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_MB_MB_H
|
||||
#define POKEDIAMOND_MB_MB_H
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-17.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_ALARM_H
|
||||
#define POKEDIAMOND_OS_ALARM_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "OS_thread.h"
|
||||
|
||||
typedef void (*OSAlarmHandler) (void *);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by mart on 4/23/20.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_ALLOC_H
|
||||
#define POKEDIAMOND_OS_ALLOC_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "OS_arena.h"
|
||||
|
||||
typedef int OSHeapHandle;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-04-27.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_ARENA_H
|
||||
#define POKEDIAMOND_OS_ARENA_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef enum {
|
||||
OS_ARENA_MAIN = 0,
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-17.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_CONTEXT_H
|
||||
#define POKEDIAMOND_OS_CONTEXT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "CP_context.h"
|
||||
|
||||
typedef struct OSContext
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef POKEDIAMOND_ARM9_OS_INIT_H
|
||||
#define POKEDIAMOND_ARM9_OS_INIT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "consts.h"
|
||||
#include "OS_tcm.h"
|
||||
#include "OS_spinLock.h"
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-07.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_INTERRUPT_H
|
||||
#define POKEDIAMOND_OS_INTERRUPT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef void (*OSIrqFunction) (void);
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-17.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_MUTEX_H
|
||||
#define POKEDIAMOND_OS_MUTEX_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "OS_thread.h"
|
||||
|
||||
struct OSMutex {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#define OS_TPanic(...) OS_Terminate()
|
||||
#define OS_TWarning(...) ((void)0)
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
s32 OS_SPrintf(s8 *buffer, const s8 *format, ...);
|
||||
s32 OS_VSPrintf(s8 *buffer, const s8 *format, void *args);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-04-24.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_PROTECTIONREGION_H
|
||||
#define POKEDIAMOND_OS_PROTECTIONREGION_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "consts.h"
|
||||
|
||||
void OS_SetDPermissionsForProtectionRegion(register u32 setMask, register u32 flags);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-03.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_SPINLOCK_H
|
||||
#define POKEDIAMOND_OS_SPINLOCK_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "syscall.h"
|
||||
|
||||
typedef volatile struct OSLockWord {
|
||||
|
||||
@@ -3,24 +3,7 @@
|
||||
|
||||
#include "function_target.h"
|
||||
#include "consts.h"
|
||||
|
||||
typedef enum {
|
||||
OS_PROCMODE_USER=16,
|
||||
OS_PROCMODE_FIQ=17,
|
||||
OS_PROCMODE_IRQ=18,
|
||||
OS_PROCMODE_SVC=19,
|
||||
OS_PROCMODE_ABORT=23,
|
||||
OS_PROCMODE_UNDEF=27,
|
||||
OS_PROCMODE_SYS=31
|
||||
} OSProcMode;
|
||||
|
||||
ENUMS_ALWAYS_INT_ON
|
||||
typedef enum {
|
||||
OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ,
|
||||
OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ,
|
||||
OS_INTRMODE_ENABLE = 0
|
||||
} OSIntrMode;
|
||||
ENUMS_ALWAYS_INT_RESET
|
||||
#include "nitro/OS_system_shared.h"
|
||||
|
||||
OSIntrMode OS_EnableInterrupts(void);
|
||||
OSIntrMode OS_DisableInterrupts(void);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef POKEDIAMOND_OS_TERMINATE_PROC_H
|
||||
#define POKEDIAMOND_OS_TERMINATE_PROC_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
void OS_Terminate(void);
|
||||
void OS_Halt(void);
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-03.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_THREAD_H
|
||||
#define POKEDIAMOND_OS_THREAD_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "OS_context.h"
|
||||
|
||||
typedef struct OSiAlarm OSAlarm;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-17.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_TICK_H
|
||||
#define POKEDIAMOND_OS_TICK_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef u64 OSTick;
|
||||
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
//
|
||||
// Created by mart on 4/15/20.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_CONSTS_H
|
||||
#define POKEDIAMOND_CONSTS_H
|
||||
#ifndef POKEDIAMOND_ARM9_CONSTS_H
|
||||
#define POKEDIAMOND_ARM9_CONSTS_H
|
||||
|
||||
#include "nitro/consts_shared.h"
|
||||
#include "mmap.h"
|
||||
#include "registers.h"
|
||||
|
||||
#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode
|
||||
|
||||
#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ
|
||||
#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ
|
||||
#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ
|
||||
|
||||
#define HW_C6_PR_4KB 0x16
|
||||
#define HW_C6_PR_8KB 0x18
|
||||
#define HW_C6_PR_16KB 0x1a
|
||||
@@ -53,4 +44,4 @@
|
||||
|
||||
#define OS_IE_V_BLANK (1UL << 0)
|
||||
|
||||
#endif //POKEDIAMOND_CONSTS_H
|
||||
#endif //POKEDIAMOND_ARM9_CONSTS_H
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef POKEDIAMOND_CUSTOM_ALLOCATOR_H
|
||||
#define POKEDIAMOND_CUSTOM_ALLOCATOR_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef void * (* AllocFunc)(u32 size);
|
||||
typedef void (* FreeFunc)(void * ptr);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_DGT_H
|
||||
#define GUARD_DGT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
struct DGTHash1Context {
|
||||
union {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "fx.h"
|
||||
#include "MI_memory.h"
|
||||
#include "MI_dma.h"
|
||||
|
||||
//temporary while other files aren't decompiled
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef NITRO_MMAP_H
|
||||
#define NITRO_MMAP_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
extern u32 SDK_AUTOLOAD_DTCM_START[];
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ extern "C" {
|
||||
// Include all nitro files
|
||||
#include "sections.h"
|
||||
#include "misc.h"
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
#include "consts.h"
|
||||
#include "OS_init.h"
|
||||
#include "mmap.h"
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-06.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_REGISTERS_H
|
||||
#define POKEDIAMOND_REGISTERS_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
#define reg_GX_DISPCNT (*(REGType32v *)0x4000000)
|
||||
#define reg_GX_DISPSTAT (*(REGType16v *)0x4000004)
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
#ifndef POKEDIAMOND_ARM9_TYPES_H
|
||||
#define POKEDIAMOND_ARM9_TYPES_H
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short int u16;
|
||||
typedef unsigned long u32;
|
||||
|
||||
typedef signed char s8;
|
||||
typedef signed short int s16;
|
||||
typedef signed long s32;
|
||||
|
||||
typedef unsigned long long int u64;
|
||||
typedef signed long long int s64;
|
||||
|
||||
typedef volatile u8 vu8;
|
||||
typedef volatile u16 vu16;
|
||||
typedef volatile u32 vu32;
|
||||
typedef volatile u64 vu64;
|
||||
|
||||
typedef volatile s8 vs8;
|
||||
typedef volatile s16 vs16;
|
||||
typedef volatile s32 vs32;
|
||||
typedef volatile s64 vs64;
|
||||
|
||||
typedef float f32;
|
||||
typedef volatile f32 vf32;
|
||||
|
||||
typedef u8 REGType8;
|
||||
typedef u16 REGType16;
|
||||
typedef u32 REGType32;
|
||||
typedef u64 REGType64;
|
||||
|
||||
typedef vu8 REGType8v;
|
||||
typedef vu16 REGType16v;
|
||||
typedef vu32 REGType32v;
|
||||
typedef vu64 REGType64v;
|
||||
|
||||
typedef int BOOL;
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else // __cplusplus
|
||||
#define NULL ((void *)0)
|
||||
#endif // __cplusplus
|
||||
#endif
|
||||
|
||||
#endif //POKEDIAMOND_ARM9_TYPES_H
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "fx.h"
|
||||
|
||||
ARM_FUNC void FX_Init(){
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "fx.h"
|
||||
|
||||
const fx16 FX_AtanTable_[] = {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "fx.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "fx.h"
|
||||
|
||||
ARM_FUNC void VEC_Add(struct Vecx32 *a, struct Vecx32 *b, struct Vecx32 *dst){
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
u32 GXi_DmaId = 3;
|
||||
vu16 GXi_VRamLockId = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
//looks like asm and says asm on the tin...
|
||||
ARM_FUNC asm void GX_SendFifo48B(void *src, void *dst){
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
ARM_FUNC void *G2_GetBG0ScrPtr(){
|
||||
u32 temp = (u32)(((reg_G2_BG0CNT & 0x1F00) >> 0x8) << 0xB);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
ARM_FUNC void G2x_SetBGyAffine_(u32 *ptr, struct Mtx22 *mtx, fx32 a, fx32 b, fx32 c, fx32 d){
|
||||
fx32 temp0, temp1, temp2, temp3;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
|
||||
ARM_FUNC void G3_BeginMakeDL(struct GXDLInfo *displaylist, void *r1, u32 r2){
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
|
||||
ARM_FUNC void G3i_PerspectiveW_(fx32 fovsin, fx32 fovcos, fx32 ratio, fx32 near, fx32 far, fx32 scale, u32 load, struct Mtx44 *mtx){
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
|
||||
ARM_FUNC void G3BS_LoadMtx44(struct GXDLInfo *displaylist, struct Mtx44 *mtx){
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
void MI_Copy36B(void *src, void *dst);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
extern u32 GXi_DmaId;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
extern u32 GXi_DmaId;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
extern u32 GXi_DmaId;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
struct GX_State gGXState;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "GX.h"
|
||||
#include "gx.h"
|
||||
|
||||
extern u16 GXi_VRamLockId;
|
||||
extern struct GX_State gGXState;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
//
|
||||
// Created by red031000 on 2020-05-07.
|
||||
//
|
||||
|
||||
#include "types.h"
|
||||
#include "OS_terminate_proc.h"
|
||||
#include "function_target.h"
|
||||
#include "OS_system.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef POKEDIAMOND_FILESYSTEM_H
|
||||
#define POKEDIAMOND_FILESYSTEM_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
typedef struct NARC
|
||||
{
|
||||
FSFile file;
|
||||
|
||||
34
include/nitro/OS_system_shared.h
Normal file
34
include/nitro/OS_system_shared.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* NOTE:
|
||||
* This file is shared between ARM9 and ARM7
|
||||
* DO NOT PUT PROC SPECIFIC CODE IN HERE
|
||||
* Thank You!
|
||||
*/
|
||||
|
||||
/*
|
||||
* DO NOT INCLUDE THIS FILE DIRECTLY
|
||||
* Include OS_system.h from the specific proc's lib
|
||||
*/
|
||||
|
||||
#ifndef POKEDIAMOND_OS_SYSTEM_SHARED_H
|
||||
#define POKEDIAMOND_OS_SYSTEM_SHARED_H
|
||||
|
||||
#include "nitro/consts_shared.h"
|
||||
|
||||
typedef enum {
|
||||
OS_PROCMODE_USER=16,
|
||||
OS_PROCMODE_FIQ=17,
|
||||
OS_PROCMODE_IRQ=18,
|
||||
OS_PROCMODE_SVC=19,
|
||||
OS_PROCMODE_ABORT=23,
|
||||
OS_PROCMODE_UNDEF=27,
|
||||
OS_PROCMODE_SYS=31
|
||||
} OSProcMode;
|
||||
|
||||
typedef enum {
|
||||
OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ,
|
||||
OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ,
|
||||
OS_INTRMODE_ENABLE = 0
|
||||
} OSIntrMode;
|
||||
|
||||
#endif //POKEDIAMOND_OS_SYSTEM_SHARED_H
|
||||
26
include/nitro/consts_shared.h
Normal file
26
include/nitro/consts_shared.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* NOTE:
|
||||
* This file is shared between ARM9 and ARM7
|
||||
* DO NOT PUT PROC SPECIFIC CODE IN HERE
|
||||
* Thank You!
|
||||
*/
|
||||
|
||||
/*
|
||||
* DO NOT INCLUDE THIS FILE DIRECTLY
|
||||
* Include consts.h from the specific proc's lib
|
||||
*/
|
||||
|
||||
#ifndef POKEDIAMOND_CONSTS_SHARED_H
|
||||
#define POKEDIAMOND_CONSTS_SHARED_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
//Shared Consts
|
||||
|
||||
#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode
|
||||
|
||||
#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ
|
||||
#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ
|
||||
#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ
|
||||
|
||||
#endif //POKEDIAMOND_CONSTS_SHARED_H
|
||||
@@ -1,5 +1,12 @@
|
||||
#ifndef POKEDIAMOND_ARM7_TYPES_H
|
||||
#define POKEDIAMOND_ARM7_TYPES_H
|
||||
/*
|
||||
* NOTE:
|
||||
* This file is shared between ARM9 and ARM7
|
||||
* DO NOT PUT PROC SPECIFIC CODE IN HERE
|
||||
* Thank You!
|
||||
*/
|
||||
|
||||
#ifndef POKEDIAMOND_TYPES_H
|
||||
#define POKEDIAMOND_TYPES_H
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short int u16;
|
||||
@@ -47,4 +54,4 @@ typedef int BOOL;
|
||||
#endif // __cplusplus
|
||||
#endif
|
||||
|
||||
#endif //POKEDIAMOND_NITRO_TYPES_H
|
||||
#endif //POKEDIAMOND_TYPES_H
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef POKEDIAMOND_POKEMON_H
|
||||
#define POKEDIAMOND_POKEMON_H
|
||||
|
||||
#include "types.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
// Enums
|
||||
|
||||
|
||||
Reference in New Issue
Block a user