Jump to content

eloeri

New Member
  • Posts

    0
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Hello! I was hoping that I could have a moment of your time in trying to build the eeprom nds dumper. Do you still have the project available or know what these errors could mean on compilation? C:/Users/Major/pokewalker-rom-dumper-master/arm7/source/template.c:32:10: fatal error: nwram.h: No such file or directory 32 | #include "nwram.h" | ^~~~~~~~~ compilation terminated. make[2]: *** [/opt/devkitpro/devkitARM/base_rules:39: template.o] Error 1 make[1]: *** [Makefile:93: build] Error 2 make[1]: Leaving directory '/home/Major/pokewalker-rom-dumper-master/arm7' make: *** [Makefile:31: checkarm7] Error 2 and C:/Users/Major/pokewalker-rom-dumper-master/arm9/source/main.c:305:65: error: passing argument 4 of 'pw_write_mem' from incompatible pointer type [-Wincompatible-pointer-types] 305 | &orgBE)) { | ^~~~~~ | | | uint16_t * {aka short unsigned int *} In file included from C:/Users/Major/pokewalker-rom-dumper-master/arm9/source/main.c:11: C:/Users/Major/pokewalker-rom-dumper-master/arm9/include/pw.h:93:79: note: expected 'const uint8_t *' {aka 'const unsigned char *'} but argument is of type 'uint16_t *' {aka 'short unsigned int *'} 93 | bool pw_write_mem(uint32_t sessid, uint16_t addr, size_t size, const uint8_t* data); // 0x06 | ~~~~~~~~~~~~~~~^~~~ make[1]: *** [/opt/devkitpro/devkitARM/base_rules:39: main.o] Error 1 make: *** [Makefile:97: build] Error 2 EDIT: Found the fixes, here they are for those in the future who have the same issue: comment out `#include "nwram.h"` in `arm7/source/template.c` comment out `REG_MBK_PROT=0;//allow ARM9 rw` also in `arm7/source/template.c` and change `&orgBE)) {` to `(const uint8_t*)&orgBE)) {` on line 305 of `arm9/source/main.c` Also, if anyone else had the same issue as me when trying to dump the eeprom, getting stuck on 26*/512 (I forget where exactly it kept failing), then here's a way to assign buttons X and Y to dumping exactly half of the eeprom for each button which you can then combine to get the full eeprom: if (run && (keys & KEY_X) && !(oldkeys & KEY_X)) { if (pw_scan()) { iprintf("ping!\n"); uint32_t sessid; if (pw_do_synack(&sessid)) { //iprintf("got sess! %08lx\n", sessid); // EEPROM dumper FILE* fff = fopen("sd:/eeprom_1.bin", "wb"); if (!fff) { iprintf("can't open file :(\n"); goto Lnop; } for (size_t i = 0; i < 256; ++i) { uint8_t mwahah[0x80]; if (pw_read_eeprom(sessid, i*sizeof mwahah, sizeof mwahah, mwahah)) { iprintf("reading eeprom (%3d/256)\n", i+1); } else { iprintf("read failed :/\n"); break; } fwrite(mwahah, sizeof mwahah, 1, fff); } fclose(fff); //fatUnmount("sd:"); Lnop: if (pw_conn_end(sessid)) iprintf("closed correctly\n"); else iprintf("welp\n"); } else iprintf("can't connect\n"); } else iprintf("no scan results\n"); } if (run && (keys & KEY_Y) && !(oldkeys & KEY_Y)) { if (pw_scan()) { iprintf("ping!\n"); uint32_t sessid; if (pw_do_synack(&sessid)) { //iprintf("got sess! %08lx\n", sessid); // EEPROM dumper FILE* fff = fopen("sd:/eeprom_2.bin", "wb"); if (!fff) { iprintf("can't open file :(\n"); goto Lnop9; } for (size_t i = 256; i < 512; ++i) { uint8_t mwahah[0x80]; if (pw_read_eeprom(sessid, i * sizeof mwahah, sizeof mwahah, mwahah)) { iprintf("reading eeprom (%3d/512)\n", i+1); } else { iprintf("read failed :/\n"); break; } fwrite(mwahah, sizeof mwahah, 1, fff); } fclose(fff); //fatUnmount("sd:"); Lnop9: if (pw_conn_end(sessid)) iprintf("closed correctly\n"); else iprintf("welp\n"); } else iprintf("can't connect\n"); } else iprintf("no scan results\n"); }
×
×
  • Create New...