#3346 - ZhouChang - Sun Feb 23, 2003 6:16 am
I use multiboot mode, I can download my program into GBA. I want to detecting,erasing,programing flash rom of game pack in GBA directly.I have modify my game card( connecting WR to flash's WR).
I use these code to detecting which chip of flash:
but value always return 0x002E ( " b 0x80000EA ") .
Who have write code to programing falsh in GBA, and how to do it?
I use these code to detecting which chip of flash:
Code: |
#define AMD_MANUFACT 0x00010001 /* AMD manuf. ID in D23..D16, D7..D0 */ #define FUJ_MANUFACT 0x00040004 /* FUJITSU manuf. ID in D23..D16, D7..D0 */ #define STM_MANUFACT 0x00200020 /* STM (Thomson) manuf. ID in D23.. -"- */ #define SST_MANUFACT 0x00BF00BF /* SST manuf. ID in D23..D16, D7..D0 */ #define MT_MANUFACT 0x00890089 /* MT manuf. ID in D23..D16, D7..D0 */ #define INTEL_MANUFACT 0x00890089 /* INTEL manuf. ID in D23..D16, D7..D0 */ #define INTEL_ALT_MANU 0x00B000B0 /* alternate INTEL namufacturer ID */ volatile unsigned short *addr; unsigned short value; addr = (volatile unsigned short *)(0x8000000); addr[0] = 0x00AA ; addr[0] = 0x0055 ; addr[0] = 0x0090 ; /* Read Manufacturer ID */ value = addr[0]; //here may be return manufacter's ID |
but value always return 0x002E ( " b 0x80000EA ") .
Who have write code to programing falsh in GBA, and how to do it?