Intruptroutine called from screenline

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Intruptroutine called from screenline

Post by dr beep »

As I was working on my calculation game I was wondering if I could trap an intrupt without setting a full routine with IX.

I came up with this:"
I skipped the display of the final screenline but made a JP to my own routine.
This routine now does something during screenupdate, it changes the first character on the screen.
You can do whatever you like, but I like the idea of offering 1 display line to do a small intrupt routine.

Anyone ever seen or used this before????
intruptlowres.png
(32.15 KiB) Downloaded 219 times
The running version:
test.p
(150 Bytes) Downloaded 138 times
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Intruptroutine called from screenline

Post by dr beep »

As I recall, the GUUS FLATER hires is called in this way, but it only does a hires screen.

This however is a cheap method to start with a lowres screen and continue with a hires screen.

As I recall..... ZXPAND could have problems with this method.
It was in 2011 the reason why I start using IX, but I like this more.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Intruptroutine called from screenline

Post by PokeMon »

Yes, it is possible and I used this for test purposes when testing M1NOT implementation. There is a restriction in your routine that it has to fit in less than 200 clock cycles or you switch NMI on manually. This would maybe the better choice as your code can be up to 30 lines (30*207 clock cycles) when supporting NTSC mode as well. And your code must run below 32k as long as there is no M1NOT installed.

It is unclear why ZXpand should have a problem with it. I think it will run on ZXblast properly. Indeed it is a big advantage in my eyes not to change IX register and will probably run with other hardware/software.
Post Reply