summaryrefslogtreecommitdiff
path: root/src/code_800B5F0.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-01-04 13:40:33 -0600
committerGitHub <noreply@github.com>2021-01-04 13:40:33 -0600
commit469212f7ee42d04e3160d357ed1f088f12edd391 (patch)
treeea53fd58f6dc9a42e38c3a7a78d6b7baa760a520 /src/code_800B5F0.c
parent87cd9885a9f8b38a76ab6add4a634e2a8a4837ee (diff)
CPU and GPU Reg Funcs Decomp (#16)
* decomp/doc cpu funcs and gpu reg funcs * use Cpu32 macro funcs * address review comments * decomp SetBGOBJEnableFlags
Diffstat (limited to 'src/code_800B5F0.c')
-rw-r--r--src/code_800B5F0.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/code_800B5F0.c b/src/code_800B5F0.c
deleted file mode 100644
index 35b5282..0000000
--- a/src/code_800B5F0.c
+++ /dev/null
@@ -1,99 +0,0 @@
-#include "global.h"
-
-extern bool8 gInterruptsEnabled;
-extern u32 gIntrTable[];
-extern u32 IntrMain;
-extern u8 gUnknown_202D4B8;
-extern u32 gUnknown_202D5F0[];
-
-bool8 EnableInterrupts(void)
-{
- if(gInterruptsEnabled == FALSE)
- {
- return FALSE;
- }
-
- if((REG_IME & 1) != 0)
- {
- return FALSE;
- }
- else
- {
- REG_IME = 1;
- return TRUE;
- }
-}
-
-bool8 DisableInterrupts(void)
-{
- if(gInterruptsEnabled == 0)
- {
- return FALSE;
- }
-
- if((REG_IME & 1) == 0)
- {
- return FALSE;
- }
- else
- {
- REG_IME = 0;
- return TRUE;
- }
-
-}
-
-bool8 sub_800B650(void)
-{
- if(gInterruptsEnabled == FALSE)
- {
- return FALSE;
- }
-
- if((REG_IME & 1) != 0)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-void SetInterruptFlag(u16 flag)
-{
- if(gInterruptsEnabled == FALSE)
- {
- return;
- }
-
- REG_IME = 0;
- INTR_CHECK |= flag;
- REG_IME = 1;
-}
-
-void sub_800B6B0(const u32 *r0)
-{
- CpuCopy32(r0, &gIntrTable, 0x18); // 0x18 = 0x6 * 4 (0x4f00 is 32 bits)
- CpuCopy32(&IntrMain, &gUnknown_202D4B8, 0x120); // 0x120 = 0x48 * 4 (0x4f00 is 32 bits)
- INTR_VECTOR = &gUnknown_202D4B8;
-}
-
-u32 *sub_800B6E8(u32 r0)
-{
- return &gIntrTable[r0];
-}
-
-u32 sub_800B6F4(u32 r0, u32 r1)
-{
- u32 temp;
- u32 interrupt_var;
-
- interrupt_var = DisableInterrupts();
- temp = gUnknown_202D5F0[r0];
- gUnknown_202D5F0[r0] = r1;
- if(interrupt_var != FALSE){
- EnableInterrupts();
- }
- return temp;
-}