I'm still confused. How can I run sceKernelLoadModuleMs function to load the PRX files from memory stick before startup.s executes it's code?
If you could send me a few lines that show how to load a prx into memory, it would be extremely helpful to me. Thanks!
Code: Select all
# Hello World for PSP
# 2005.04.30 created by nem
# 2005.06.22 modified by liquidice
.set noreorder
.text
.extern xmain
##############################################################################
.ent _start
.weak _start
_start:
la $2,_gp
move $gp,$2
jal xmain
nop
jr $ra
li $2, 1
##############################################################################
.section .lib.ent,"wa",@progbits
__lib_ent_top:
.word 0
.word 0x80000000
.word 0x00010104
.word __entrytable
.section .lib.ent.btm,"wa",@progbits
__lib_ent_bottom:
.word 0
.section .lib.stub,"wa",@progbits
__lib_stub_top:
.section .lib.stub.btm,"wa",@progbits
__lib_stub_bottom:
.word 0
##############################################################################
.section ".xodata.sceModuleInfo","wa",@progbits
__moduleinfo:
.byte 0,0,1,1
.ascii "HelloWorld" #up to 28 char
.align 5
.word _gp
.word __lib_ent_top
.word __lib_ent_bottom
.word __lib_stub_top
.word __lib_stub_bottom
##############################################################################
.section .rodata.entrytable,"wa",@progbits
__entrytable:
.word 0xD632ACDB
.word 0xF01D73A7
.word _start
.word __moduleinfo
.word 0
###############################################################################
.data
###############################################################################
.bss
###############################################################################
.macro STUB_START module,d1,d2
.section .rodata.stubmodulename
.word 0
__stub_modulestr_\@:
.asciz "\module"
.align 2
.section .lib.stub
.word __stub_modulestr_\@
.word \d1
.word \d2
.word __stub_idtable_\@
.word __stub_text_\@
.section .rodata.stubidtable
__stub_idtable_\@:
.section .text.stub
__stub_text_\@:
.endm
.macro STUB_END
.endm
.macro STUB_FUNC funcid,funcname
.set push
.set noreorder
.section .text.stub
.weak \funcname
\funcname:
jr $ra
nop
.section .rodata.stubidtable
.word \funcid
.set pop
.endm
STUB_START "sceDisplay",0x40010000,0x00030005
STUB_FUNC 0x0E20F177,pspDisplaySetMode
STUB_FUNC 0x289D82FE,pspDisplaySetFrameBuf
STUB_FUNC 0x984C27E7,pspDisplayWaitVblankStart
STUB_END
STUB_START "sceCtrl",0x40010000,0x00030005
STUB_FUNC 0x6A2774F3,sceCtrlInit
STUB_FUNC 0x1F4011E6,sceCtrlSetAnalogMode
STUB_FUNC 0x1F803938,sceCtrlRead
STUB_END
STUB_START "pspeDebug",0x40010000,0x00010005
STUB_FUNC 0xDEADBEAF pspeDebugWrite
STUB_END
STUB_START "ModuleMgrForKernel",0x40010000,0x00130005
STUB_FUNC 0xabe84f8a,sceKernelLoadModuleBufferWithApitype
STUB_FUNC 0xba889c07,sceKernelLoadModuleBuffer
STUB_FUNC 0xb7f46618,sceKernelLoadModuleByID
STUB_FUNC 0x437214ae,sceKernelLoadModuleWithApitype
STUB_FUNC 0x977de386,sceKernelLoadModule
STUB_FUNC 0x710f61b5,sceKernelLoadModuleMs
STUB_FUNC 0x91b87fae,sceKernelLoadModuleVSHByID
STUB_FUNC 0xa4370e7c,sceKernelLoadModuleVSH
STUB_FUNC 0x23425e93,sceKernelLoadModuleVSHPlain
STUB_FUNC 0xf9275d98,sceKernelLoadModuleBufferUsbWlan
STUB_FUNC 0xf0cac59e,sceKernelLoadModuleBufferVSH
STUB_FUNC 0x50f0c1ec,sceKernelStartModule
STUB_FUNC 0xd1ff982a,sceKernelStopModule
STUB_FUNC 0x2e0911aa,sceKernelUnloadModule
STUB_FUNC 0xd675ebb8,sceKernelSelfStopUnloadModule
STUB_FUNC 0xcc1d3699,sceKernelStopUnloadSelfModule
STUB_FUNC 0x748cbed9,sceKernelQueryModuleInfo
STUB_FUNC 0x5f0cc575,sceKernelRebootBeforeForUser
STUB_FUNC 0xb49ffb9e,sceKernelRebootBeforeForKernel
STUB_END
STUB_START "LoadExecForKernel",0x40010000,0x000b0005
STUB_FUNC 0xbd2f1094,sceKernelLoadExec
STUB_FUNC 0x2ac9954b,sceKernelExitGameWithStatus
STUB_FUNC 0x05572a5f,sceKernelExitGame
STUB_FUNC 0xa3d5e142,sceKernelExitVSHVSH
STUB_FUNC 0xbb28e9b7,sceKernelPrepareRegionFrame
STUB_FUNC 0x71a1d738,sceKernelLoadExecBufferPlain
STUB_FUNC 0x4d5c75be,sceKernelLoadExecFromHost
STUB_FUNC 0x4ac57943,sceKernelRegisterExitCallback
STUB_FUNC 0xd9739b89,sceKernelUnregisterExitCallback
STUB_FUNC 0x659188e1,sceKernelCheckExitCallback
STUB_FUNC 0x62a27008,sceKernelInvokeExitCallback
STUB_END
STUB_START "sceNet",0x90000,0x00050005
STUB_FUNC 0x39af39a6,sceNetInit
STUB_FUNC 0x281928a9,sceNetTerm
STUB_FUNC 0xad6844c6,sceNetThreadAbort
STUB_FUNC 0x0bf0a3ae,sceNetGetLocalEtherAddr
STUB_FUNC 0xcc393e48,sceNetGetMallocStat
STUB_END
STUB_START "sceNetCnf",0x90000,0x00020005
STUB_FUNC 0xecb8d1f7,sceNetCnfInit
STUB_FUNC 0xf5f4b0bf,sceNetCnfTerm
STUB_END
STUB_START "sceNetInet",0x90000,0x001c0005
STUB_FUNC 0x17943399,sceNetInetInit
STUB_FUNC 0xa9ed66b9,sceNetInetTerm
STUB_FUNC 0xdb094e1b,sceNetInetAccept
STUB_FUNC 0x1a33f9ae,sceNetInetBind
STUB_FUNC 0x8d7284ea,sceNetInetClose
STUB_FUNC 0x805502dd,sceNetInetCloseWithRST
STUB_FUNC 0x410b34aa,sceNetInetConnect
STUB_FUNC 0xe247b6d6,sceNetInetGetpeername
STUB_FUNC 0x162e6fd5,sceNetInetGetsockname
STUB_FUNC 0x4a114c7c,sceNetInetGetsockopt
STUB_FUNC 0xd10a1a7a,sceNetInetListen
STUB_FUNC 0xfaabb1dd,sceNetInetPoll
STUB_FUNC 0xcda85c99,sceNetInetRecv
STUB_FUNC 0xc91142e4,sceNetInetRecvfrom
STUB_FUNC 0xeece61d2,sceNetInetRecvmsg
STUB_FUNC 0x5be8d595,sceNetInetSelect
STUB_FUNC 0x7aa671bc,sceNetInetSend
STUB_FUNC 0x05038fc7,sceNetInetSendto
STUB_FUNC 0x774e36f4,sceNetInetSendmsg
STUB_FUNC 0x2fe71fe7,sceNetInetSetsockopt
STUB_FUNC 0x4cfe4e56,sceNetInetShutdown
STUB_FUNC 0x8b7b220f,sceNetInetSocket
STUB_FUNC 0x80a21abd,sceNetInetSocketAbort
STUB_FUNC 0xfbabe411,sceNetInetGetErrno
STUB_FUNC 0xb75d5b0a,sceNetInetInetAddr
STUB_FUNC 0x1bdf5d13,sceNetInetInetAton
STUB_FUNC 0xd0792666,sceNetInetInetNtop
STUB_FUNC 0xe30b8c19,sceNetInetInetPton
STUB_END
STUB_START "sceNetResolver",0x90000,0x00070005
STUB_FUNC 0xf3370e61,sceNetResolverInit
STUB_FUNC 0x6138194a,sceNetResolverTerm
STUB_FUNC 0x244172af,sceNetResolverCreate
STUB_FUNC 0x94523e09,sceNetResolverDelete
STUB_FUNC 0x224c5f44,sceNetResolverStartNtoA
STUB_FUNC 0x629e2fb7,sceNetResolverStartAtoN
STUB_FUNC 0x808f6063,sceNetResolverStop
STUB_END
STUB_START "sceWlanDrv",0x90000,0x00030005
STUB_FUNC 0x93440b11,sceWlanGPBindRegError
STUB_FUNC 0xd7763699,sceWlanGetSwitchState
STUB_FUNC 0x0c622081,sceWlanGetEtherAddr
STUB_END
STUB_START "sceWlanDrv_lib",0x90000,0x00050005
STUB_FUNC 0x482cae9a,sceWlanDevAttach
STUB_FUNC 0xc9a8cab7,sceWlanDevDetach
STUB_FUNC 0x5ed4049a,sceWlanGPPrevEstablishActive
STUB_FUNC 0xb4d7cb74,sceWlanGPSend
STUB_FUNC 0xa447103a,sceWlanGPRecv
STUB_END
STUB_START "sceHttp",0x90000,0x002b0005
STUB_FUNC 0xab1abe07,sceHttpInit
STUB_FUNC 0xd1c8945e,sceHttpEnd
STUB_FUNC 0x9b1f1f36,sceHttpCreateTemplate
STUB_FUNC 0xfcf8c055,sceHttpDeleteTemplate
STUB_FUNC 0x8eefd953,sceHttpCreateConnection
STUB_FUNC 0xcdf8ecb9,sceHttpCreateConnectionWithURL
STUB_FUNC 0x5152773b,sceHttpDeleteConnection
STUB_FUNC 0x47347b50,sceHttpCreateRequest
STUB_FUNC 0xb509b09e,sceHttpCreateRequestWithURL
STUB_FUNC 0xa5512e01,sceHttpDeleteRequest
STUB_FUNC 0x47940436,sceHttpSetResolveTimeOut
STUB_FUNC 0x8acd1f73,sceHttpSetConnectTimeOut
STUB_FUNC 0x9988172d,sceHttpSetSendTimeOut
STUB_FUNC 0x1f0fc3e3,sceHttpSetRecvTimeOut
STUB_FUNC 0x78a0d3ec,sceHttpEnableKeepAlive
STUB_FUNC 0xc7ef2559,sceHttpDisableKeepAlive
STUB_FUNC 0x0809c831,sceHttpEnableRedirect
STUB_FUNC 0x1a0ebb69,sceHttpDisableRedirect
STUB_FUNC 0x9fc5f10d,sceHttpEnableAuth
STUB_FUNC 0xae948fee,sceHttpDisableAuth
STUB_FUNC 0x0dafa58f,sceHttpEnableCookie
STUB_FUNC 0x0b12abfb,sceHttpDisableCookie
STUB_FUNC 0xa6800c34,sceHttpInitCache
STUB_FUNC 0x78b54c09,sceHttpEndCache
STUB_FUNC 0x59e6d16f,sceHttpEnableCache
STUB_FUNC 0xccbd167a,sceHttpDisableCache
STUB_FUNC 0xbb70706f,sceHttpSendRequest
STUB_FUNC 0xc10b6bd9,sceHttpAbortRequest
STUB_FUNC 0x0282a3bd,sceHttpGetContentLength
STUB_FUNC 0x4cc7d78f,sceHttpGetStatusCode
STUB_FUNC 0xdb266ccf,sceHttpGetAllHeader
STUB_FUNC 0xedeeb999,sceHttpReadData
STUB_FUNC 0xf49934f6,sceHttpSetMallocFunction
STUB_FUNC 0x2a6c3296,sceHttpSetAuthInfoCB
STUB_FUNC 0x15540184,sceHttpDeleteHeader
STUB_FUNC 0x3eaba285,sceHttpAddExtraHeader
STUB_FUNC 0xf0f46c62,sceHttpSetProxy
STUB_FUNC 0xd70d4847,sceHttpGetProxy
STUB_FUNC 0xd081ec8f,sceHttpGetNetworkErrno
STUB_FUNC 0xe4d21302,sceHttpsInit
STUB_FUNC 0xf9d8eb63,sceHttpsEnd
STUB_FUNC 0xbac31bf1,sceHttpsEnableOption
STUB_FUNC 0xb3faf831,sceHttpsDisableOption
STUB_END
###############################################################################
.text
.end _start
Do I need to write assembly code to make this work? Or am I asking questions that only people with an sdk would have the answers to? If the SDK is needed to do this, i guess i've hit a brick wall as far as these forums go, and feel free to lock this thread.