You are free to decide which implementation to use when programming (link to which library / object), so this is a doc on that.
For those who have no idea of that function:
Entry address in GBAFE
- FE6: 809F990
- FE7J: 80C0ADC
- FE7U: 80BFF98
- FE8J: 80D6908
- FE8U: 80D1C0C
Note:
It is the same implementation as that in newlib.
C implementation examples for platform independency
Assembly implementation examples for CPU level optimization
Note:
arm-none-eabi tool chain uses newlib, and it doesn’t have an assembly optimization for ARMv4T used in GBA:
newlib-3.0.0# find . -name ‘memcpy*’ | grep arm
./newlib/libc/machine/arm/memcpy-armv7m.S
./newlib/libc/machine/arm/memcpy-armv7a.S
./newlib/libc/machine/arm/memcpy-stub.c
./newlib/libc/machine/arm/memcpy.S
GBA platform memory copy functions
Note:
- libtonc and libgba come with devkitpro
- libagb come with Nintendo AGB SDK
Compiler doc
- GCC
- ARMCC