Going off of this:
https://prizm.cemetech.net/index.php?title=Technical_Info
More specifically this section:
Memory
User ROM: 16 MiB
Total ROM: 32 MiB
User RAM: 61 KiB
Total RAM: 2 MiB
I've looked through the rest of the wiki, and the discrepancy between the ROM's (Is rom the right term for this thing?) "User" and "Total" size makes sense, as 16MiB is reserved for system stuff like RAM backups. (I think)
But, what's with the 61KiB vs 2MiB size difference for the RAM? I (seemingly) can't find anything on the wiki that explains why there's such a large difference. So, what is this amazing 2MiB RAM, and why is there a 61KiB chunk cut out for the user?
RAM is where the machine stores what it is currently thinking about. In Casio OSes specifically, the OS usually uses most of the RAM for OS data (e.g. storing what is on the screen, or a buffer for a currently executing program), but generally the user doesn't need to much specifically for RAM, since there's a lot of ROM that your data is stored in by default, the OS allocates its own RAM for other apps or programs that may be running.
I assume 'User RAM' means the RAM directly accessible to the user. You wouldn't really need this like you would in TI calculators because you have a good few megabytes for programs, and all programs (I think), it generally doesn't make a difference whether or not they are executed from RAM.
User RAM is the so-called "main memory" visible in the MEMORY app. It's a sort-of filesystem with data from built-in apps and data from the PROGRAM app (ie. Basic programs). So it covers some standard data plus the data available for Basic programs (which is kind of annoying since when it's full Basic programs have no memory available at all). Its size is 64 kB because it's been that way since the fx-9860G days.
2 MB (or 8 MB in the case of the fx-CG 50) is the size of the RAM chip, which contains a lot more data and is only a vaguely relevant figure for add-ins (which are not able to use it all either).
Waity5 wrote:
But, what's with the 61KiB vs 2MiB size difference for the RAM? I (seemingly) can't find anything on the wiki that explains why there's such a large difference. So, what is this amazing 2MiB RAM, and why is there a 61KiB chunk cut out for the user?
I think there are historical reasons. Look back to the very old calculators, their total RAM size and RAM space available for user: fx7000 (2KB/422B), fx7700GB (8KB/4228B), cfx9850G (40KB/24KB).
Software of these calculators were developed to get every possible functionality from HW of that time. The SW developers were masters, the code was optimised, the UI response was realtime on very slow CPU (e.g. 2MHz)
At that time the RAM file system was developed, where every entity (file) got 16 bit offset (or pointer) to its start and another 16 bit value for its size.It worked beautifully for devices with RAM up to 64KB
But then, later, new models were introduced, like fx 9860G or fx cg. The SW is clearly written by another SW team, the UI response is visibly slower comparing to the older models, but the HW is faster. Yes, fx cg has colours, so there is some overhead, but the HW is more powerful, so there is no reason to be slower.
And I think (yes, it is only my theory), that the new SW team was afraid to update the RAM filesystem for new HW and they kept the old 16 bits pointers / sizes. So that is the reason, why we have only 60KB RAM for user on 8MB device.
And then there was another group of calculators, e.g. AFX 2.0+, where another SW team was involved, UI is different (more like on the TI calculators). The calculator has 256KB RAM and 144KB is for user.
So the 64KB limit is:
- political decision
- inability of the SW develpers
Pick one
Lephe wrote:
User RAM is the so-called "main memory" visible in the MEMORY app. It's a sort-of filesystem with data from built-in apps and data from the PROGRAM app (ie. Basic programs). So it covers some standard data plus the data available for Basic programs (which is kind of annoying since when it's full Basic programs have no memory available at all). Its size is 64 kB because it's been that way since the fx-9860G days.
2 MB (or 8 MB in the case of the fx-CG 50) is the size of the RAM chip, which contains a lot more data and is only a vaguely relevant figure for add-ins (which are not able to use it all either).
Actually memory space beyond 0x8C200000 can be used,and seems works fine(On CG50 only,I don't know wheather it would cause some unexpected problems or even damage something),that's about 6MiB of useable memory.It seems that offical python addin uses these space to allocate heap(3MiB used,from debug mode)
jeff31415 wrote:
Lephe wrote:
User RAM is the so-called "main memory" visible in the MEMORY app. It's a sort-of filesystem with data from built-in apps and data from the PROGRAM app (ie. Basic programs). So it covers some standard data plus the data available for Basic programs (which is kind of annoying since when it's full Basic programs have no memory available at all). Its size is 64 kB because it's been that way since the fx-9860G days.
2 MB (or 8 MB in the case of the fx-CG 50) is the size of the RAM chip, which contains a lot more data and is only a vaguely relevant figure for add-ins (which are not able to use it all either).
Actually memory space beyond 0x8C200000 can be used,and seems works fine(On CG50 only,I don't know wheather it would cause some unexpected problems or even damage something),that's about 6MiB of useable memory.It seems that offical python addin uses these space to allocate heap(3MiB used,from debug mode)
Cool! How did you discover that Python is using it?
Some details, if I may: a region of 3 MB is used as heap specifically when starting the Python app. circuit10 traced it down to the OS code that prepares the heap. And you can see the debug menu show it if you boot the calculator while the Python app is running.
One "problem" is that the region in question is just after 0x8C200000, but there is still data at the end of the RAM that, AFAIK, no one has yet explained the purpose.
It is likely that CASIO will use this memory in the future, at which point add-ins that blindly write into the area will create problems. We had this exact problem with the G-III, which started using pre-existing memory that used to be free on previous models.
So right now this area is indeed usable, and a number of projects have been using it with no issues, making it an awesome opportunity for programs. But I advocate for guarding its use by an OS version check to avoid future breakage when CASIO eventually uses it.
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
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