Missed Interrupts with DI+IM2 in assembly

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Missed Interrupts with DI+IM2 in assembly

Post by Ralf »

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 ;)
User avatar
1024MAK
Bugaboo
Posts: 3104
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 »

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
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Missed Interrupts with DI+IM2 in assembly

Post by Ast A. Moore »

1024MAK wrote: Sun Nov 26, 2017 7:12 pm
Ast A. Moore wrote: Sun Nov 26, 2017 12:46 pm 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.
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