mirror of
https://github.com/pret/pokediamond.git
synced 2026-04-25 15:42:51 -05:00
Add *.nds to gitignore, start working on Nitro OS functions
This commit is contained in:
parent
01801ea04f
commit
ce65297980
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,2 +1,6 @@
|
|||
# CLion folders
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
cmake-build-debug/
|
||||
|
||||
# ROM
|
||||
*.nds
|
||||
|
|
|
|||
|
|
@ -3,4 +3,8 @@ project(PokeDiamond)
|
|||
|
||||
# TODO: Add commands
|
||||
|
||||
add_executable(PokeDiamond main.c)
|
||||
enable_language(ASM)
|
||||
|
||||
file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "*.c")
|
||||
|
||||
add_executable(PokeDiamond ${SOURCES})
|
||||
3
main.c
3
main.c
|
|
@ -1,6 +1,7 @@
|
|||
// Just includes for now so CLion sees the files
|
||||
#include "structs/structs.h"
|
||||
#include "nitro/nitro.h"
|
||||
|
||||
void main() {
|
||||
int x = NULL
|
||||
int x = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,16 @@
|
|||
#ifndef POKEDIAMOND_NITRO_H
|
||||
#define POKEDIAMOND_NITRO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Include all nitro files
|
||||
#include "types.h"
|
||||
#include "os.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //POKEDIAMOND_NITRO_H
|
||||
|
|
|
|||
9
nitro/os.c
Normal file
9
nitro/os.c
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//
|
||||
// Created by mart on 4/12/20.
|
||||
//
|
||||
|
||||
#include "os.h"
|
||||
|
||||
asm void OS_GetProcMode() {
|
||||
|
||||
}
|
||||
10
nitro/os.h
Normal file
10
nitro/os.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// Created by mart on 4/12/20.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_H
|
||||
#define POKEDIAMOND_OS_H
|
||||
|
||||
#include "os_asm.h"
|
||||
|
||||
#endif //POKEDIAMOND_OS_H
|
||||
12
nitro/os_asm.h
Normal file
12
nitro/os_asm.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//
|
||||
// Created by mart on 4/12/20.
|
||||
//
|
||||
|
||||
#ifndef POKEDIAMOND_OS_ASM_H
|
||||
#define POKEDIAMOND_OS_ASM_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
OSProcMode OS_GetProcMode();
|
||||
|
||||
#endif //POKEDIAMOND_OS_ASM_H
|
||||
7
nitro/os_asm.s
Normal file
7
nitro/os_asm.s
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
# TODO: make this syntax look correct in CLion
|
||||
# Potentially switch to AT&T syntax?
|
||||
OS_GetProcMode:
|
||||
mrs r0, cpsr
|
||||
and r0, r0, #0x80
|
||||
bx lr
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
#ifndef POKEDIAMOND_NITRO_TYPES_H
|
||||
#define POKEDIAMOND_NITRO_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short int u16;
|
||||
typedef unsigned long u32;
|
||||
|
|
@ -41,8 +37,14 @@ typedef int BOOL;
|
|||
#endif // __cplusplus
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
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;
|
||||
|
||||
#endif //POKEDIAMOND_NITRO_TYPES_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user