Changes

Jump to navigation Jump to search
1,563 bytes added ,  12:22, 18 July 2013
IntrWait bugged?
Line 1: Line 1: −
These are the functions provided by the ARM9 BIOS. IDs not mentioned here, calls swiSoftReset. I haven't checked any old ones if they've been modified/replaced.
+
== ARM9 BIOS SWI Function ==
 +
 
 +
These are the functions provided by the ARM9 BIOS.
    
{| class="wikitable"
 
{| class="wikitable"
Line 6: Line 8:  
! Name  
 
! Name  
 
! Args
 
! Args
! New?
+
! Changes
 
|-
 
|-
 
| 0x00
 
| 0x00
| swiSoftReset
+
| N/A (hangs)
 
| none
 
| none
| old
+
| '''formerly SoftReset'''
 
|-
 
|-
 
| 0x01
 
| 0x01
| swiUnknown
+
| swiDecompressLZSSwithCallbackWrite8bitUnits
 
| ??
 
| ??
| '''new''' ??
+
| '''formerly jump to 0'''
 
|-
 
|-
 
| 0x02
 
| 0x02
| swiDecompressLZSSVram
+
| swiDecompressLZSSwithCallbackWrite16bitUnits
 
| ??
 
| ??
| old
+
| '''formerly jump to 0'''
 
|-
 
|-
 
| 0x03
 
| 0x03
| swiDelay
+
| swiWaitByLoop
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x04
 
| 0x04
 
| swiIntrWait
 
| swiIntrWait
 
| ??
 
| ??
| old
+
| same as DS (but bugged? see note)
 
|-
 
|-
 
| 0x05
 
| 0x05
| swiWaitForVBlank
+
| swiVBlankIntrWait
 
| ??
 
| ??
| old
+
| same as DS (but bugged? see note)
 
|-
 
|-
 
| 0x06
 
| 0x06
| swiWaitForIRQ
+
| swiHalt
 +
| ??
 +
| same as DS
 +
|-
 +
| 0x07-0x08
 +
| N/A (hangs)
 
| ??
 
| ??
| old
+
| same as DS / formerly jump to 0
 
|-
 
|-
 
| 0x09  
 
| 0x09  
 
| swiDivide
 
| swiDivide
 
| ??
 
| ??
| old
+
| same as DS
 +
|-
 +
| 0x0A
 +
| N/A (hangs)
 +
| ??
 +
| same as DS / formerly jump to 0
 
|-
 
|-
 
| 0x0B
 
| 0x0B
 
| swiCopy
 
| swiCopy
 
| ??  
 
| ??  
| old
+
| same as DS
 
|-
 
|-
 
| 0x0C
 
| 0x0C
 
| swiFastCopy
 
| swiFastCopy
 
| ??  
 
| ??  
| old
+
| same as DS
 
|-
 
|-
 
| 0x0D
 
| 0x0D
 
| swiSqrt
 
| swiSqrt
 
| ??  
 
| ??  
| old
+
| same as DS
 
|-
 
|-
 
| 0x0E
 
| 0x0E
 
| swiCRC16
 
| swiCRC16
 
| ??  
 
| ??  
| old
+
| same as DS
 +
|-
 +
| 0x0F
 +
| N/A (hangs)
 +
| ??
 +
| '''formerly IsDebugger'''
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| swiUnpackBits
 
| swiUnpackBits
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x11
 
| 0x11
 
| swiDecompressLZSSWram
 
| swiDecompressLZSSWram
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x12
 
| 0x12
| swiDecompressLZSSVram
+
| N/A (ignored)
 
| ??
 
| ??
| old
+
| '''(formerly swiDecompressLZSSVram)'''
 
|-
 
|-
 
| 0x13
 
| 0x13
| swiDecompressHuffman
+
| swiDecompressHuffmanWithCallbackWrite32bitUnits
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x14
 
| 0x14
 
| swiDecompressRLEWram
 
| swiDecompressRLEWram
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x15
 
| 0x15
| swiDecompressRLEVram
+
| swiDecompressRLEwithCallbackWrite16bitUnits
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x16
 
| 0x16
 
| swiDecodeDelta8
 
| swiDecodeDelta8
 
| ??
 
| ??
| old
+
| same as DS
 +
|-
 +
| 0x17
 +
| N/A (hangs)
 +
| ??
 +
| same as DS / formerly jump to 0
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| swiDecodeDelta16
 
| swiDecodeDelta16
 
| ??
 
| ??
| old
+
| same as DS
 +
|-
 +
| 0x19
 +
| swiDecompressLZSSwithCallbackWrite16bitUnits
 +
| ??
 +
| same as SWI 0x02 / formerly jump to 0
 +
|-
 +
| 0x1A-0x1E
 +
| N/A (hangs)
 +
| ??
 +
| same as DS / formerly jump to 0
 
|-
 
|-
 
| 0x1F
 
| 0x1F
| swiSetHaltCR
+
| swiCustomPost
 
| ??
 
| ??
| old
+
| same as DS
 
|-
 
|-
 
| 0x20
 
| 0x20
| init_crypto_heap
+
| swiInit_crypto_heap
 
| ??
 
| ??
 
| '''new'''
 
| '''new'''
 
|-
 
|-
 
| 0x21
 
| 0x21
| rsa_decrypt
+
| swiRSA_decrypt
 
| ??
 
| ??
 
| '''new'''
 
| '''new'''
 
|-
 
|-
 
| 0x22
 
| 0x22
| rsa_decrypt_signature
+
| swiRSA_decrypt_signature
 
| ??
 
| ??
 
| '''new'''
 
| '''new'''
 
|-
 
|-
 
| 0x23
 
| 0x23
| rsa_decrypt_der
+
| swiRSA_decrypt_der
 
| ??
 
| ??
 
| '''new'''
 
| '''new'''
Line 159: Line 191:  
|-
 
|-
 
| 0x29
 
| 0x29
| SHA1_Random
+
| swiSHA1_Random
 
| looks like it's trying to generate a random number using SHA1
 
| looks like it's trying to generate a random number using SHA1
 
| '''new'''
 
| '''new'''
 +
|-
 +
| 0x2A
 +
| N/A (hangs)
 +
| ??
 +
| formerly jump to garbage
 +
|-
 +
| 0x2B
 +
| N/A (ignored)
 +
| ??
 +
| formerly jump to garbage
 +
|-
 +
| 0x2C-0x3F
 +
| N/A (hangs)
 +
| ??
 +
| formerly jump to garbage
 +
|-
 +
| 0x40-0xFF
 +
| Mirrors of 0x00-0x3F
 +
| ??
 +
| formerly jump to garbage
 
|}
 
|}
 +
 +
The two ignored function do return without doing anything (they are rejected before calling the SWI function table). The other unused functions do hang in an endless loop.
 +
 +
'''Note:''' swiHalt does correctly use CP15 to halt the ARM9 processor. But, swiVBlankIntrWait and swiIntrWait do use port 0x4000301 (which would be correct on ARM7, unknown if the same mechanism is actually supported on ARM9, if it isn't supported then the functions would more or less behave as desired - wait for IRQ flags to get set - but without actually switching the CPU into low-power mode).
 +
 +
== See Also ==
 +
 +
* [[ARM7 BIOS]]
108

edits

Navigation menu