31 January 2012, 20:47 | #1 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Modifying blitter registers while it's running
To what extent is it possible to modify the blitter registers while it's running? I know some register accesses cause the blitter to halt.
I'm trying think of what might be possible if the blitter writes to the data portion of a copper list which then moves the result back into a blitter register. It sounds crazy, I know, but maybe some interesting things are possible. Does anyone know what is touchable while the blitter is running? |
31 January 2012, 21:59 | #2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Toni would obviously be best placed to give you the official answer but my experience of modifying blitter registers in the middle of blits that were already using those registers was just plain unpredictable results.
|
31 January 2012, 23:03 | #3 | |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Quote:
I was thinking things might predictable if the nasty bit is set, and if blits are controlled completely by the copper. I can understand the difficulty of trying to change the registers with the CPU and getting repeatable results, but consistent patterns of operation should be achievable using the copper. It should be possible to predict down to the cycle what the blitter is doing as long as the CPU is prevented from stealing cycles. |
|
01 February 2012, 08:35 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
There is no 100% known information because no one knows how blitter is actually implemented. Logic analyzer cycle diagram tests shows some interesting information.
Most registers are "safe" to change (pointers, modulos, data registers), they are nothing special compared to other similar registers. Of course changing pointer and data registers require very very exact timing. I guess this is at least in theory possible with copper. Modulos aren't that timing sensitive, at least if blit is wide enough. Note that there is Agnus limitation that afaik affects all DMA pointers: there must be at least 1 cycle between accesses to same DMA pointer register or following access does nothing if it is CPU/Copper write. In real world it mainly affects sprites, if copper list sets sprite pointers just before or after sprite DMA read access (There is a demo that requires this behavior..) I think this can cause bad problems if blitter DMA pointers are poked while blitter is active. Changing DMA channel enable bits, line draw or fill enable bits either halts the blitter or blitter's cycle diagram changes to something strange. (http://eab.abime.net/showpost.php?p=579713&postcount=17) I assume in this situation blitter's internal cycle diagram logic gets in impossible or bad state. Someday I'll test all possible dma channel + fillmode change combinations' cycle diagrams.. Lots of boring work. I haven't tested how shifts behave. |
26 June 2013, 20:04 | #5 | |
Registered User
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 402
|
Quote:
The results differ between new D pointer is accepted or ignored at all. Blitter nasty or not doesn't matter. And sometimes the blitter seems to freeze. (not that often) The cpu can do the write in idle cycle only. So I have expected the pointer change is ignored each time because there is always a pointer access by blit operation in the next cycle or cycle before. It seems very unpredictable but I don't believe it is. |
|
26 June 2013, 21:10 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
WORD or LONG write? LONG write can have "unreliable" timing (long delay between first and second word write) if first word write happens just before refresh cycles. During refresh cycles CPU can't get any memory access cycles if blitter is also active.
|
26 June 2013, 22:14 | #7 | |
Registered User
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 402
|
word writes only.
Quote:
Last edited by PiCiJi; 26 June 2013 at 22:52. |
|
26 June 2013, 22:45 | #8 |
Registered User
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 402
|
I haven't taken in account the higher level dma accesses which can increase cycles between D pointer access and CPU writes during idle cycle. So it should be normal that some pointer changes are ignored and some accepted.
|
30 June 2013, 15:57 | #9 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using FPU registers? | oRBIT | Coders. General | 16 | 26 April 2010 13:34 |
Checking custom registers in a game/demo | Photon | support.WinUAE | 19 | 24 November 2009 16:03 |
Need DA8000-DAFFFF registers documentation | BlueAchenar | Coders. General | 2 | 13 December 2008 15:39 |
Amiga Inc. registers new brands in Germany | viddi | Amiga scene | 7 | 27 February 2007 00:35 |
Gayle Hardware Registers | bluea | support.Hardware | 5 | 09 July 2006 17:07 |
|
|