Open flash0 in write mode on the Slims, is possible?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Open flash0 in write mode on the Slims, is possible?

Post by ne0h »

I've this function to load the flash0 in rw mode:

Code: Select all

sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
But on the Slims is opened in read only mode, is possible to load this in write mode?
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

Post by Question_dev »

Look in DAX's CF the proof of concept source code.
He's writing to flash there.

Cya
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

That was back on 1.50, he's asking about the slim,
but it must be possible. It has custom firmware on it somehow.
If not actually, then potentially.
xpierrex
Posts: 1
Joined: Sat May 03, 2008 6:33 pm

Post by xpierrex »

i think you should check out at the source code of the "patch" who was released for flash access on 3.60+
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

Writing in the flash is same for 3.XX.

Just ensure you have 0x800 as module flags, and PSP_THREAD_ATTR_VSH for the main thread. And don't forget to unassign the flash before assigning it in write mode.
nikocronaldo
Posts: 31
Joined: Sun Feb 24, 2008 7:19 am

Post by nikocronaldo »

It is possbile,put the src in this Kernel Mode:

Code: Select all

PSP_MODULE_INFO("APP", 0x800, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_VSH);
I have it in my application Multi PSP and it works successfully ;)
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Code: Select all


....

PSP_MODULE_INFO("APP", 0x800, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_VSH);

...

sceIoUnassign("flash0");
sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);

...
moonlight, like this?
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

I've error 80020148!
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Code: Select all

PSP_MODULE_INFO("MYPSPMENU_GUI", 0x800, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

I've the same error!
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

Use BUILD_PRX = 1 in the makefile. An elf with that param will give error.
nikocronaldo
Posts: 31
Joined: Sun Feb 24, 2008 7:19 am

Post by nikocronaldo »

moonlight wrote:Use BUILD_PRX = 1 in the makefile. An elf with that param will give error.
Here the makefile to work:

Code: Select all

TARGET = main
OBJS = main.o 

INCDIR = ../include
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS) -c

LIBDIR = ../lib 
LDFLAGS = 
LIBS = -lpsppower 
LDFLAGS = -lm

PSP_FW_VERSION = 371

BUILD_PRX = 1

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Access Flash Slim Sample
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

Post Reply