[Coco] VCC and my code tinkering.
Kip Koon
computerdoc at sc.rr.com
Tue Jul 25 03:48:56 EDT 2017
Hi Walter,
That is very interesting. I did not know some of that. Thank you for sharing these discoveries you made and learned. I knew that it was possible for the Coco MMU to map the same page of memory in multiple areas of the 64KB memory map. I was just not aware of the fact that this happened between the CPU and the GIME millions of times per second for every instruction! Wow! Our little Coco is quite busy switching memory pages!
My blood sugar bottomed and as I have just eaten to take care of this, I find this information very interesting to try to process mentally. Typing is also quite interesting to accomplish with my hands shaking as they are. :) I guess I'll stop for now since I'm having to correct a lot of mistakes as I go on in this email. It's interesting to say the least. Oh wow, my mind just slowed waaay down for a moment. Hmmm. I think I need some more food. See ya! :) Keep up to great work and thank you for sharing! Take care my friend.
Kip Koon
computerdoc at sc.rr.com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Walter Zambotti
Sent: Tuesday, July 25, 2017 2:36 AM
To: 'CoCoList for Color Computer Enthusiasts'
Subject: [Coco] VCC and my code tinkering.
For anyone interested.
I have just finished integrating Windows Address Windowing Extensions with VCC.
Window AWE allows the user to control which pages of physical memory are mapped into virtual memory.
Or in other words it is a memory paging management device similar to the CoCo MMU unit.
My goal was to determine if using hardware memory management would speed up the VCC emulator (which currently only uses software) for Windows users only.
The bottom line is I got it going but it slows down the emulator by about 50%. (So half the speed)
The primary reason is because the CoCo MMU allows the same page of memory to be mapped into different memory banks multiple times simultaneously and AWE does not allow this.
I managed to overcome this limitation in AWE by allowing memory access violations to occur and used exception traps to remap the banks in real time to where they were needed.
This is fine if accesses to multiply mapped pages are scarce. But as I found out they can occur on every single instruction (millions of times per second).
This results in page trashing.
The second problem related to the first is because AWE does not allow the same page to be mapped multiple times the CPU will have one map of memory (64K) but at the same time the GPU in the GIME needs to access the same pages in its own memory map. This results in pages being swapped everytime the GIME and the CPU wants to share memory (and they do all the time).
The only positive thing was I gained a better understanding of how the CoCo hardware works and how VCC emulates it!
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list