Vertical screen interrupt

Anything QL Software or Programming Related.
Post Reply
User avatar
radastan
ROM Dongle
Posts: 46
Joined: Sat Jan 11, 2014 8:11 pm

Vertical screen interrupt

Post by radastan »

Hi all,

¿How can we use vertical screen interrupt in QL? there is an interrupt on every vertical retrace, ¿how can I redirect interrupt to my routine?

When vertical screen retrace happens we have for some time full power of 68000 CPU and memory, and is interesting for trace on screen graphics with no flikering.


User avatar
tofro
Font of All Knowledge
Posts: 2701
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Vertical screen interrupt

Post by tofro »

radastan,

there isn't exactly what you're looking for. (Like an interrupt vector you could bend to point to exclusively call your own routine)

The 50Hz interrupt is basically the engine driving the QDOS multi-tasking and hardware interrupt handling, so anything fiddling with it is close to heart surgery ;)

You can, however, have a look at the Polled interrupt list (pointed to by the SV_PLIST system variable) which is called by the OS in a response to the vertical retrace interrupt of the screen.

The system call MT.LPOLL links a routine into that chain of routines, the routine would then be called in 50Hz intervals. You might, however, want to make sure your routine is called as one of the first in this chain (I am not sure whether MT.LPOLL will link in your handler at the beginning or end of that chain - Would assume it is the start, but have not tested it yet.)

There is an interesting page here (not mine) http://omega.webnode.com/products/sincl ... ithvide-2/ that illustrates some experiments with that.

Regards,
Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
radastan
ROM Dongle
Posts: 46
Joined: Sat Jan 11, 2014 8:11 pm

Re: Vertical screen interrupt

Post by radastan »

In a game, with no return to QDOS, I don't need multitasking. I need full 68000 horsepower, full QL access, no interruptions to code not needed.


User avatar
tofro
Font of All Knowledge
Posts: 2701
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Vertical screen interrupt

Post by tofro »

Agreed.

The web page I pointed you to describes exactly that minimum of the system you need to keep "alive" to achieve what you want - Remember the Vectors to the ISRs are in ROM that you cannot modify, so you need to live at least with some OS code handled to get your hooks called.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
RWAP
RWAP Master
Posts: 2837
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Vertical screen interrupt

Post by RWAP »

That web page is really good actually - originally QL games just disable the interrupts and store a second screen over the top of the system variables ($28000 on an original QL).

Disabling interrupts works fine but you have no access to some of the QL facilities (system variables).

Also please remember that the QL screen and system variables are not necessarily stored at $20000 and $28000 !!


User avatar
radastan
ROM Dongle
Posts: 46
Joined: Sat Jan 11, 2014 8:11 pm

Re: Vertical screen interrupt

Post by radastan »

RWAP wrote: Disabling interrupts works fine but you have no access to some of the QL facilities (system variables).

Also please remember that the QL screen and system variables are not necessarily stored at $20000 and $28000 !!
Actually I only works in assembly (Easy68K), and I don't need ROM.

¿How can I know where is screen and second screen on memory? I only use $20000 screen actually.


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Vertical screen interrupt

Post by dilwyn »

radastan wrote:
RWAP wrote: Disabling interrupts works fine but you have no access to some of the QL facilities (system variables).

Also please remember that the QL screen and system variables are not necessarily stored at $20000 and $28000 !!
Actually I only works in assembly (Easy68K), and I don't need ROM.

¿How can I know where is screen and second screen on memory? I only use $20000 screen actually.
There's an assembler source with my Display_Cde extensions. They are written as BASIC extensions, but the assembler code should be clear enough in the source. This software shows how to test where the screen start address is, system variables, screen sizes, test for presence of pointer environment, window manager 2, GD2 (colour drivers) and so on.

http://www.dilwyn.me.uk/tk/index.html


Post Reply