Is there a system call for the above or some work around please?

Or even better something listing visible on the main menu add-ins with their display names and in what order they are displayed at all?

Many thanks in advance if you could point me in the right direction.
I'm not sure about such a syscall, but I think you'd be able to scan the storage memory, looking for the files having the .g3a extension. This is documented on the wiki on the file system section I think. Wink

But that will just list them, to see their displayed name using this method, you'll need to open them ans look on the header of each. And about the display order I don't know.

But there's perheaps a simpler solution using, as you said, syscall, but I'm not aware of a such zone…
Many thanks for those thoughs, i was thinking of having this initiatially too just for the count but then there could be an issue with some add-ins being not valid for main menu display so was hoping for something more reliable and hopefully covering the order bit as well. Hopefully someone knows if the order is listed somewhere in the memory...
Gbl08ma posted somewhere that memory address 0xA80CCE18 holds registered add-in list - at least on os 1.04 version but it seems to change with os version as far as i can see - I would love to have a system call for finding this list if someone is knowledgeable in how to find it please
Simon Lothar on Casiopeia kindly helped me so in my G-Clock add-in instead of just counting g3a files in storage

Code:
typedef struct {
   unsigned short id, type;
   unsigned long fsize, dsize;
   unsigned int property;
   unsigned long address;
} file_type_t;
int g3a_count() {
   unsigned short filename[0x10A];
   unsigned short found[0x10A];
   file_type_t fileinfo;
   int findhandle;
   int ret;
   Bfile_StrToName_ncpy(filename,"\\\\fls0\\*.g3a", 0x10A);
   ret = Bfile_FindFirst_NON_SMEM((const char*)filename, &findhandle, (char*)found, &fileinfo);
   int totalsize = 1;
   while(!ret) {
      ++totalsize;
      ret = Bfile_FindNext_NON_SMEM(findhandle, (char*)found, (char*)&fileinfo);
   }
   Bfile_FindClose(findhandle);
   return totalsize;
}

I now use the following based on his suggestions

Code:
   unsigned int VRAM2;
   VRAM2 = getSecondaryVramAddress();
   VRAM2 += 0x28800;
   int z = 1;
   while (*(char*)VRAM2 != '@') {
      VRAM2++;
   }
   while (*(char*)VRAM2 == '@') {
      z++;
      VRAM2 += 12;
   }
and it works well

Thanks, Simon
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement