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

Re: [MiNT] strange memory violation




Hmm, I see my dumb question started quite nice discussion :)

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).

All your arguments come from the fact _if_ my software crash it will hang the system. I agree, it isn't the good practice but let's say on some alternative:

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?

and let's add the comment about /dev/audio. And for let's say XMs we need /dev/xm and for S3M /dev/s3m. So this will lead us to /dev/modplayer (I remember some library with similar functionality, libmikmod?) and we've got what? General-purpose mod player? And what is the difference between 'normal' app and this one? NONE. Ask you why? Since if (again that if) my kernel module crash, it will hang whole system (since it modifies important HW registers) and we're in the beginning. So I think good approach isn't to avoid supervisor oriented applications completely but to write safe and public (open) code so everyone can track bugs.

Of course I don't say kernel modules aren't better but show me a guy who will take every replay routine, adapt it to kernel module, do the interface to it and then make another, separate version for TOS/MagiC/MiNT-NP. So theory is maybe nice thing but we have to think in the range of our possibilities.

Btw, exactly why do you need Timer D?

I use it in demos since it's free timer in (nearly) every case since A is for DMA/samples tracking, B for HBL and C for AES (iirc).

--

----------------------------------------------------------------------------
MiKRO         Atari XE/XL/Mega STE/Falcon060          http://mikro.atari.org
----------------------------------------------------------------------------