Author Topic: How is saving/loading implemented?  (Read 1935 times)

0 Members and 1 Guest are viewing this topic.

Offline russellsprouts

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
How is saving/loading implemented?
« on: January 11, 2016, 10:23 PM »
I ordered an EverDrive to do some homebrew development. I was wondering how the saving/loading functionality is implemented.

If I understand correctly, while in a game with saves, like Legend of Zelda, for example, you can press a configurable button combination, and it will save the current SRAM to the SD card. So, that means the cartridge must read the button presses, right? Does it patch the NMI handler with its own that reads buttons and then calls the cartridge handler, or is there some other way for the cartridge to detect the current button state?

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3286
  • Karma: +492/-2
    • View Profile
Re: How is saving/loading implemented?
« Reply #1 on: January 11, 2016, 10:51 PM »
Games with save support, like zelda, can save without any buttons combinations. Button combinations only for save states in any time and any place. If cart detects buttons combination, FPGA intercept NMI and inject save state code