[Coco] Program won't stay loaded under NitrOS9/OS9

Camillus camillus.b.58 at gmail.com
Sat Jan 2 12:42:42 EST 2016


Hi K.

Just my $0.02 worth. Would it not easier to divide the clock  to 1/2 system clock on your sound chip card. I presume the clock is from the cartridge clock out? Then it would not be that difficult to half the clock rate with some discrete logic. That gives you the freedom of NOT have to mess with the HALT* interrupt. On the other hand if you really draw the card of using interrupts, then why not write a good interrupt handler, and using SWI for example? That code would store the system state on stack, transfer the data to the sound ship and then resume normal operation.  I'm just not feel comfortable with using the *HALT, which to me is just needed to do what it said, HALT. I also do not understand very well why you wait to have the chip done making the noise you want, ( wait states ), because I would presume that the processing in the chip is pretty fast. Well, just some more things to think about...lol 

Success with your future endeavors.

cb    

Sent from Mailbird [http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm_campaign=sent-from-mailbird]
On 1/2/2016 10:37:20 AM, K. Pruitt <pruittk at roadrunner.com> wrote:
Hi Bill,

Executing it from the command line works fine. It's just when it is loaded
it won't say in memory after execution. There are no external calls from
this program. I've created a little sandbox so to speak by shutting off
interrupts. I have tried not turning off interrupts but then the speech gets
terminated prematurely when I do so. Ultimately to be at all useful it will
have to work with interrupts enabled - but that's something for down the
road a bit.

I'm just screwing around with the speech and sound cartridge here and trying
to learn some more about hardware programming. I've pretty much crashed my
CoCo every which way imaginable in the process. I am learning in the process
though.

Here is what I am doing...

The code loads the parameter in to a buffer, turns off the interrupts and
drops the Coco down to 0.89Mhz.. Passes the parameter to the Speech./Sound
cartridge a byte at a time, wastes some time while the cartridge is speaking
and then returns the CoCo to 1.79Mhz, turns the interrupts back on and exits
the program.

Thanks for the info on the link and load stuff. I will explore that area.

Thank you Bill.

----- Original Message -----
From: "Bill Pierce via Coco"
To:
Cc: "Bill Pierce"
Sent: Saturday, January 02, 2016 8:10 AM
Subject: Re: [Coco] Program won't stay loaded under NitrOS9/OS9


> Did you "load" the file before executing it? or just 'run' the file?
> Even calling another module from within a program, it must be loaded first
> to keep it residing in memory and unloaded when finished or it stays in
> memory even after you exit your program.
> There is also another 'undocumented" method of loading that allows you to
> load a module without it's data space being assigned and it will only use
> up the amount of memory equal to the size of the module (as opposed to the
> 8k OS9 assigns on 'load'). It uses the "NMLoad" call which is used the
> same as load. This actually a low level call and has been there for a long
> time, but was never documented in any of the docs. A sister call of
> "NMLoad" is "NMLink" which does the same, but links the file, again, using
> less memory.
> I also have "external" versions of these commands "NMLoad" & "NMLink"
> which are used like "Load" & "Link" from the command line.
>
>
>
>
>
>
> Bill Pierce
> "Charlie stole the handle, and the train it won't stop going, no way to
> slow down!" - Ian Anderson - Jethro Tull
>
>
>
> My Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Co-Contributor, Co-Editor for CocoPedia
> http://www.cocopedia.com/wiki/index.php/Main_Page
> Global Moderator for TRS-80/Tandy Color Computer Forums
> http://www.tandycoco.com/forum/
>
> E-Mail: ooogalapasooo at aol.com
>
>
>
>
>
>
> -----Original Message-----
> From: K. Pruitt
> To: Coco
> Sent: Sat, Jan 2, 2016 10:59 am
> Subject: [Coco] Program won't stay loaded under NitrOS9/OS9
>
> What conditions would cause a module to not stay loaded but remove itself
> from memory after it is executed one time? I'm not generating an error of
> any sort and the system does not destabilize.In my code I am halting the
> interrupts and turning them back on when I am done. Would that cause such
> a scenario to occur? -- Coco mailing
> listCoco at maltedmedia.comhttps://pairlist5.pair.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list