Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Homebrew with Battery Back-up RAM

Reply to topic
Author Message
  • Joined: 25 Feb 2023
  • Posts: 99
Reply with quote
Homebrew with Battery Back-up RAM
Post Posted: Thu Aug 17, 2023 12:56 am
Just wondering how to handle save games in homebrew development, as well as where the start and end points of the battery back-up RAM are. I'll need this information later for my FF1 port project, but it doesn't hurt to gather that information now.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Thu Aug 17, 2023 6:16 am
You page in SRAM by writing to $fffc and then you can write in the $8000-$bfff area. That’s it; you just need to decide what to read and write. Typically games ensure the important parts of game RAM are close together and block copy it.

You can also consider just having game state in the save RAM area the whole time.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Dec 2022
  • Posts: 30
Reply with quote
Post Posted: Wed Sep 13, 2023 9:29 pm
CerezaSaturn64 wrote
Just wondering how to handle save games in homebrew development, as well as where the start and end points of the battery back-up RAM are. I'll need this information later for my FF1 port project, but it doesn't hurt to gather that information now.


if you are going the use custom electronics using memory chips with parallel address wiring, , with 1 ROM chip and 1 battery backed up RAM chip, for the cartridge hardware (with no mapper) then you can put the RAM location anywhere from 32K up to 48K. The custom electronics will involve needing some logic to decode the address , if the address is defined as a RAM address it writes or reads to the RAM chip, otherwise it's ROM and it is just read from. In machine code you can use a 16 bit register to read or write to a the RAM address.If you just want to store a few bytes in RAM then you would just fewer address pins on the ROM IC.So for example you may have 4 bytes to store in battery backed up RAM at the end of the 48K,from address 49148 to 49152. and the remainder will be 48K ROM.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!