Missed Interrupts with DI+IM2 in assembly

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Ralf
Manic Miner
Posts: 878
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Missed Interrupts with DI+IM2 in assembly

Post by Ralf » Sun Nov 26, 2017 1:07 pm

And I'd like to add one more, maybe obvious thing - you don't have to play music in interrupt routine :)

You can do it anywhere in your code, just do it during each frame. Some purists may say that if you call music player sometimes at frame beginning and sometimes at frame end then there would be loss of music quality. But I did it in my games before and nobody noticed and complained ;)
0 x

User avatar
1024MAK
Manic Miner
Posts: 212
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Missed Interrupts with DI+IM2 in assembly

Post by 1024MAK » Sun Nov 26, 2017 7:12 pm

Ast A. Moore wrote:
Sun Nov 26, 2017 12:46 pm
1024MAK wrote:
Sun Nov 26, 2017 12:27 pm
The Z80 CPU will only detect a maskable (normal) interrupt when it samples the /INT pin at the end of an instruction (assuming that /RESET, /BUSRQ and /NMI are all inactive
Tut-tut. Use the Force (of BBCode), Mark. It’s INT, RESET, BUSRQ, and NMI. :D
Yeah, I know :?
But I composed this post off-line in a text editer. Then had to post in a rush, as channel 4's formula 1 coverage was about to start and I had a few other things to do before sitting down to watch it and eat lunch...

Mark
0 x

User avatar
Ast A. Moore
Manic Miner
Posts: 719
Joined: Mon Nov 13, 2017 3:16 pm

Re: Missed Interrupts with DI+IM2 in assembly

Post by Ast A. Moore » Sun Nov 26, 2017 7:53 pm

1024MAK wrote:
Sun Nov 26, 2017 7:12 pm
Ast A. Moore wrote:
Sun Nov 26, 2017 12:46 pm
1024MAK wrote:
Sun Nov 26, 2017 12:27 pm
The Z80 CPU will only detect a maskable (normal) interrupt when it samples the /INT pin at the end of an instruction (assuming that /RESET, /BUSRQ and /NMI are all inactive
Tut-tut. Use the Force (of BBCode), Mark. It’s INT, RESET, BUSRQ, and NMI. :D
Yeah, I know :?
But I composed this post off-line in a text editer. Then had to post in a rush, as channel 4's formula 1 coverage was about to start and I had a few other things to do before sitting down to watch it and eat lunch...

Mark
You humans are so weird. You watch TV and each lunch. So bizarre.
0 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

Post Reply