Schrijver
| grauws docopy
|
norakomi msx professional Berichten: 861 | Geplaatst: 04 Juli 2005, 11:10   |
Hi,
Docopy by grauw:
There is a version faster version of the routine docopy which does want the
user to set status register 2 at all times.
This I do on the Interrupt.
Docopy is in my backgroundscroll routine, which is not on the interrupt.
However I do not seem to be able to set status register 2.
I tried several things, but they don't work.
Can somebody give me an example of how to set St.R#2 on each interrupt?
|
|
NYYRIKKI msx master Berichten: 1494 | Geplaatst: 04 Juli 2005, 12:47   |
VDP registers can be written but not read.
VDP status registers can be read but not written.
|
|
Arjan msx addict Berichten: 452 | Geplaatst: 04 Juli 2005, 15:36   |
he doesn't mean setting the value of S#2, but selecting S#2.
anyways, here's how to do it:
ld a,2
out ($99),a
ld a,15+128
out ($99),a
|
|
norakomi msx professional Berichten: 861 | Geplaatst: 04 Juli 2005, 15:36   |
Quote:
| VDP registers can be written but not read.
VDP status registers can be read but not written.
|
hmm, maybe I misread something.
Docopy is a routine that writes 15 bytes starting at register 32.
Status registers 2 and 0 are used (to check if the vdp is done copying)
However, the faster version of Docopy only requires the usage of
status register 0.... on 1 condition:
That status register 2 is allways set (or never reset???)
I dont quite get it.....
Plus, this setting of status register 2 is supposed to be done in the
interrupt handler.
I tried something like writing the value 2 to the register which is
used to read status registers... and then using in a,($98)
but this doesnt seem to do the trick |
|
Edwin msx professional Berichten: 591 | Geplaatst: 04 Juli 2005, 17:11   |
What is means is, if you know for sure what status register is selected for read in R#15, you don't have to set it again. However, you do need to be certain, which means you code (including interrupt routines) must run preditable.
|
|
NYYRIKKI msx master Berichten: 1494 | Geplaatst: 04 Juli 2005, 22:49   |
If you use custom interrupt handler and you have disabled V-blanc interrupts, you don't have to switch back to status register 0.
This is because MSX-BIOS interrupt handler does not change back to status register 0 if you change it and you can't exit V-blanc interrupt without reading status register 0.
|
|
|
|
|