Page 1 of 1
Vertical screen interrupt
Posted: Wed Jan 22, 2014 8:10 am
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.
Re: Vertical screen interrupt
Posted: Wed Jan 22, 2014 9:26 am
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
Re: Vertical screen interrupt
Posted: Wed Jan 22, 2014 11:48 am
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.
Re: Vertical screen interrupt
Posted: Wed Jan 22, 2014 1:13 pm
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
Re: Vertical screen interrupt
Posted: Wed Jan 22, 2014 8:05 pm
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 !!
Re: Vertical screen interrupt
Posted: Fri Jan 24, 2014 7:50 am
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.
Re: Vertical screen interrupt
Posted: Fri Jan 24, 2014 11:21 am
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