Rockbox mail archiveSubject: RE: Resume fetaure using the RTC to stor the resume point ?
RE: Resume fetaure using the RTC to stor the resume point ?
From: Nielsen Linus (ext) <"Nielsen>
Date: Fri, 26 Jul 2002 11:55:57 +0200
> Hi all,
> I'd like to know if it is possible to use the RTC driver to
> store the last file position ?
> I mean to be able to resume a file play after shutting down the AJR.
> So there are many questions :
> - how many memory still available in the RTC ?
The total RTC memory is 44 bytes, and ce currently use 18 of them.
> - how many memory do we need to store the last position
> to resume it ? store the file path and the file offset.
Storing the file path is out of the question, since that would require 260
bytes of memory to be able to store the maximum allowed filename. The file
offset, on the other hand, takes only 4 bytes.
I think the best solution would be to store the filename/offset in a sector
on disk, or even a file. Then we can also store things like the playlist
name, playlist index and random seed, to be able to continue even in a
However, we don't have any file write support in our filesystem drivers yet.
We will have to resort to raw sector writes, and that gives another
question: which sector to use.
When the hard disk is partitioned, there are lots of unused sectors we can
save to, between the MBR and the start of the first partition. The stock
Archos firmware use those on the Player to save settings. However, if the
drive has no partition table we are in trouble.
A good approach to start with would be to save the resume information in
sector 60 at regular intervals, let's say every time the disk spins up to
get more MP3 data. Those with unpartitioned hard drives will have to live
without resume until we have file write support.
The beauty of this solution is also that we can have the same solution on
both Player and Recorder.
Received on 2002-07-26