Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OS* functions #7

Merged
merged 30 commits into from
Apr 30, 2020
Merged

Add OS* functions #7

merged 30 commits into from
Apr 30, 2020

Conversation

Martmists-GH
Copy link
Collaborator

@Martmists-GH Martmists-GH commented Apr 16, 2020

This PR aims to create C definitions of all OS* functions.
All methods defined in C will also have inline ASM copied from the dump, which will be applied if MATCH_ASM is defined.

List of OS* methods found:

  • OS_GetProcMode
  • OS_DisableInterrupts
  • OS_RestoreInterrupts
  • OS_AllocFromArenaLo
  • OS_AllocFromArenaHi
  • OS_SetArenaHi
  • OS_SetArenaLo
  • OS_GetArenaHi
  • OS_GetArenaLo
  • OS_AllocFromHeap
  • OS_CancelAlarm
  • OS_CreateAlarm
  • OS_CreateThread
  • OS_DestroyThread
  • OS_DisableInterrupts_IrqAndFiq
  • OS_DisableIrqMask
  • OS_DisableProtectionUnit
  • OS_DisableScheduler
  • OS_EnableIrqMask
  • OS_EnableProtectionUnit
  • OS_EnableScheduler
  • OS_ExitThread
  • OS_FreeToHeap
  • OS_GetConsoleType
  • OS_GetCpsrIrq
  • OS_GetDTCMAddress
  • OS_GetInitArenaHi
  • OS_GetInitArenaLo
  • OS_GetIrqFunction
  • OS_GetLockID
  • OS_GetLowEntropyData
  • OS_GetMacAddress
  • OS_GetOwnerInfo
  • OS_GetOwnerRtcOffset
  • OS_GetThreadPriority
  • OS_GetTick
  • OS_GetTickLo
  • OS_Halt
  • OS_Init
  • OS_InitAlarm
  • OS_InitArena
  • OS_InitArenaEx
  • OS_InitContext
  • OS_InitException
  • OS_InitIrqTable
  • OS_InitLock
  • OS_InitMessageQueue
  • OS_InitMutex
  • OS_InitReset
  • OS_InitThread
  • OS_InitTick
  • OS_InitVAlarm
  • OS_IrqDummy
  • OS_IsAlarmAvailable
  • OS_IsRunOnEmulator
  • OS_IsThreadTerminated
  • OS_IsTickAvailable
  • OS_JamMessage
  • OS_JoinThread
  • OS_LoadContext
  • OS_LockCartridge
  • OS_LockMutex
  • OS_ReadMessage
  • OS_ReadOwnerOfLockWord
  • OS_ReceiveMessage
  • OS_ReleaseLockID
  • OS_RescheduleThread
  • OS_ResetRequestIrqMask
  • OS_ResetSystem
  • OS_RestoreInterrupts
  • OS_RestoreInterrupts_IrqAndFiq
  • OS_SaveContext
  • OS_SelectThread
  • OS_SendMessage
  • OS_SetAlarm
  • OS_SetDPermissionsForProtectionRegion
  • OS_SetIrqFunction
  • OS_SetIrqMask
  • OS_SetIrqStackChecker
  • OS_SetProtectionRegion1
  • OS_SetProtectionRegion2
  • OS_SetSwitchThreadCallback
  • OS_SetThreadDestructor
  • OS_SetThreadPriority
  • OS_Sleep
  • OS_SleepThread
  • OS_SNPrintf
  • OS_SpinWait
  • OS_SPrintf
  • OS_Terminate
  • OS_TryLockByWord
  • OS_TryLockCard
  • OS_TryLockCartridge
  • OS_TryLockMutex
  • OS_UnlockByWord
  • OS_UnlockCard
  • OS_UnlockCartridge
  • OS_UnlockCartridge
  • OS_UnlockMutex
  • OS_VSNPrintf
  • OS_VSPrintf
  • OS_WaitIrq
  • OS_WaitVBlankIntr
  • OS_WakeupThread
  • OS_WakeupThreadDirect
  • OS_YieldThread
  • OsCountZeroBits
  • OSi_AlarmHandler
  • OSi_AllocateCardBus
  • OSi_AllocateCartridgeBus
  • OSi_ArrangeTimer
  • OSi_CancelThreadAlarmForSleep
  • OSi_CommonCallback
  • OSi_CountUpTick
  • OSi_CpuClear32
  • OSi_DequeueItem
  • OSi_DisplayExContext
  • OSi_DoResetSystem
  • OSi_DoTryLockByWord
  • OSi_EnqueueTail
  • OSi_EnterDmaCallback
  • OSi_EnterTimerCallback
  • OSi_ExceptionHandler
  • OSi_ExitThread_ArgSpecified
  • OSi_ExitThread_Destroy
  • OSi_ExitThread_Destroy
  • OSi_FreeCardBus
  • OSi_FreeCartridgeBus
  • OSi_GetAndDisplayContext
  • OSi_GetUnusedThreadId
  • OSi_IdleThreadProc
  • OSi_InitVramExclusive
  • OSi_InsertAlarm
  • OSi_InsertLinkToQueue
  • OSi_InsertThreadToList
  • OSi_IrqCallback
  • OSi_IrqDma0
  • OSi_IrqDma1
  • OSi_IrqDma2
  • OSi_IrqDma3
  • OSi_IrqTimer0
  • OSi_IrqTimer1
  • OSi_IrqTimer2
  • OSi_IrqTimer3
  • OSi_ReadCardRom32
  • OSi_ReloadRomData
  • OSi_RemoveLinkFromQueue
  • OSi_RemoveMutexLinkFromQueue
  • OSi_RemoveSpecifiedLinkFromQueue
  • OSi_RemoveThreadFromList
  • OSi_RescheduleThread
  • OSi_SendToPxi
  • OSi_SetExContext
  • OSi_SetTimer
  • OSi_SetTimerReserved
  • OSi_SleepAlarmCallback
  • OSi_TryLockVram
  • OSi_UnlockAllMutex
  • OSi_UnlockVram

@Martmists-GH Martmists-GH added help wanted Extra attention is needed do not merge labels Apr 16, 2020
Martmists-GH and others added 27 commits April 22, 2020 13:57
fix match_asm for os_alloc.c
few cleanups to os_alloc.c
asm for OS_GetInitArenaLo
merge master (I can't believe I have to make a PR for this, this is stupid)
update os_lib from master and split os_alloc and os_arena
example compilation for OS_arena
@RevoSucks RevoSucks changed the title [WIP] Add OS* functions Add OS* functions Apr 30, 2020
@RevoSucks RevoSucks removed do not merge help wanted Extra attention is needed labels Apr 30, 2020
@RevoSucks RevoSucks merged commit 081bd6e into master Apr 30, 2020
@Demki Demki mentioned this pull request Apr 30, 2020
Cleverking2003 pushed a commit that referenced this pull request Jun 7, 2020
@red031000 red031000 deleted the os_lib branch July 24, 2020 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants