Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.53 KB | None | 0 0
  1. # Hello World for PSP
  2. # 2005.04.30 created by nem
  3.  
  4. .set noreorder
  5.  
  6. .text
  7.  
  8. .extern xmain
  9.  
  10.  
  11. ##############################################################################
  12.  
  13.  
  14. .ent _start
  15. .weak _start
  16.  
  17. _start:
  18. addiu $sp, 0x10
  19. sw $ra, 0($sp)
  20. sw $s0, 4($sp)
  21. sw $s1, 8($sp)
  22.  
  23. move $s0, $a0 # Save args
  24. move $s1, $a1
  25.  
  26. la $a0, _main_thread_name # Main thread setup
  27. la $a1, xmain
  28. li $a2, 0x20 # Priority
  29. li $a3, 0x40000 # Stack size
  30. lui $t0, 0x8000 # Attributes
  31. jal sceKernelCreateThread
  32. move $t1, $0
  33.  
  34. move $a0, $v0 # Start thread
  35. move $a1, $s0
  36. jal sceKernelStartThread
  37. move $a2, $s1
  38.  
  39. lw $ra, 0($sp)
  40. lw $s0, 4($sp)
  41. lw $s1, 8($sp)
  42. move $v0, $0
  43. jr $ra
  44. addiu $sp, 0x10
  45.  
  46. _main_thread_name:
  47. .asciiz "user_main"
  48.  
  49.  
  50. ##############################################################################
  51.  
  52.  
  53. .section .lib.ent,"wa",@progbits
  54. __lib_ent_top:
  55. .word 0
  56. .word 0x80000000
  57. .word 0x00010104
  58. .word __entrytable
  59.  
  60.  
  61. .section .lib.ent.btm,"wa",@progbits
  62. __lib_ent_bottom:
  63. .word 0
  64.  
  65.  
  66. .section .lib.stub,"wa",@progbits
  67. __lib_stub_top:
  68.  
  69.  
  70. .section .lib.stub.btm,"wa",@progbits
  71. __lib_stub_bottom:
  72. .word 0
  73.  
  74.  
  75. ##############################################################################
  76.  
  77. .section ".xodata.sceModuleInfo","wa",@progbits
  78.  
  79. __moduleinfo:
  80. .byte 0,0,1,1
  81.  
  82. .ascii "WorldGroove" #up to 28 char
  83. .align 5
  84.  
  85. .word _gp
  86. .word __lib_ent_top
  87. .word __lib_ent_bottom
  88. .word __lib_stub_top
  89. .word __lib_stub_bottom
  90.  
  91. ##############################################################################
  92.  
  93. .section .rodata.entrytable,"wa",@progbits
  94. __entrytable:
  95. .word 0xD632ACDB
  96. .word 0xF01D73A7
  97. .word _start
  98. .word __moduleinfo
  99. .word 0
  100.  
  101.  
  102.  
  103. ###############################################################################
  104.  
  105. .data
  106.  
  107.  
  108. ###############################################################################
  109.  
  110. .bss
  111.  
  112.  
  113. ###############################################################################
  114.  
  115.  
  116. .macro STUB_START module,d1,d2
  117.  
  118. .section .rodata.stubmodulename
  119. .word 0
  120. __stub_modulestr_\@:
  121. .asciz "\module"
  122. .align 2
  123.  
  124. .section .lib.stub
  125. .word __stub_modulestr_\@
  126. .word \d1
  127. .word \d2
  128. .word __stub_idtable_\@
  129. .word __stub_text_\@
  130.  
  131. .section .rodata.stubidtable
  132. __stub_idtable_\@:
  133.  
  134. .section .text.stub
  135. __stub_text_\@:
  136.  
  137. .endm
  138.  
  139.  
  140. .macro STUB_END
  141. .endm
  142.  
  143.  
  144. .macro STUB_FUNC funcid,funcname
  145.  
  146. .set push
  147. .set noreorder
  148.  
  149. .section .text.stub
  150. .weak \funcname
  151. \funcname:
  152. jr $ra
  153. nop
  154.  
  155. .section .rodata.stubidtable
  156. .word \funcid
  157.  
  158. .set pop
  159.  
  160. .endm
  161.  
  162. STUB_START "sceDisplay",0x40010000,0x00030005
  163. STUB_FUNC 0x0E20F177,sceDisplaySetMode
  164. STUB_FUNC 0x289D82FE,sceDisplaySetFrameBuf
  165. STUB_FUNC 0x984C27E7,sceDisplayWaitVblankStart
  166. STUB_END
  167.  
  168.  
  169. STUB_START "ThreadManForUser",0x40010000,0x50005
  170. STUB_FUNC 0x446D8DE6,sceKernelCreateThread
  171. STUB_FUNC 0xF475845D,sceKernelStartThread
  172. STUB_FUNC 0x9ACE131E,sceKernelSleepThread
  173. STUB_FUNC 0x82826F70,sceKernelPollCallbacks
  174. STUB_FUNC 0xE81CAF8F,sceKernelCreateCallback
  175. STUB_END
  176.  
  177. STUB_START "IoFileMgrForUser",0x40010000,0x00240005
  178. STUB_FUNC 0xe95a012b, sceIoIoctlAsync
  179. STUB_FUNC 0x63632449, sceIoIoctl
  180. STUB_FUNC 0x54f5fb11, sceIoDevctl
  181. STUB_FUNC 0x89aa9906, sceIoOpenAsync
  182. STUB_FUNC 0x109f50bc, sceIoOpen
  183. STUB_FUNC 0xff5940b6, sceIoCloseAsync
  184. STUB_FUNC 0x810c4bc3, sceIoClose
  185. STUB_FUNC 0x71b19e77, sceIoLseekAsync
  186. STUB_FUNC 0x27eb27b8, sceIoLseek
  187. STUB_FUNC 0x68963324, sceIoLseek32
  188. STUB_FUNC 0x1B385D8F, sceIoLseek32Async
  189. STUB_FUNC 0xa0b5a7c2, sceIoReadAsync
  190. STUB_FUNC 0x6a638d83, sceIoRead
  191. STUB_FUNC 0x0facab19, sceIoWriteAsync
  192. STUB_FUNC 0x42ec03ac, sceIoWrite
  193. STUB_FUNC 0xb29ddf9c, sceIoDopen
  194. STUB_FUNC 0xe3eb004c, sceIoDread
  195. STUB_FUNC 0xeb092469, sceIoDclose
  196. STUB_FUNC 0xf27a9c51, sceIoRemove
  197. STUB_FUNC 0x06a70004, sceIoMkdir
  198. STUB_FUNC 0x1117c65f, sceIoRmdir
  199. STUB_FUNC 0x55f4717d, sceIoChdir
  200. STUB_FUNC 0xace946e8, sceIoGetstat
  201. STUB_FUNC 0x779103a0, sceIoRename
  202. STUB_FUNC 0xb2a628c1, sceIoAssign
  203. STUB_FUNC 0x6d08a871, sceIoUnassign
  204. STUB_FUNC 0xe8bc6571, sceIoCancel
  205. STUB_FUNC 0xb293727f, sceIoChangeAsyncPriority
  206. STUB_FUNC 0xcb05f8d6, sceIoGetAsyncStat
  207. STUB_FUNC 0x08bd7374, sceIoGetDevType
  208. STUB_FUNC 0x3251ea56, sceIoPollAsync
  209. STUB_FUNC 0xa12a0514, sceIoSetAsyncCallback
  210. STUB_FUNC 0xab96437f, sceIoSync
  211. STUB_FUNC 0x35dbd746, sceIoWaitAsyncCB
  212. STUB_FUNC 0xe23eec33, sceIoWaitAsync
  213. STUB_FUNC 0xb8a740f4, sceIoChstat
  214. STUB_END
  215.  
  216. STUB_START "LoadExecForKernel",0x40010000,0x000b0005
  217. STUB_FUNC 0xbd2f1094,sceKernelLoadExec
  218. STUB_FUNC 0x2ac9954b,sceKernelExitGameWithStatus
  219. STUB_FUNC 0x05572a5f,sceKernelExitGame
  220. STUB_FUNC 0xa3d5e142,sceKernelExitVSHVSH
  221. STUB_FUNC 0xbb28e9b7,sceKernelPrepareRegionFrame
  222. STUB_FUNC 0x71a1d738,sceKernelLoadExecBufferPlain
  223. STUB_FUNC 0x4d5c75be,sceKernelLoadExecFromHost
  224. STUB_FUNC 0x4ac57943,sceKernelRegisterExitCallback
  225. STUB_FUNC 0xd9739b89,sceKernelUnregisterExitCallback
  226. STUB_FUNC 0x659188e1,sceKernelCheckExitCallback
  227. STUB_FUNC 0x62a27008,sceKernelInvokeExitCallback
  228. STUB_END
  229.  
  230.  
  231. STUB_START "pspeDebug",0x40010000,0x00010005
  232. STUB_FUNC 0xDEADBEAF pspeDebugWrite
  233. STUB_END
  234.  
  235. STUB_START "ModuleMgrForKernel",0x40010000,0x00130005
  236. STUB_FUNC 0xabe84f8a,sceKernelLoadModuleBufferWithApitype
  237. STUB_FUNC 0xba889c07,sceKernelLoadModuleBuffer
  238. STUB_FUNC 0xb7f46618,sceKernelLoadModuleByID
  239. STUB_FUNC 0x437214ae,sceKernelLoadModuleWithApitype
  240. STUB_FUNC 0x977de386,sceKernelLoadModule
  241. STUB_FUNC 0x710f61b5,sceKernelLoadModuleMS
  242. STUB_FUNC 0x91b87fae,sceKernelLoadModuleVSHByID
  243. STUB_FUNC 0xa4370e7c,sceKernelLoadModuleVSH
  244. STUB_FUNC 0x23425e93,sceKernelLoadModuleVSHPlain
  245. STUB_FUNC 0xf9275d98,sceKernelLoadModuleBufferUsbWlan
  246. STUB_FUNC 0xf0cac59e,sceKernelLoadModuleBufferVSH
  247. STUB_FUNC 0x50f0c1ec,sceKernelStartModule
  248. STUB_FUNC 0xd1ff982a,sceKernelStopModule
  249. STUB_FUNC 0x2e0911aa,sceKernelUnloadModule
  250. STUB_FUNC 0xd675ebb8,sceKernelSelfStopUnloadModule
  251. STUB_FUNC 0xcc1d3699,sceKernelStopUnloadSelfModule
  252. STUB_FUNC 0x748cbed9,sceKernelQueryModuleInfo
  253. STUB_FUNC 0x5f0cc575,sceKernelRebootBeforeForUser
  254. STUB_FUNC 0xb49ffb9e,sceKernelRebootBeforeForKernel
  255. STUB_END
  256.  
  257.  
  258. STUB_START "sceCtrl",0x40010000,0x00030005
  259. STUB_FUNC 0x6a2774f3,sceCtrlInit
  260. STUB_FUNC 0x1f4011e6,sceCtrlSetAnalogMode
  261. STUB_FUNC 0x1f803938,sceCtrlRead
  262. STUB_END
  263.  
  264. STUB_START "sceNet",0x90000,0x00050005
  265. STUB_FUNC 0x39af39a6,sceNetInit
  266. STUB_FUNC 0x281928a9,sceNetTerm
  267. STUB_FUNC 0xad6844c6,sceNetThreadAbort
  268. STUB_FUNC 0x0bf0a3ae,sceNetGetLocalEtherAddr
  269. STUB_FUNC 0xcc393e48,sceNetGetMallocStat
  270. STUB_END
  271.  
  272. STUB_START "sceNetCnf",0x90000,0x00020005
  273. STUB_FUNC 0xecb8d1f7,sceNetCnfInit
  274. STUB_FUNC 0xf5f4b0bf,sceNetCnfTerm
  275. STUB_END
  276.  
  277. STUB_START "sceNetInet",0x90000,0x001c0005
  278. STUB_FUNC 0x17943399,sceNetInetInit
  279. STUB_FUNC 0xa9ed66b9,sceNetInetTerm
  280. STUB_FUNC 0xdb094e1b,sceNetInetAccept
  281. STUB_FUNC 0x1a33f9ae,sceNetInetBind
  282. STUB_FUNC 0x8d7284ea,sceNetInetClose
  283. STUB_FUNC 0x805502dd,sceNetInetCloseWithRST
  284. STUB_FUNC 0x410b34aa,sceNetInetConnect
  285. STUB_FUNC 0xe247b6d6,sceNetInetGetpeername
  286. STUB_FUNC 0x162e6fd5,sceNetInetGetsockname
  287. STUB_FUNC 0x4a114c7c,sceNetInetGetsockopt
  288. STUB_FUNC 0xd10a1a7a,sceNetInetListen
  289. STUB_FUNC 0xfaabb1dd,sceNetInetPoll
  290. STUB_FUNC 0xcda85c99,sceNetInetRecv
  291. STUB_FUNC 0xc91142e4,sceNetInetRecvfrom
  292. STUB_FUNC 0xeece61d2,sceNetInetRecvmsg
  293. STUB_FUNC 0x5be8d595,sceNetInetSelect
  294. STUB_FUNC 0x7aa671bc,sceNetInetSend
  295. STUB_FUNC 0x05038fc7,sceNetInetSendto
  296. STUB_FUNC 0x774e36f4,sceNetInetSendmsg
  297. STUB_FUNC 0x2fe71fe7,sceNetInetSetsockopt
  298. STUB_FUNC 0x4cfe4e56,sceNetInetShutdown
  299. STUB_FUNC 0x8b7b220f,sceNetInetSocket
  300. STUB_FUNC 0x80a21abd,sceNetInetSocketAbort
  301. STUB_FUNC 0xfbabe411,sceNetInetGetErrno
  302. STUB_FUNC 0xb75d5b0a,sceNetInetInetAddr
  303. STUB_FUNC 0x1bdf5d13,sceNetInetInetAton
  304. STUB_FUNC 0xd0792666,sceNetInetInetNtop
  305. STUB_FUNC 0xe30b8c19,sceNetInetInetPton
  306. STUB_END
  307.  
  308. STUB_START "sceNetResolver",0x90000,0x00070005
  309. STUB_FUNC 0xf3370e61,sceNetResolverInit
  310. STUB_FUNC 0x6138194a,sceNetResolverTerm
  311. STUB_FUNC 0x244172af,sceNetResolverCreate
  312. STUB_FUNC 0x94523e09,sceNetResolverDelete
  313. STUB_FUNC 0x224c5f44,sceNetResolverStartNtoA
  314. STUB_FUNC 0x629e2fb7,sceNetResolverStartAtoN
  315. STUB_FUNC 0x808f6063,sceNetResolverStop
  316. STUB_END
  317.  
  318. STUB_START "sceWlanDrv",0x90000,0x00030005
  319. STUB_FUNC 0x93440b11,sceWlanGPBindRegError
  320. STUB_FUNC 0xd7763699,sceWlanGetSwitchState
  321. STUB_FUNC 0x0c622081,sceWlanGetEtherAddr
  322. STUB_END
  323.  
  324. STUB_START "sceWlanDrv_lib",0x90000,0x00050005
  325. STUB_FUNC 0x482cae9a,sceWlanDevAttach
  326. STUB_FUNC 0xc9a8cab7,sceWlanDevDetach
  327. STUB_FUNC 0x5ed4049a,sceWlanGPPrevEstablishActive
  328. STUB_FUNC 0xb4d7cb74,sceWlanGPSend
  329. STUB_FUNC 0xa447103a,sceWlanGPRecv
  330. STUB_END
  331.  
  332. STUB_START "sceHttp",0x90000,0x002b0005
  333. STUB_FUNC 0xab1abe07,sceHttpInit
  334. STUB_FUNC 0xd1c8945e,sceHttpEnd
  335. STUB_FUNC 0x9b1f1f36,sceHttpCreateTemplate
  336. STUB_FUNC 0xfcf8c055,sceHttpDeleteTemplate
  337. STUB_FUNC 0x8eefd953,sceHttpCreateConnection
  338. STUB_FUNC 0xcdf8ecb9,sceHttpCreateConnectionWithURL
  339. STUB_FUNC 0x5152773b,sceHttpDeleteConnection
  340. STUB_FUNC 0x47347b50,sceHttpCreateRequest
  341. STUB_FUNC 0xb509b09e,sceHttpCreateRequestWithURL
  342. STUB_FUNC 0xa5512e01,sceHttpDeleteRequest
  343. STUB_FUNC 0x47940436,sceHttpSetResolveTimeOut
  344. STUB_FUNC 0x8acd1f73,sceHttpSetConnectTimeOut
  345. STUB_FUNC 0x9988172d,sceHttpSetSendTimeOut
  346. STUB_FUNC 0x1f0fc3e3,sceHttpSetRecvTimeOut
  347. STUB_FUNC 0x78a0d3ec,sceHttpEnableKeepAlive
  348. STUB_FUNC 0xc7ef2559,sceHttpDisableKeepAlive
  349. STUB_FUNC 0x0809c831,sceHttpEnableRedirect
  350. STUB_FUNC 0x1a0ebb69,sceHttpDisableRedirect
  351. STUB_FUNC 0x9fc5f10d,sceHttpEnableAuth
  352. STUB_FUNC 0xae948fee,sceHttpDisableAuth
  353. STUB_FUNC 0x0dafa58f,sceHttpEnableCookie
  354. STUB_FUNC 0x0b12abfb,sceHttpDisableCookie
  355. STUB_FUNC 0xa6800c34,sceHttpInitCache
  356. STUB_FUNC 0x78b54c09,sceHttpEndCache
  357. STUB_FUNC 0x59e6d16f,sceHttpEnableCache
  358. STUB_FUNC 0xccbd167a,sceHttpDisableCache
  359. STUB_FUNC 0xbb70706f,sceHttpSendRequest
  360. STUB_FUNC 0xc10b6bd9,sceHttpAbortRequest
  361. STUB_FUNC 0x0282a3bd,sceHttpGetContentLength
  362. STUB_FUNC 0x4cc7d78f,sceHttpGetStatusCode
  363. STUB_FUNC 0xdb266ccf,sceHttpGetAllHeader
  364. STUB_FUNC 0xedeeb999,sceHttpReadData
  365. STUB_FUNC 0xf49934f6,sceHttpSetMallocFunction
  366. STUB_FUNC 0x2a6c3296,sceHttpSetAuthInfoCB
  367. STUB_FUNC 0x15540184,sceHttpDeleteHeader
  368. STUB_FUNC 0x3eaba285,sceHttpAddExtraHeader
  369. STUB_FUNC 0xf0f46c62,sceHttpSetProxy
  370. STUB_FUNC 0xd70d4847,sceHttpGetProxy
  371. STUB_FUNC 0xd081ec8f,sceHttpGetNetworkErrno
  372. STUB_FUNC 0xe4d21302,sceHttpsInit
  373. STUB_FUNC 0xf9d8eb63,sceHttpsEnd
  374. STUB_FUNC 0xbac31bf1,sceHttpsEnableOption
  375. STUB_FUNC 0xb3faf831,sceHttpsDisableOption
  376. STUB_END
  377.  
  378. STUB_START "sceCtrl",0x40010000,0x000E0005
  379. STUB_FUNC 0x6A2774F3,sceCtrlSetSamplingCycle
  380. STUB_FUNC 0x02BAAD91,sceCtrlGetSamplingCycle
  381. STUB_FUNC 0x1F4011E6,sceCtrlSetSamplingMode
  382. STUB_FUNC 0xDA6B76A1,sceCtrlGetSamplingMode
  383. STUB_FUNC 0x3A622550,sceCtrlPeekBufferPositive
  384. STUB_FUNC 0xC152080A,sceCtrlPeekBufferNegative
  385. STUB_FUNC 0x1F803938,sceCtrlReadBufferPositive
  386. STUB_FUNC 0x60B81F86,sceCtrlReadBufferNegative
  387. STUB_FUNC 0xB1D0E5CD,sceCtrlPeekLatch
  388. STUB_FUNC 0x0B588501,sceCtrlReadLatch
  389. STUB_FUNC 0x348D99D4,sceCtrl_348D99D4
  390. STUB_FUNC 0xAF5960F3,sceCtrl_AF5960F3
  391. STUB_FUNC 0xA68FD260,sceCtrl_A68FD260
  392. STUB_FUNC 0x6841BE1A,sceCtrl_6841BE1A
  393. STUB_END
  394.  
  395.  
  396. ###############################################################################
  397.  
  398. .text
  399.  
  400. .end _start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement