COMMODORE PLUS/4 WORLD
  Home  Search  Games  Tapes  Covers  Cheats  Maps  Software  New Stuff 
 Hall Of Fame  HVTC  Game Endings  Solutions  Remakes  Publications  Magazines  Effects  Top List 
 Members  Groups  Features  Plus/4 Encyclopedia  Hardware  Tools  Options  Forum 
Login
Back to forumReply To This TopicGo to last reply

Posted By

KiCHY
on 2009-10-24
12:03:23
 IRQ and FF06

Hi demogurus,

I ran into problem when I wanted to do a quick screen effect using IRQ.
My goal is this: the first two character rows are visible, then I turn off the screen (with FF06bit4). Later I turn screen back to make the last 3 character rows to be visible again. I learnt that completely turning off the screen with FF06 works, but turning off the screen between two specified raster lines doesn't (at least my knowledge lacks about this topic).
Demogurus, what's the solution for this simple problem?

Cheers,
KiCHY

Posted By

Csabo
on 2009-10-24
14:00:57
 Re: IRQ and FF06

Hey, nice to see you back

I believe this is not possible on the TED: you cannot turn the screen on or off via FF06 once the frame has started. It's only checked for the whole frame, not per rasterline.

I have not tried this, but what you're looking for might be possible by playing with FF1D. You can definitely make the lower border start sooner (e.g. like in Out Of Border), so MAYBE it's possible to set FF1D back to show some more character lines at the bottom. (My guess would be that this won't work, but it's worth a try.)

May I ask why you'd want to do this?

Posted By

Luca
on 2009-10-24
14:01:36
 Re: IRQ and FF06

I tried too, and fail. There's somethng I don't really know aboit FF16's 4th bit. I also tried with $FF1D check, nothing to do

Posted By

Chicken
on 2009-10-24
14:49:19
 Re: IRQ and FF06

If you just want to "hide" (or "blacken") lines, I'd suggest switching to some "illegal" mode (e.g. setting ECM color mode bit AND bitmap bit) in those lines.

Posted By

Rachy
on 2009-10-24
14:55:20
 Re: IRQ and FF06

It is possible by writing into FF1D, FF06, FF14 and FF1F synchronized. A bit tricky, though, because exact timing is the key. You can find some programs, which manage this kind of reshape of screen display. Some turbo loader or cruncher popped into my mind right away (which hid its own code in the screen memory by this way), I just can't remember its title. But I am pretty sure I have seen the same in some of Crown's programs too.

Posted By

Chicken
on 2009-10-24
15:06:09
 Re: IRQ and FF06

Rereading this... I probably got you wrong and you want some char lines and then some border color "area" ($ff19) and then some chair lines again. If I remember correctly, it's possible to "re-initialize" a complete new "text window" by manipulating $ff1d (and probably some other registers).
Some demos obviously used this method for scrollers in the upper and lower border. (Not sure but I think Crown's Magic Picture Show works like this.)
Furthermore, making the "text window" smaller and thus gaining some cycles is possible (this was discussed here in the early days of XeO3).

Posted By

Luca
on 2009-10-24
15:14:21
 Re: IRQ and FF06

I guess Rachy is right, I would try it with my $FF06/$FF1F tables, but at the moment I've some problems with Plus4IDE...
Inner communication: Kichy, I waited for you on Skype but didn't get you ;)

Posted By

Degauss
on 2009-10-24
17:27:57
 Re: IRQ and FF06

Phew. Just blanking out ONE bigger portion of the screen is quite easy to manage: You only need to modify FF1D. I believe having TWO visible areas is more complicated and involves a bit more TED-hacking (as rachy said)

Posted By

KiCHY
on 2009-10-25
05:53:22
 Re: IRQ and FF06

Thanx for the quick answers and solutions! My aim is to hide a central portion of my graphic screen (ergo full bitmap mode) while I repaint the unvisible area (forcing an unprofessional code to mimic a professional behaviour, eheh). So I will try setting illegal mode first, perhaps more complicated solutions will follow...
Luca: I turned Skype on.

Posted By

KiCHY
on 2009-10-25
06:59:36
 Re: IRQ and FF06

The illegalmode way solved my problem, but it would be handy if someone could create an encyclopedia entry about this topic

Thank you again!

Posted By

Gaia
on 2009-10-25
09:14:53
 Re: IRQ and FF06

Kichy, in case you do it with the FF1D trick you have the benefit that you get the extra "border" cycles, too, which speeds things up quite a bit. Here is a quick and dirty routine I have put together in TEDMON:

D2000 2023
. 2000 78 SEI
. 2001 A9 FE LDA #$FE
. 2003 CD 1C FF CMP $FF1C
. 2006 D0 FB BNE $2003
. 2008 A9 13 LDA #$14
. 200A CD 1D FF CMP $FF1D
. 200D D0 FB BNE $200A
. 200F A9 CA LDA #$CA
. 2011 8D 1D FF STA $FF1D
. 2014 A9 DB LDA #$DB
. 2016 A2 24 LDX #$24
. 2018 CD 1D FF CMP $FF1D
. 201B D0 FB BNE $2018
. 201D 8E 1D FF STX $FF1D
. 2020 EE 19 FF INC $FF19
. 2023 4C 01 20 JMP $2001

The idea here is that we wait until we reach rasterline $014 and then make the TED think he is already at the end of the visible window by writing $CA into the horizontal raster. This will let the TED turn off the DMA (colour and char fetch) and "close the border". But for the rest of the screen and video timing not to screw up, we must set things back a few lines later to the values it would be if there were no raster register writes at all. This is basically how all extended border effects work (well, most of them anyway).

There are a couple of caveats though, one namely that make sure you do not write an odd number into FF1D while it is in an even line and vice versa because that will screw up the PAL line phase and you get artifacts ("alternative" as well alternating colours per frame :-) ). So stay with either all odd or even numbers in case you're not sure.

Of course this routine is quite suboptimal because I am doing all this in a busy loop but it is easy to set things up in a raster IRQ (actually two raster IRQs per frame, or one raster and one timer, as you like it).

PS: it could also be that I accidentally changed the frame rate, too, by not counting the actual video lines generated (which should be 312) properly, but I was lazy.

Posted By

Luca
on 2009-10-25
12:31:07
 Re: IRQ and FF06





Back to topReply To This Topic


Copyright © Plus/4 World Team, 2001-2017