David Brant | 30 Oct 17:51
Favicon

{Spam?} interrupts

Hi All
 
I've been doing a bit coding lately and found something a bit strange. I'm using mode 2 interrupts when I use sim coupe's debugger I get the normal frame interrupt and then a interrupt at line 0 point 52 (real line not SAM coupe line) anyone know whats producing it? The status register(249) holds &FF.
 
Dave
Simon Owen | 30 Oct 18:31
Favicon

Re: interrupts

David Brant wrote:
> I'm using mode 2 interrupts when I use sim coupe's debugger I get the
> normal frame interrupt and then a interrupt at line 0 point 52 (real
> line not SAM coupe line) anyone know whats producing it?

It still sounds most likely to be a re-triggered interrupt, even if the
status port is &FF by the time you check it.  Is your interrupt handler
fairly short? (close to the 128 cycles the interrupt is active for)

If you can e-mail me a test disk image I'll be happy to take a look.

Si

David Brant | 30 Oct 18:54
Favicon

{Spam?} Re: interrupts


----- Original Message ----- 
From: "Simon Owen" <simon.owen@...>
To: <sam-users@...>
Sent: Thursday, October 30, 2008 5:31 PM
Subject: Re: interrupts

> David Brant wrote:
>> I'm using mode 2 interrupts when I use sim coupe's debugger I get the
>> normal frame interrupt and then a interrupt at line 0 point 52 (real
>> line not SAM coupe line) anyone know whats producing it?
>
> It still sounds most likely to be a re-triggered interrupt, even if the
> status port is &FF by the time you check it.  Is your interrupt handler
> fairly short? (close to the 128 cycles the interrupt is active for)
>
> If you can e-mail me a test disk image I'll be happy to take a look.
>
> Si
>

Yes its 76 cycles long, so that must be what's happening. While we are on 
the subject, is there any reason to use RETI over using just RET with 
interrupts. 

Simon Cooke | 30 Oct 19:23

RE: {Spam?} Re: interrupts

IIRC, RETI is used with Mode 2 interrupts to allow for interrupt
daisy-chaining. Unless you've got hardware which uses them to vector
interrupts to a table, you really don't want to use them.

I'm curious.. why are you using Mode 2 interrupts? It's slower than the
regular ones, as it has to look up a vector table instead of just doing an
RST &38.

(Note: I'm incredibly rusty, so I might be completely off base here).

-----Original Message-----
From: owner-sam-users@...
[mailto:owner-sam-users@...] On
Behalf Of David Brant
Sent: Thursday, October 30, 2008 10:55 AM
To: sam-users@...
Subject: {Spam?} Re: interrupts

----- Original Message ----- 
From: "Simon Owen" <simon.owen@...>
To: <sam-users@...>
Sent: Thursday, October 30, 2008 5:31 PM
Subject: Re: interrupts

> David Brant wrote:
>> I'm using mode 2 interrupts when I use sim coupe's debugger I get the
>> normal frame interrupt and then a interrupt at line 0 point 52 (real
>> line not SAM coupe line) anyone know whats producing it?
>
> It still sounds most likely to be a re-triggered interrupt, even if the
> status port is &FF by the time you check it.  Is your interrupt handler
> fairly short? (close to the 128 cycles the interrupt is active for)
>
> If you can e-mail me a test disk image I'll be happy to take a look.
>
> Si
>

Yes its 76 cycles long, so that must be what's happening. While we are on 
the subject, is there any reason to use RETI over using just RET with 
interrupts. 

David Brant | 30 Oct 19:48
Favicon

{Spam?} Re: interrupts


----- Original Message ----- 
From: "Simon Cooke" <simon@...>
To: <sam-users@...>
Sent: Thursday, October 30, 2008 6:23 PM
Subject: RE: {Spam?} Re: interrupts

> IIRC, RETI is used with Mode 2 interrupts to allow for interrupt
> daisy-chaining. Unless you've got hardware which uses them to vector
> interrupts to a table, you really don't want to use them.
>
> I'm curious.. why are you using Mode 2 interrupts? It's slower than the
> regular ones, as it has to look up a vector table instead of just doing an
> RST &38.
>
> (Note: I'm incredibly rusty, so I might be completely off base here).

I'm using mode 2 because my code is/can run external memory to get more 
speed. Based on simcoupe I don't think there is speed problem with mode 2 it 
gets fired before real line 0. But what do I know!

>
> -----Original Message-----
> From: owner-sam-users@...
[mailto:owner-sam-users@...] On
> Behalf Of David Brant
> Sent: Thursday, October 30, 2008 10:55 AM
> To: sam-users@...
> Subject: {Spam?} Re: interrupts
>
>
> ----- Original Message ----- 
> From: "Simon Owen" <simon.owen@...>
> To: <sam-users@...>
> Sent: Thursday, October 30, 2008 5:31 PM
> Subject: Re: interrupts
>
>
>> David Brant wrote:
>>> I'm using mode 2 interrupts when I use sim coupe's debugger I get the
>>> normal frame interrupt and then a interrupt at line 0 point 52 (real
>>> line not SAM coupe line) anyone know whats producing it?
>>
>> It still sounds most likely to be a re-triggered interrupt, even if the
>> status port is &FF by the time you check it.  Is your interrupt handler
>> fairly short? (close to the 128 cycles the interrupt is active for)
>>
>> If you can e-mail me a test disk image I'll be happy to take a look.
>>
>> Si
>>
>
> Yes its 76 cycles long, so that must be what's happening. While we are on
> the subject, is there any reason to use RETI over using just RET with
> interrupts.
> 

David Brant | 31 Oct 09:21
Favicon

{Spam?} Re: interrupts


----- Original Message ----- 
From: "David Brant" <davidcbrant@...>
To: <sam-users@...>
Sent: Thursday, October 30, 2008 6:48 PM
Subject: {Spam?} Re: interrupts

>
> ----- Original Message ----- 
> From: "Simon Cooke" <simon@...>
> To: <sam-users@...>
> Sent: Thursday, October 30, 2008 6:23 PM
> Subject: RE: {Spam?} Re: interrupts
>
>
>> IIRC, RETI is used with Mode 2 interrupts to allow for interrupt
>> daisy-chaining. Unless you've got hardware which uses them to vector
>> interrupts to a table, you really don't want to use them.
>>
>> I'm curious.. why are you using Mode 2 interrupts? It's slower than the
>> regular ones, as it has to look up a vector table instead of just doing 
>> an
>> RST &38.
>>
>> (Note: I'm incredibly rusty, so I might be completely off base here).
>
> I'm using mode 2 because my code is/can run external memory to get more 
> speed. Based on simcoupe I don't think there is speed problem with mode 2 
> it gets fired before real line 0. But what do I know!
>

I've just done a speed test with mode2/mode1 and there is a 0.008% speed 
loss, which probably means a 8 cycles being lost each frame.

>>
>> -----Original Message-----
>> From: owner-sam-users@...
[mailto:owner-sam-users@...] On
>> Behalf Of David Brant
>> Sent: Thursday, October 30, 2008 10:55 AM
>> To: sam-users@...
>> Subject: {Spam?} Re: interrupts
>>
>>
>> ----- Original Message ----- 
>> From: "Simon Owen" <simon.owen@...>
>> To: <sam-users@...>
>> Sent: Thursday, October 30, 2008 5:31 PM
>> Subject: Re: interrupts
>>
>>
>>> David Brant wrote:
>>>> I'm using mode 2 interrupts when I use sim coupe's debugger I get the
>>>> normal frame interrupt and then a interrupt at line 0 point 52 (real
>>>> line not SAM coupe line) anyone know whats producing it?
>>>
>>> It still sounds most likely to be a re-triggered interrupt, even if the
>>> status port is &FF by the time you check it.  Is your interrupt handler
>>> fairly short? (close to the 128 cycles the interrupt is active for)
>>>
>>> If you can e-mail me a test disk image I'll be happy to take a look.
>>>
>>> Si
>>>
>>
>> Yes its 76 cycles long, so that must be what's happening. While we are on
>> the subject, is there any reason to use RETI over using just RET with
>> interrupts.
>>
> 


Gmane