04-30-2011, 09:30 AM
I did some more debugging on this thing and it looks to me at this point that mabe the code is broken in a simple way ? On maingui.java line 137:
ByteBuffer readbuffer = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, (int) roChannel.size());
which obviously creates a readonly buffer . Later on at PSP.java line 146 reference from my first post the same ByteBuffer object now referenced by f tries to use a the method that requires read-write access : .array() . I also checked that with a watch on f.isReadOnly() that returned true :
byte[] inBuf = f.array();
So my problem seems to not related to having a 'bad rom' but on poor implementation .
Also I find the lack of response to my post disturbing . I do not intend to hack on the codebase using complete downloaded roms and there are 37 demos that I have to test stuff so I don't have to download any released game roms of psp games . If anyone is concered with that I may fork the code and create a github or mercurial repository if I ever decide to hack seriously on jpcsp so you will not stop anything .
ps Last paragraph is not meant as a threat but to mabe get an answer . If noone wants to have anything to do with me you can certainly give me an answer that you don't care about anything I may have found out in the limited time I spent debugging .
ByteBuffer readbuffer = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, (int) roChannel.size());
which obviously creates a readonly buffer . Later on at PSP.java line 146 reference from my first post the same ByteBuffer object now referenced by f tries to use a the method that requires read-write access : .array() . I also checked that with a watch on f.isReadOnly() that returned true :
byte[] inBuf = f.array();
So my problem seems to not related to having a 'bad rom' but on poor implementation .
Also I find the lack of response to my post disturbing . I do not intend to hack on the codebase using complete downloaded roms and there are 37 demos that I have to test stuff so I don't have to download any released game roms of psp games . If anyone is concered with that I may fork the code and create a github or mercurial repository if I ever decide to hack seriously on jpcsp so you will not stop anything .
ps Last paragraph is not meant as a threat but to mabe get an answer . If noone wants to have anything to do with me you can certainly give me an answer that you don't care about anything I may have found out in the limited time I spent debugging .