I found a solution that I think works on both the fx-CG10/20 and the fx-CG50. I'm using the onchip memory to hold a line buffer. I got the idea when looking at how tswilliamson does it in his prizoop program.

Please re-download the program from: https://github.com/ComputerNerd/Casio-ImageView/blob/master/PNGviewer.7z
and test again.

Also I updated the version of Libpng so it's very important you update for security reasons as well as they've probably fixed a lot since you've last downloaded.

Also it now draws the image as it's decoding. For some reason it makes the program feel a lot faster even if it's still about the same speed.
What do you mean DMA from virtual address space to physical address space? The DMA bypasses the MMU, there is no such thing as using the DMA in the virtual address space. I support there might be some confusion because some of the on-chip memory (ILRAM) is accessed through the DMA using the same address as the CPU virtual address, but this is just a convention.
ProgrammerNerd wrote:
I found a solution that I think works on both the fx-CG10/20 and the fx-CG50. I'm using the onchip memory to hold a line buffer. I got the idea when looking at how tswilliamson does it in his prizoop program.

Please re-download the program from: https://github.com/ComputerNerd/Casio-ImageView/blob/master/PNGviewer.7z
and test again.

Also I updated the version of Libpng so it's very important you update for security reasons as well as they've probably fixed a lot since you've last downloaded.

Also it now draws the image as it's decoding. For some reason it makes the program feel a lot faster even if it's still about the same speed.

Thanks - do you want it tested on both fx-cg 20 and 50? I have both but batteries are dead - will start with fx-cg50 once I have batteries hopefully tomorrow. Thanks again
Lephe,
What I meant was pretty much nothing. At the time I thought there might have been a small chance that I could use a virtual address as the source but now that you've mentioned that the DMA controller bypasses the MMU I now understand that there is not even a chance. I'd have to do something like this:

Code:

Address of buffer - Start of virtualized address + start of the physical address that corresponds to "Start of virtualized address"


I would have done this except I could not find what the fx-CG50 uses as the physical address. On the fx-CG10/20 I know it works like this:

Code:

0x88160000 (physical) -> 0x08100000 (virtual)

I could have decided what physical address to use based on the system call which returns the VRAM address.

amazonka,
I welcome all testing although I should mention I've already tried it on the fx-CG10 which is pretty much the same as the fx-CG20. It worked on my calculator.
Sorry I did not realize it was an older message! I should check the dates when reading back topics. >_<

The physical address has changed on the fx-CG 50 too, since the start of RAM is now at 0x8c000000. Fortunately this kind of things we know how to do properly now, here is for example an implementation for the SH7305 (which translates at page-level). We can simply read the TLB to find out, and the OS keeps the 8 pages of RAM constantly in the TLB, shuffling the 55/56 others for the add-in code at 0x00300000.

The VRAM address returned by the syscall (as well as the hardoded values) are already physical (since they're in P2), which makes things a bit simpler.

I've tested the PNG viewer, it's super nice! Porting zlib and libpng is a good idea. It feels good to catch up on existing projects here Very Happy

I've noticed two minor things: screen edge is not always restored after showing a fullscreen image, and the file browser cursor get confused after returning to the menu.
I have a CASIO fx-CG50; I could test if this works properly on it
I am grateful for your offer however you might want to hold off on that temporarily. The reason why is because I discovered a possible issue with the file browser. Somewhat similar code may have messed up my calculator. Until we can get more information on what's going on I'd be worried about running 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
Page 2 of 2
» 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