Announcement
Collapse
No announcement yet.
Project Artemis
Collapse
This is a sticky topic.
X
X
-
Friggin' BountySource is down again, and has been for a few days now. They really need better hosting...or perhaps we need a better place to put Artemis (of course, that would require them refunding Parasyte's unanswered bounty)...
-
Now it just needs to be implemented as a Duff's Device...Originally posted by misfire View PostActually, memcpy is a highly optimized function that can read/write 16 bytes at the time using EE's LQ/SQ quadword instructions.
http://svn.ps2dev.org/filedetails.ph...src%2Fmemcpy.S
Leave a comment:
-
Also, the reason why I set it to 8kb chunks is because I used it to dump over a LAN connection, and the maximum TCP buffer is 8kb. Any larger and it slows down the transaction dramatically, any lower and it just simply runs slower. If you keep it at 8kb then you can dump at the fastest rate it will over the LAN connection.
Leave a comment:
-
I must have some old and beat up SDK, because my memcpy() only does 1 byte at a time (which is why I never use it) lol.
Leave a comment:
-
That would be a pretty dumb memcpy.Originally posted by Gtlcpimp View Post2 Things:
1) memcpy reads 1 byte, then writes 1 byte. I am saving the stress of having to call up another function by just implementing it directly into mine.
Actually, memcpy is a highly optimized function that can read/write 16 bytes at the time using EE's LQ/SQ quadword instructions.
http://svn.ps2dev.org/filedetails.ph...src%2Fmemcpy.S
Leave a comment:
-
I was trying to get across that given an all-at-once thing, it will handle it more efficiently, as it can cover more than 8kb, and it does the same exact thing as the 8kb chunk, just without the if's and butts.Originally posted by Gtlcpimp View Post2 Things:
1) memcpy reads 1 byte, then writes 1 byte. I am saving the stress of having to call up another function by just implementing it directly into mine.
2) I wrote this function a LONG time ago.
Code:void memcpy(unsigned char *dest, unsigned char *org, int ndata) { int n; for(n = 0; n < ndata; n++) dest[n] = org[n]; }
I have no clue what point your trying to get across, but when it comes to file writing, you are limited to how fast you can write. If you just do individual bytes your operation is extremely slow. If you chunk it, it will run a whole lot faster. You build a package of X amount of bytes, then write that to the file, and loop back until you have finished dumping all you wanted. Chunking it is more efficient in almost every aspect. If you try to write too large of information at the same time, it slows down the operation dramatically. If you do individual bytes at a time, it will take really long. If you write in chunks, the chunks write extremely fast, and the 8kb chunks are built extremely fast. Thus, you have a faster operation.
Needless to say, I suppose it wouldn't make much difference supposing the PS2's io is rather quick.
Leave a comment:
-
2 Things:Originally posted by misfire View PostWhy are you reading only one byte at a time? You can call memcpy() after ee_kmode_enter().
1) memcpy reads 1 byte, then writes 1 byte. I am saving the stress of having to call up another function by just implementing it directly into mine.
2) I wrote this function a LONG time ago.
Code:void memcpy(unsigned char *dest, unsigned char *org, int ndata) { int n; for(n = 0; n < ndata; n++) dest[n] = org[n]; }I have no clue what point your trying to get across, but when it comes to file writing, you are limited to how fast you can write. If you just do individual bytes your operation is extremely slow. If you chunk it, it will run a whole lot faster. You build a package of X amount of bytes, then write that to the file, and loop back until you have finished dumping all you wanted. Chunking it is more efficient in almost every aspect. If you try to write too large of information at the same time, it slows down the operation dramatically. If you do individual bytes at a time, it will take really long. If you write in chunks, the chunks write extremely fast, and the 8kb chunks are built extremely fast. Thus, you have a faster operation.Originally posted by aaronic View PostWell then my bad, naturally edit as needed.
That's great gtlc, but dumping chunks is a lot less efficient as it has to open->write->seek->write->seek->write->seek->(etc)close, rather than a constant task of just straight write(which is 100x+ faster). It's more stressful your way.
Leave a comment:
-
Well then my bad, naturally edit as needed.
That's great gtlc, but dumping chunks is a lot less efficient as it has to open->write->seek->write->seek->write->seek->(etc)close, rather than a constant task of just straight write(which is 100x+ faster). It's more stressful your way.
Leave a comment:
-
Why are you reading only one byte at a time? You can call memcpy() after ee_kmode_enter().
Leave a comment:
-
This is the memory dump function that I have made a long time ago...
Code:void DumpRange(char *fname, int from, int to) { FILE *fle = fopen(fname, "w+b"); u8 toput[8192]; printf("\n Dumping Range: %08X -> %08X ... ", from, to); int offset, i; for (offset = from; offset < to; offset += 8192) { for (i = 0; i < 8192; i++) { ee_kmode_enter(); toput[i] = _lb(offset + i); ee_kmode_exit(); } fwrite(toput, 8192, 1, fle); printf("\n Dumped Chunk: %08X ", offset); } fclose(fle); printf("\n Dumping Range: %08X -> %08X Complete. ", from, to); }
Leave a comment:
-
This won't work without entering kernel mode:
int sizeDumped = fioWrite(fd0, (void*)0x00000000, DUMP_SIZE);
Leave a comment:
-
Just a note, but I don't recollect any dumping functions in the dumping source, it was a bunch of launchers and nothing more.
Just an example of something that'd dump to the given file, though usb would be wiser. It checks for pre-existing and all.Code:void dump_memory(void) { #define MAX_DUMPS 100 #define DUMP_SIZE 32000000 void find_dump_num(char *input) { int fd0; int counter; char *template = "mc0:/dump%d.ram"; for(counter = 0; counter <= MAX_DUMPS; counter++) { sprintf(input, template, counter); fd0 = fioOpen(input, O_RDONLY); if(fd0 <= 0) break;//Note it's free, nothing to close fioClose(fd0);//It ain't, close it } return; } char *dumpBuff = (char*)malloc(60); find_dump_num(dumpBuff); int fd0 = fioOpen(dumpBuff, O_WRONLY); free(dumpBuff); int sizeDumped = fioWrite(fd0, (void*)0x00000000, DUMP_SIZE); fioClose(fd0); #undef MAX_DUMPS #undef DUMP_SIZE /*Optional Printing Stuff HERE*/ dumpBuff = (char*)malloc(20); sprintf(dumpBuff, "Dumped %d bytes", sizeDumped); //PUT IT HERE DUDE! free(dumpBuff); return; }Last edited by aaronic; 03-23-2009, 08:54:35 PM.
Leave a comment:
-
http://gshi.org/vb/showthread.php?t=3450Originally posted by Lazy Bastard View PostFrom what you mentioned, we've almost completely solved one of our chief concerns
Leave a comment:
-
How to use dump2mass
--------Last edited by Maori-Jigglypuff; 03-01-2009, 12:23:13 PM.
Leave a comment:
Leave a comment: