biggun wrote:
Question was: Can trashing Chipmem trash the system
Answer: Yes.
There is more than pictures in chipmem.
For example, there are Copperlist in chipmem.
If you thrash the copper list then the copper couldeven *fuck* up the Disk DMA.
In Chipmem could be IO buffers where disk-IO read/writes too.
Why not simply have a CustomChip.lbrary (obviously a better name would need to be chosen), which has functions for reading or writing to the chipset registers... that would act as a simple and suitable hal...
The problem is not the access alone.
Example:
You have programm which has a IO buffer at address $10000
The program calls an disk function to load data into this buffer the program has a typo in this call and ask to load to address $40000 instead.
"Kabunga !" Your IO-call now screws-up the program at this address.
Solution: The IO routine needs to have a list of all memory block belonging to your program it needs to compare your address and length with all entries in this list to verify that your DMA request will actually go to your block.
Will this be fast?
Same example:
You want to use the blitter to draw ONE! Char on the screen.
Same risk : Instead blitting into your buffer you could sénd a wrong adresss and the blitter will bit unto someoneelse memory.
Solution:
The blit function will now need to compare your address ptr and length will all memory blocks belonging to your programm.
Effect: Checking if the pointer are in legal ranges takes a lot of time. Much more time than using the blitter saves.
The orignal AMIGA allowed usage of DMA and Blitter to accelerate the system.
If you need to check ranges for each blitter call the overhead will be HUUGEE!
Yeah, I didn't mean for memory protection, as you already know and I already pointed out in my Email you would need the OS to mediate all hardware access if you want Memory Protection! What I was meaning as a simple software level arbitor to allow lowlevel access but with a bit more flexibility... locking registers, allowing a slight hardware changes without worrying about compatibilty problems etc. simple stuff... but I know, it goes against your hardware banging :-)