mirror of
https://github.com/pret/pokediamond.git
synced 2026-09-30 20:36:48 -05:00
match OS_timer
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "global.inc"
|
||||
|
||||
.section .bss
|
||||
|
||||
.global _0380791C
|
||||
_0380791C: ;0x0380791C
|
||||
.space 0x03807920 - 0x0380791C
|
||||
|
||||
.section .text
|
||||
|
||||
arm_func_start OSi_SetTimerReserved
|
||||
OSi_SetTimerReserved: ; 0x037FA348
|
||||
ldr r1, _037FA360 ; =_0380791C
|
||||
ldrh r3, [r1]
|
||||
mov r2, #1
|
||||
orr r0, r3, r2, lsl r0
|
||||
strh r0, [r1]
|
||||
bx lr
|
||||
_037FA360: .word _0380791C
|
||||
@@ -2,6 +2,7 @@
|
||||
#define POKEDIAMOND_ARM7_OS_INIT_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
#include "consts.h"
|
||||
#include "OS_system.h"
|
||||
#include "OS_arena.h"
|
||||
#include "OS_alloc.h"
|
||||
@@ -10,6 +11,8 @@
|
||||
#include "OS_spinLock.h"
|
||||
#include "OS_context.h"
|
||||
#include "OS_interrupt.h"
|
||||
#include "OS_timer.h"
|
||||
#include "OS_tick.h"
|
||||
|
||||
void OS_Init(void);
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef POKEDIAMOND_OS_TIMER_H
|
||||
#define POKEDIAMOND_OS_TIMER_H
|
||||
#ifndef POKEDIAMOND_ARM7_OS_TIMER_H
|
||||
#define POKEDIAMOND_ARM7_OS_TIMER_H
|
||||
|
||||
#include "nitro/OS_timer_shared.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
#endif
|
||||
void OSi_SetTimerReserved(s32 timerNum);
|
||||
|
||||
#endif //POKEDIAMOND_ARM7_OS_TIMER_H
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
#include "OS_init.h"
|
||||
|
||||
extern void PXI_Init(void);
|
||||
extern void OS_InitTick(void);
|
||||
extern void OS_InitAlarm(void);
|
||||
extern void OS_InitThread(void);
|
||||
extern void OS_InitAlarm(void);
|
||||
extern void CTRDG_Init(void);
|
||||
|
||||
ARM_FUNC void OS_Init(void)
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "OS_timer.h"
|
||||
#include "function_target.h"
|
||||
|
||||
extern void OSi_SetTimerReserved(u32);
|
||||
|
||||
static u16 OSi_UseTick;
|
||||
static OSTick OSi_TickCounter;
|
||||
static BOOL OSi_NeedResetTimer;
|
||||
|
||||
9
arm7/lib/src/OS_timer.c
Normal file
9
arm7/lib/src/OS_timer.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "OS_timer.h"
|
||||
#include "function_target.h"
|
||||
|
||||
static u16 OSi_TimerReserved = 0;
|
||||
|
||||
ARM_FUNC void OSi_SetTimerReserved(s32 timerNum)
|
||||
{
|
||||
OSi_TimerReserved |= (1 << timerNum);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "global.inc"
|
||||
|
||||
.section .bss
|
||||
|
||||
.global OSi_TimerReserved
|
||||
OSi_TimerReserved: ; 0x021D37A8
|
||||
.space 0x4
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start OSi_SetTimerReserved
|
||||
OSi_SetTimerReserved: ; 0x020CCBF0
|
||||
ldr r1, _020CCC08 ; =OSi_TimerReserved
|
||||
mov r2, #0x1
|
||||
ldrh r3, [r1, #0x0]
|
||||
orr r0, r3, r2, lsl r0
|
||||
strh r0, [r1, #0x0]
|
||||
bx lr
|
||||
.balign 4
|
||||
_020CCC08: .word OSi_TimerReserved
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "OS_tcm.h"
|
||||
#include "OS_spinLock.h"
|
||||
#include "OS_context.h"
|
||||
#include "OS_timer.h"
|
||||
#include "OS_tick.h"
|
||||
#include "OS_alarm.h"
|
||||
#include "OS_mutex.h"
|
||||
@@ -22,8 +23,6 @@
|
||||
#include "OS_irqTable.h"
|
||||
#include "OS_interrupt.h"
|
||||
#include "OS_reset.h"
|
||||
#include "OS_spinLock.h"
|
||||
#include "OS_tick.h"
|
||||
|
||||
void OS_Init(void);
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef POKEDIAMOND_OS_TIMER_H
|
||||
#define POKEDIAMOND_OS_TIMER_H
|
||||
#ifndef POKEDIAMOND_ARM9_OS_TIMER_H
|
||||
#define POKEDIAMOND_ARM9_OS_TIMER_H
|
||||
|
||||
#include "nitro/OS_timer_shared.h"
|
||||
#include "nitro/types.h"
|
||||
|
||||
#endif //POKEDIAMOND_OS_TIMER_H
|
||||
void OSi_SetTimerReserved(s32 timerNum);
|
||||
|
||||
#endif //POKEDIAMOND_ARM9_OS_TIMER_H
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Created by mart on 4/12/20.
|
||||
//
|
||||
|
||||
#include "function_target.h"
|
||||
#include "OS_init.h"
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ static u16 OSi_UseTick = FALSE;
|
||||
vu64 OSi_TickCounter;
|
||||
BOOL OSi_NeedResetTimer = FALSE;
|
||||
|
||||
extern void OSi_SetTimerReserved(u32 param1);
|
||||
|
||||
ARM_FUNC void OS_InitTick(void)
|
||||
{
|
||||
if (OSi_UseTick)
|
||||
|
||||
9
arm9/lib/src/OS_timer.c
Normal file
9
arm9/lib/src/OS_timer.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "OS_timer.h"
|
||||
#include "function_target.h"
|
||||
|
||||
static u16 OSi_TimerReserved = 0;
|
||||
|
||||
ARM_FUNC void OSi_SetTimerReserved(s32 timerNum)
|
||||
{
|
||||
OSi_TimerReserved |= (1 << timerNum);
|
||||
}
|
||||
Reference in New Issue
Block a user