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

Improve documentation of some SRAM routines #114

Merged
merged 4 commits into from
Jun 27, 2024
Merged

Conversation

SatoMew
Copy link
Contributor

@SatoMew SatoMew commented Jan 21, 2024

The original names for the routines come from these commits: 6faafde and 4571f81. They are a bit confusing since Yellow doesn't have an RTC.

This PR also syncs pokeyellow with pokegold and pokecrystal a bit.

engine/movie/oak_speech/oak_speech.asm Show resolved Hide resolved
engine/movie/hall_of_fame.asm Show resolved Hide resolved
engine/menus/save.asm Outdated Show resolved Hide resolved
engine/menus/save.asm Outdated Show resolved Hide resolved
engine/menus/save.asm Outdated Show resolved Hide resolved
engine/menus/save.asm Outdated Show resolved Hide resolved
@SatoMew
Copy link
Contributor Author

SatoMew commented Jan 21, 2024

@Rangi42 Thanks, I implemented your suggestions. Did I understand them correctly?

@SatoMew
Copy link
Contributor Author

SatoMew commented Jan 21, 2024

Should ld a, $1 here be ld a, SRAM_BANKING_MODE or ld a, BANK("Save Data")? This will later be synced with pokered, too.

CheckForPlayerNameInSRAM:
; Check if the player name data in SRAM has a string terminator character
; (indicating that a name may have been saved there) and return whether it does
; in carry.
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
ld [MBC1SRamBankingMode], a
ld [MBC1SRamBank], a
ld b, NAME_LENGTH
ld hl, sPlayerName

@aaaaaa123456789
Copy link
Contributor

  ld a, SRAM_BANKING_MODE
  ld [MBC1SRamBankingMode], a
  assert SRAM_BANKING_MODE == BANK("Save Data")
  ld [MBC1SRamBank], a

@SatoMew
Copy link
Contributor Author

SatoMew commented Jun 15, 2024

Thank you, that's an elegant solution! ^^

engine/movie/hall_of_fame.asm Outdated Show resolved Hide resolved
engine/movie/oak_speech/oak_speech.asm Outdated Show resolved Hide resolved
@SatoMew
Copy link
Contributor Author

SatoMew commented Jun 22, 2024

@dannye Done, thanks.

@dannye dannye merged commit 57bec62 into pret:master Jun 27, 2024
1 check passed
@SatoMew SatoMew deleted the sram branch June 27, 2024 07:33
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

Successfully merging this pull request may close these issues.

None yet

5 participants