English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 31 January 2012, 20:47   #1
mc6809e
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?
mc6809e is offline  
Old 31 January 2012, 21:59   #2
pmc
gone
 
pmc's Avatar
 
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.
pmc is offline  
Old 31 January 2012, 23:03   #3
mc6809e
Registered User
 
Join Date: Jan 2012
Location: USA
Posts: 372
Quote:
Originally Posted by pmc View Post
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.
So the blit doesn't necessary stop. Interesting.

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.
mc6809e is offline  
Old 01 February 2012, 08:35   #4
Toni Wilen
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.
Toni Wilen is offline  
Old 26 June 2013, 20:04   #5
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 402
Quote:
Originally Posted by Toni Wilen
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.
I have tried to change the D pointer during blit on A500 OCS. Cycle diagram was D only. ( -D )

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.
PiCiJi is offline  
Old 26 June 2013, 21:10   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by PiCiJi View Post
I have tried to change the D pointer during blit on A500 OCS. Cycle diagram was D only. ( -D )
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.
Toni Wilen is offline  
Old 26 June 2013, 22:14   #7
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 402
word writes only.

Quote:
Originally Posted by Toni Wilen
During refresh cycles CPU can't get any memory access cycles if blitter is also active.
can blitter idle cycles executed during refresh cycles or is it delayed until next free cycle?

Last edited by PiCiJi; 26 June 2013 at 22:52.
PiCiJi is offline  
Old 26 June 2013, 22:45   #8
PiCiJi
Registered User
 
PiCiJi's Avatar
 
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.
PiCiJi is offline  
Old 30 June 2013, 15:57   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by PiCiJi View Post
can blitter idle cycles executed during refresh cycles or is it delayed until next free cycle?
No, blitter idle cycle need "real" free cycle.
Toni Wilen is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07579 seconds with 15 queries