Piru wrote:
Actually there are several problems here. Processes pass memory between each other, and there even is concept of orphan memory in AmigaOS. Also, various memory is accessed by multiple processes at the same time. Thus, this doesn't work.
When do these things happen? Do they go through the OS to do it? If so, could patch those functions too. Of course only shared Chip RAM is a problem - fast ram would be unaffected. Don't know why programs would communicate via chip ram, unless they're sharing graphics or sound.
"How can you know if blitter isn't currently working on the memory?"
Call Ownblit() and Waitblit().
"How can you tell that audio hardware isn't playing sample from the memory?"
You're supposed to tell the OS you want to use it, but I guess not everyone bothers (I don't). In any event, it's only of aesthetic, rather than functional, consequence. (Might make unexpected noises but it isn't going to crash).
"How can you tell that custom display (poking hardware directly) isn't using the memory for planes and copper list? "
That's a bit naughty isn't it? "Proper" applications wouldn't do this. Games do, but you'd have to be on the workbench screen anyway to run the task manager, and the workbench manages its own copper lists. Must remember not to put the workbench to sleep...
"How can you tell that floppy DMA isn't currently reading to or writing from the memory?"
I'll have to look into that.