Re: IIgs Debuggers?



Polymorph wrote:
To: Jerry
Jerry wrote:

Polymorph wrote:


<snip>


Sounds like the main program has bombed but the interrupt service routines
are still going.

Are you directly disabling any interrupts? If so, I hope you are doing it
this way:

php ; save interrupt state
sei ; disable interrupts
... ; do your interrupt-safe things
plp ; restore original interrupt state
...

Still, it's a tricky problem because it's so non-deterministic.


I do disable interrupts on the initial loading of the wavebank into the DOC RAM (this is mandatory), but I do so *exactly* as you have mentioned. After the initial loading of the wavebank, I never disable interrupts again. I deliberately chose MIDI Synth sequences that all share the same instruments and wavebank file - thereby eliminating the need to reload them (in an effort to minimise delays in transitioning from one song to the next).

I think I need to print out my entire code listing and go over it with a fine tooth comb.

The weird thing is, it usually locks up when left for long periods of doing nothing - ie. its just cycling through the main event handler waiting for keyboard/mouse events OR to be notified that Midi Synth playback has stopped (to indicate moving on to the next sequence). I tried introducing delays into the main event loop fearing some kind of timing problem, but these had no impact.

Its definitely an annoying problem, and hard to track down. I will keep persisting however, as it must be something I'm doing (or not doing). The reason I say this is because I can run LemminGS (which also uses Midi Synth) without any problems - although I haven't given LemminGS the same amount of testing time.

Since your code is not interrupt-driven, I assume that all the interrupt
processing is inside MIDI Synth.

It is possible that a race condition exists inside this code. Has it
been well tested when run under acceleration?

-michael

NadaPong: Network game demo for Apple II computers!
Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."
.



Relevant Pages

  • Re: IIgs Debuggers?
    ... Are you directly disabling any interrupts? ... I do disable interrupts on the initial loading of the wavebank into the DOC RAM, but I do so *exactly* as you have mentioned. ... I deliberately chose MIDI Synth sequences that all share the same instruments and wavebank file - thereby eliminating the need to reload them. ...
    (comp.sys.apple2.programmer)
  • Re: sony vaio pcg-gr390
    ... PCI-Only Interrupts: none ... Location Bus Device Pin Link IRQs ... penalty: 1050 ... isa_probe_children: disabling PnP devices ...
    (freebsd-current)
  • Re: [RFC/PATCH] Kdump: Disabling PCI interrupts in capture kernel
    ... I know very little about consoles and their working. ... >> console driver needed interrupts to be enabled at the controller. ... looking at disabling the DMA from the devices. ... interrupt disable bit in PCI-PCI bridge is optional and if implemented, ...
    (Linux-Kernel)
  • Re: [RFC] mmiotrace full patch, preview 1
    ... the "first" probe gets selected and executed. ... kmmio_handler, where-ever it was triggered, executes with interrupts ... enable single-stepping. ... or does disabling interrupts guarantee that? ...
    (Linux-Kernel)
  • Re: Guarantee Critical Regions in Portable code. Portable Semaphores?
    ... Disabling interrupts is the kernel level operation. ... You cannot know it's safe for sure, but a single increment or decrement ... How can the FAT driver know when it is safe to disable the interrupts ...
    (comp.arch.embedded)