Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRAM problem? #36

Closed
CristianCG86 opened this issue Apr 12, 2020 · 5 comments
Closed

SRAM problem? #36

CristianCG86 opened this issue Apr 12, 2020 · 5 comments

Comments

@CristianCG86
Copy link

Hello

I'm trying to save progress into SRAM, but using example project "sram" I can't store anything and the emulators not create the SRAM file.

What's I do wrong?

I'm use consoleCopySram function.

Thanks

@hoit
Copy link
Collaborator

hoit commented Apr 12, 2020

Hello,

Do you have sample (minimal) code to reproduce your issue or any error message ?

I guess that it is not a compilation issue ? if you get CHECK_HEADERS during build, you have to set parameters in hdr.asm or rebuild the library:
#8

@CristianCG86
Copy link
Author

I'm trying with sram example project. I compile it, but not works properly.
No, I not get CHECK_HEADERS error during compilation.

@1r3n33
Copy link
Contributor

1r3n33 commented May 20, 2020

Hi @CristianCG86,
I have been able to make the 'sram' example works by following @hoit recommendation.
It has required to change the SRAMSIZE value to $01 in the .SNESHEADER section of hdr.asm files.

I did this in 2 steps:

  1. Modifying the SRAMSIZE value in the pvsneslib/source/hdr.asm file and then rebuild the pvsneslib lib. If you do not do so, you may get a linker error while building the 'sram' example (CHECK_HEADERS: The object files are from different projects).
  2. Modifying the SRAMSIZE value in the snes-examples/sram/hdr.asm file and then rebuild the 'sram' example.

Hope this helps.

@alekmaul
Copy link
Owner

alekmaul commented May 21, 2020

Hi @CristianCG86 & 1r3n33,
YEs, you're right, you need to do such update to have SRAM example to work (sorry for the lack of newss & help :/).
You must know that the hdr file is shared between SNES lib and your rom file, you can't have something different. But, you can update your right after the compilation with the "snestool" tool, include with pvsneslib.
It is named "$(SNTOOLS)" in each makefile, and if I remember well, you have an option to update your rom to allow SRAM support, even if your hdr file in your project (not in the lib) is not configure to do so (but I need to verify this point).

@alekmaul
Copy link
Owner

as we resolved HEADER issues between lib and examples, I close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants