Decompile and set CFLAGS for SRAM library #2

Open
patat wants to merge 2 commits from sram into master
Owner
No description provided.
@ -107,3 +107,3 @@
COMMON_DATA void (*read_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
COMMON_DATA void (*write_int_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
COMMON_DATA void (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
COMMON_DATA const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
Collaborator
- COMMON_DATA const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
+ COMMON_DATA const u8 *(*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL;
```diff - COMMON_DATA const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL; + COMMON_DATA const u8 *(*verify_sram_fast)(const u8 *src, u8 *dest, u32 size) = NULL; ```
@ -24,3 +24,2 @@
// (https://decomp.me/scratch/qFu1X)
#include "asm/lib_sram/asm_0804c96c.s"
void write_sram_fast(const u8 *src, u8 *dest, u32 size) { // r4, r6, r5
Collaborator

Remove the comment

Remove the comment
@ -25,2 +25,2 @@
// (https://decomp.me/scratch/qFu1X)
#include "asm/lib_sram/asm_0804c96c.s"
void write_sram_fast(const u8 *src, u8 *dest, u32 size) { // r4, r6, r5
u32 words; // r7
Collaborator

Same as above

Same as above
@ -30,0 +50,4 @@
}
}
const u8* verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size) {
Collaborator
- const u8* verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size) { 
+ const u8 *verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size) { 
```diff - const u8* verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size) { + const u8 *verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size) { ```
@ -30,0 +54,4 @@
REG_WAITCNT = (REG_WAITCNT & 0xfffc) | 3;
size -= 1;
for (;size != -1; size--) {
Collaborator
-     for (;size != -1; size--) { 
+     for (; size != -1; size--) { 
```diff - for (;size != -1; size--) { + for (; size != -1; size--) { ```
@ -30,0 +56,4 @@
size -= 1;
for (;size != -1; size--) {
if (*dest++ != *src++) {
return dest-1;
Collaborator
-             return dest-1; 
+             return dest - 1;
```diff - return dest-1; + return dest - 1; ```
@ -30,0 +102,4 @@
REG_WAITCNT = (REG_WAITCNT & ~3) | 3;
}
const u8* write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) {
Collaborator
- const u8* write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) { 
+ const u8 *write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) { 
```diff - const u8* write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) { + const u8 *write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) { ```
@ -30,0 +104,4 @@
const u8* write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size) {
u8 attempts = 0;
const u8* verify_result;
Collaborator
-     const u8* verify_result; 
+     const u8 *verify_result;
```diff - const u8* verify_result; + const u8 *verify_result; ```
@ -14,1 +12,3 @@
extern void (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to verify_sram_fast_code
extern void (*read_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to read_sram_fast_code
extern void (*write_int_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to write_int_sram_fast_code
extern const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to verify_sram_fast_code
Collaborator
- extern const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size);    // Pointer to verify_sram_fast_code
+ extern const u8 *(*verify_sram_fast)(const u8 *src, u8 *dest, u32 size);    // Pointer to verify_sram_fast_code
```diff - extern const u8* (*verify_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to verify_sram_fast_code + extern const u8 *(*verify_sram_fast)(const u8 *src, u8 *dest, u32 size); // Pointer to verify_sram_fast_code ```
@ -18,1 +16,3 @@
extern u32 verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size); // Verify SRAM (Fast)
extern void read_sram_fast_rom(const u8 *src, u8 *dest, u32 size); // Read SRAM (Fast)
extern void write_sram_fast(const u8 *src, u8 *dest, u32 size); // Write SRAM (Fast)
extern const u8* verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size); // Verify SRAM (Fast)
Collaborator

Same as above

Same as above
@ -19,2 +18,3 @@
extern const u8* verify_sram_fast_rom(const u8 *src, u8 *dest, u32 size); // Verify SRAM (Fast)
extern void set_sram_fast_func(void); // Set SRAM (Fast) Functions
extern u32 write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size); // Write and Verify SRAM (Fast)
extern const u8* write_and_verify_sram_fast(const u8 *src, u8 *dest, u32 size); // Write and Verify SRAM (Fast)
Collaborator

Same as above

Same as above
Collaborator

Additionally, replace all the 3s that appear in REG_WAITCNT accesses with WAITCNT_SRAM_8:

#define WAITCNT_SRAM_8 (3 << 0)

Additionally, replace all the `3`s that appear in `REG_WAITCNT` accesses with `WAITCNT_SRAM_8`: https://git.thealtdoc.fr/patat/rhythmtengoku/src/commit/9db6f8a0c3f01b31e1eff3541722b43d22894067/include/gba/gba_interrupt_regs.h#L30
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin sram:sram
git switch sram

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff sram
git switch sram
git rebase master
git switch master
git merge --ff-only sram
git switch sram
git rebase master
git switch master
git merge --no-ff sram
git switch master
git merge --squash sram
git switch master
git merge --ff-only sram
git switch master
git merge sram
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
patat/rhythmtengoku!2
No description provided.