[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] strange memory violation

søn, 06,.11.2005 kl. 12.39 +0100, skrev Miro Kropacek:
> > And I second this more than I can express! This kind of programming is
> >just plain unacceptable! Please read up on how to write clean programs!
> >Sorry to say, I'm extremely not, _not_, _NOT!_ interested in seeing such
> >software on MiNT.
> >
> >
> >  
> >
> This is maybe true but let advice me - how to measure some EXACT number 
> in the other way than use of some free timer interrupt? And what about 
> players for MODs etc? It's easy to say "you're doing bad things" but 
> what about some solution? It's impossible to not use some divide 
> interrupts for such kind of software... So how about it? Is there some 
> clean way how to hook on vbl/timer or we can expect all software using 
> this as memory protection incompatible?
> Don't get me wrong, my target isn't to upset some OS developers but I'm 
> looking for some solution.

 First you need to know that what works on TOS, MagiC, etc., will not
work on MiNT (may work without MP, but such stuff is the root of
unstable system).

 'hooking onto vbl/timer' in itself is not clean, so it is impossible to
cleanly hook into vbl/timer ;-)

 Your method above will work, if you place your code into supervisor
readable memory. This because the memory in which the interrupt service
function resides must be available when the interrupt triggers. This is
extremely not recommended, and I really hope you wont do that!

 The optimal solution would be to write a device driver (XDD) to play
the modules. Then you have much larger control, the player would be
available to any application via /dev/mod, for example, into which you
can write the modfile you want to play .. and it plays. If you want your
player to work on non-MiNT machines, you would need to write two version
of your app. The MiNT version would consist of a 'modplay.xdd' and your
player application, whereas the other version will be 'normal'. Perhaps
Konrad has a few more hints on this .. Konrad?

 Btw, exactly why do you need Timer D?

 Best Regards,
Odd Skancke