Author Topic: definitely need save state  (Read 11201 times)

RickARM

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: definitely need save state
« Reply #15 on: December 30, 2014, 12:23:56 PM »
I downloaded the reicast source code from github and I would like some help where to find the memory areas and where they are located in the files which are needed to store to implement a save state.

Could someone who has been working with the source code give me some help?

stodag

  • Newbie
  • *
  • Posts: 41
  • Smile today, tomorrow could be worse.
    • View Profile
Re: definitely need save state
« Reply #16 on: December 30, 2014, 07:10:00 PM »
Dont hold ya breath..

skmp

  • omgh4x00rz
  • Administrator
  • Hero Member
  • *****
  • Posts: 30095
  • utopia is a state of mind
    • View Profile
Re: definitely need save state
« Reply #17 on: December 31, 2014, 01:26:18 AM »
@RickArm, in the current state of things it is near impossble. There's no separation between caches, configuration and architectual storage - so you can't just write to a file and load it back.

RickARM

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: definitely need save state
« Reply #18 on: January 08, 2015, 01:04:28 PM »
skmp:
I believe you, but please try to explain for me.

For me each HW component of the emulator (i.e cpu, graphics, memory etc) must have their own reserved memory space while the emulator itself has different memory areas for the emualtion,  configuration etc. By just storing the memory areas of the HW components to a file and reload them must be achievable. However I understand that it might be diffcult to access the memory areas if the architecture is not built for it. Of course it will be difficult for me, as I have not been working with code.

skmp

  • omgh4x00rz
  • Administrator
  • Hero Member
  • *****
  • Posts: 30095
  • utopia is a state of mind
    • View Profile
Re: definitely need save state
« Reply #19 on: January 08, 2015, 05:32:52 PM »
No, many things are merged together (for speed reasons), and in many cases there are copies of the hardware state (also, for speed reasons). And there are a lot of other, complicated issues (RTC, bios/flash missmatch, configuration missmatch, etc). If you really want to try, i'd start by saving ram / vram/ aram. But right now, there's not even a way to cleanly stop the sh4 core to save the sh4 state. You will have to hook it to the sh4 scheduler. To even get anywhere close, you have to be *very* familiar with the nulldc/reicast code.

The main reason things are like that is, I never considered savestates in nullDC, and reicast is designed as "speed above all". Come over on irc for more details if you really want to try this ~

[edit]

#reicast on freenode for irc

RickARM

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: definitely need save state
« Reply #20 on: January 17, 2015, 09:59:32 PM »
skmp:
Thank you for your explanation. I must say that I am really impressed of the emulator, it is really fast and works well, good work.

I consider myself as a quite skilled programmer, but it sounds like this will be very tough and will take a lot of time.

For now, I will put it on ice, but I hope I will have time to check this in couple of months. I hope I can still contact you then.


GtotheA

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: definitely need save state
« Reply #21 on: January 14, 2016, 10:12:47 AM »
Yes needs this.. I got a call and lost bunches..  ??? Now I put my phone in airplane mode.. but that sucks too..