English Amiga Board


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

 
 
Thread Tools
Old 21 February 2024, 18:50   #321
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by mc6809e View Post
Still there may be some visually fun opportunities available by turning off most or all bp fetching.
...
This is probably doable without major problems.
Except that a 'profitable' use of this 16-color PF sprites-made-up of repeated stripes escapes me

Sure interesting as a test for a weird effect (like a very fast multi-view, modifiing only little memory data).
There are effects on the C64 that do something similar using real-time character map editing, repeated across various portions of the screen.

But we are going off topic in the thread (i.e. from simply documenting undocumented features to using it).
Not that I mind but I don't know if it's the right thing
ross is offline  
Old 01 March 2024, 14:21   #322
ovale
Registered User
 
Join Date: Jun 2014
Location: milan / italy
Posts: 174
Please open a thread about abusing vhpos. So interesting
ovale is offline  
Old 01 April 2024, 22:14   #323
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
demo SOS triangle (ECS Agnus/OCS Denise) has Strobe/Bitplane conflicts, which leads to the first "STRHOR" Strobe happening far down in the image. The upper part therefore remains black. Only the green text scroller is permanently visible.
PiCiJi is offline  
Old 02 April 2024, 12:33   #324
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by PiCiJi View Post
demo SOS triangle (ECS Agnus/OCS Denise) has Strobe/Bitplane conflicts, which leads to the first "STRHOR" Strobe happening far down in the image. The upper part therefore remains black. Only the green text scroller is permanently visible.
Well, in fact this is not exactly something undocumented (the conflict between DMA channels has already been reported, even if there are some very peculiar ones and I don't remember if they have all been described). The thing that isn't properly documented is what Denise internally does when it receives the Strobes.

The intro had not yet been emulated correctly until now (in latest winuae.7z it is) because WinUAE is Agnus-centric and the Strobes for Denise are used basically for resetting the internal counter.
This because in fact in normal conditions the Strobes are always 'emitted' at the same Agnus' cycle and therefore Denise is a 'blind support' to Agnus.
So for the most can be 'neglected' in the emulation of display/blanking functions, because solved with Agnus related 'methods'.

Until recently we didn't know if they were actually used even in real (except to reset the counter)... for example understanding what STRLONG did only happened a few days ago.
Of course, what Strobes do for Paula has always been known

A little addition: even with ECS Denise the intro doesn't work, it also still uses Strobes completely except in specific conditions.
In a future post I will explain what really Strobes do (with a bit of history of Amiga chipsets and the reasons for some of the designers' choices).

Last edited by ross; 02 April 2024 at 15:00. Reason: written a little more decently... maybe :)
ross is offline  
Old 02 April 2024, 20:41   #325
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
Quote:
Originally Posted by ross
The thing that isn't properly documented is what Denise internally does when it receives the Strobes.
That's what I meant.

Quote:
Originally Posted by ross
Strobes for Denise are used basically for resetting the internal counter.
Before this demo I did exactly the same thing with STRHOR and STRVBL, which was "only" resetting Denise's H-Counter. STREQU is ignored.
Now there seems to be another effect here. Presumably, after the last STRVBL, a (at least one ?) STRHOR has to be registered by Denise in order for bitplanes to get into the shifter.
A few tests are necessary.
PiCiJi is offline  
Old 02 April 2024, 20:55   #326
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by PiCiJi View Post
Presumably, after the last STRVBL, a (at least one ?) STRHOR has to be registered by Denise in order for bitplanes to get into the shifter.
Yes. STRVBL enables Denise vertical blanking (Digital RGB outputs are forced to zero when Denise HB or VB is active) which stays active until Denise sees non-STRVBL strobe.

(ECS Denise programmed modes uses different method. Strobe based blanking is not used in programmed modes.)
Toni Wilen is offline  
Old 02 April 2024, 21:10   #327
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
The reason is that Strobes set latches inside Denise that:

STREQU: at STROBE+[dHBSTRT] enable blank, do not enable /BURST at STROBE+[dBURST]
STRVBL: at STROBE+[dHBSTRT] enable blank, enable /BURST at STROBE+[dBURST]
STRHOR: at STROBE+[dHBSTRT] enable blank, at STROBE+[dHBSTOP] disable blank
STRLONG: delay [dHBSTRT] and [dHBSTOP] by a clock

So the only way to disable BLANK is with STRHOR.
All dXXXX are fixed hardwired comparisons values, in a rom-matrix similar to that inside Agnus.
It is very likely that the HB and VB states are separate latches and that their outputs are ORd to the final internal BLANK signal.
All STROBE are 'immediate' (i.e. same line) because the latch is set in any case before (Agnus)HBSTRT.
ross is offline  
Old 02 April 2024, 21:26   #328
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
And now the (I hope) short story.

The designers needed in the original ICS/OCS chipset a simple system to fully generate a broadcast video signals (NTSC and/or PAL), without the need for complicated video encoders.
The main signals to be generated were therefore the vertical and horizontal synchronisms, the pre/post equalization and serration signals, the color burst signals and the BLANK.
The most logical thing was to have Agnus generate the pulses and Denise generate the video/blank/bust signals.
Since Denise only works by lines, a command mechanism had to be provided by Agnus for Denise, and these are precisely the strobe signals.

So:
- during STREQU lines: equ/serrations/vsync pulses (Agnus); no burst, VBLANK (Denise).
- during STRVBL lines: hsync pulses (Agnus); color burst (/BURST pin), 'extra-video' stuff (usually void), VBLANK (Denise).
- during STRHOR lines: hsync pulses (Agnus); normal video, HBLANK (Denise)
- long lines (NTSC): STRLONG on second refresh slot [this is a little special, maybe I'll explain it separately] (Denise)

--continue---
ross is offline  
Old 02 April 2024, 22:13   #329
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
Thanks for the explanation. I had been wondering all along why Denise had to differentiate between STRHOR and STRVBL/EQU.
PiCiJi is offline  
Old 02 April 2024, 22:25   #330
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
The story continues, it's time for the ECS chipset.

The features that the new Denise must support concern the super hires resolution and the programmed modes..
But both Agnus and Denise must be interchangeable, that is, capable of functioning in every possible combination of the two chips.
How to reconcile this need for compatibility with new features?

The designers decided to use the two unused pins present in Denise: CDAT and BLANK which are connected respectively to _CDAC (quadrature clock to generate pixels at 35ns but which we are not interested in now) and _CSYNC.
This because none of the programmed mode registers existing in the new ECS Agnus are available in ECS Denise! (that's right, BEAMCON0 and the other related do not exist in ECS Denise).

With the programmed modes the synchronism signals can be anywhere on the line and the hardwired BLANK cannot be good anymore.
Fortunately it helps you a bit (which is not even mentioned in the HRM..) that allows you to switch from [use STROBE] mode to [external signal] mode for the BLANK:
EXTBLKEN in BPLCON3 (need ECSENA=1 in BPLCON0).

When EXTBLKEN=1 then Denise's BLANK signal is generated following the _CSYNC signal.
This is not a fully perfect way to generate a BLANK (but works), and can be also helped by BRDNBLNK=1 (or by COLOR00=0 in the right positions).
Furthermore, usually the programmed modes are much less fussy about the blank and only need valid coverage for VSYNC and HSYNC.

The designers also added another bit, which is actually more confusing than anything else (and has actually been made 'obsolete' in AGA): BLANKEN.
BLANKEN=1 basically use blank registers in Agnus to generate the CSYNC and drive BLANK in Denise.
Main idea is to generate a perfect BLANK from Agnus to Denise but this has a lot of side effects..
This generates a kind of CSYNC which may or may not work... it was probably designed exclusively if separate H&V synchronization signals are used.


Warning: don't take what I wrote at face value, there are still some things in Denise that are not clear and possible speculations (since there are no schematics availables).
For example the free-running counter bug in OCS Denise is somehow incompatible with the STREQU in first blank line.. we should investigate.
ross is offline  
Old 02 April 2024, 23:04   #331
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Last message and then I'll shut up

> For example the free-running counter bug in OCS Denise is somehow incompatible with the STREQU in first blank line.. we should investigate.

This probably has a simple solution and it's not a bug but a 'design choice' (for a remaining initial defect? for the rush? for leftovers from debugging of the chip? who know..)
In the Amiga 1000 Denise they find this 'solution' and were then forced to report the 'choice/bug' in the OCS version (they fixed the 'problem' properly only from the ECS version).

The designers knew that the first line of the blank was certainly a STREQU and decided for a starting BLANK position of the vsync different from normal HBLANK (more secure?).
What is a way to do this?: do not reset the counter and assign the match with the start in a position >$1C7(+2)[<$1FF].
Obviously this absolutely cannot work with the programmed modes and they were forced to reset the counter and hook in the low positions.
If I'm not mistaken the VBLANK on A1000 starts in a 'different position' than ECS..

I'm quite satisfied with this speculation, also because I don't have any better ones If anyone has a better one, please post it.
[there would also be a possible theory about a counter that decreases from a predefined value when STREQU arrives, but considering that everything is done for the greatest economy I really think that this is not the case]

Last edited by ross; 02 April 2024 at 23:42. Reason: typos..
ross is offline  
Old 02 April 2024, 23:48   #332
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Quote:
Originally Posted by ross View Post
Last message and then I'll shut up [...]
Finally

Joke aside, reading technical stuff from knowledgeable people (even if I am sometimes lost ) is always a must. Keep posting mate
malko is offline  
Old 03 April 2024, 22:22   #333
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
Quote:
Originally Posted by ross
The designers decided to use the two unused pins present in Denise: CDAT and BLANK which are connected respectively to _CDAC
interesting information about ECS Denise. I want to deal with that soon.

From Denise's (OCS) point of view, blanking means "only" the disabling of the RGB output, so that the front/back porch region around HSync (Beam Retrace controlled by Agnus) does not get any data ?

By the way, I have set the hardwired blanking to Denise Hpos 14 to 84.
PiCiJi is offline  
Old 03 April 2024, 23:26   #334
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by PiCiJi View Post
From Denise's (OCS) point of view, blanking means "only" the disabling of the RGB output, so that the front/back porch region around HSync (Beam Retrace controlled by Agnus) does not get any data ?
Yes, the same of course also applies for vblank, usually lines from 0 to 20 NTSC or 25 PAL, which covers vsync pulses and a cushion zone used on TV for extra-data.

Quote:
By the way, I have set the hardwired blanking to Denise Hpos 14 to 84.
A little too optimistic here .
With DIW fully open visible lores pixels are 376, so the first pixel is at 92 ($5c).
ross is offline  
Old 04 April 2024, 19:01   #335
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Ok, all the pieces are in place now, Toni and I have finished torturing a couple of Denises but we have understood how the STROBE management works internally.
Nothing sensational compared to what I have already described previously, just how it is technically implemented (so I don't edit the previous messages, it's not worth the effort and they are broadly correct).
As usual, the designers have adopted the policy of the cheapest and with less gates way, even at the cost of having some small side effects.

An example is the method used to solve the problem I mentioned in message https://eab.abime.net/showpost.php?p...&postcount=331
To avoid a 'match value' they simply used the cycle immediately following $1C7(+2).. i.e... the STROBE itself
This has a couple of side effects that explain the 'different' vblank (as I correctly remembered) that can be noticed on the A1000 (and which was 'cloned' into OCS).
I don't know in which way this is related to lack of counter reset, but it's not important and it doesn't change anything on a practical level (except a rare bug regarding the DIW, well known by those who patch OCS stuff to work on ECS..); probably they saved two transistors and that was enough of a justification .

Very quick summary diagram:
STREQU = enable master_blank (immediate)
STRVBL = reset counter, /BURST, latch enabled for dHB matches
STRHOR = reset counter, /BURST, latch enabled for dHB matches, clear master_blank (immediate)
STRLONG = LOL delay (reset at STROBE)

Operative description:
- STREQU is immediate BLANK for OCS Denise (this explain the last line blank that start early), enable master_blank
- line0 does not emit STRHOR in OCS Denise (this generate the 'ugly' extreme bottom line, shorter than normal and containing only COLOR00 like the $137SHF/$138LOF PAL
- STRHOR enable and disable blank at match positions, enable timed burst, and also immediately disable master_blank
- STRVBL is a 'reduced' version of STRHOR (it probably shares most of the gates but with one difference: it doesn't touch master_blank)
- master_blank always wins and need to be disabled if you want to re-enable view (only STRHOR can do it)
- STRLONG should be really set in a specific 'range' to be really usefull else it is 'reset' by strobes (the 'range' is after a STROBE and before dHBs)

The side effect of this setting is that at the last line of the BLANK there is a small window open for DIW (because STRHOR immediately deactivates the master_blank and then reactivates it for dHBs matches).
Of course this 'little window' can also contain normal video data

The funny thing is that STRVBL, which could be understood as the most significant signal for vertical BLANK actually does nothing for vertical blank!
Fortunately on normal NTSC/PAL screens the sequence is always STREQU->STRVBL->STRHOR and everything works fine anyway

If anyone is wondering: yes, in ECS Denise they fixed STRVBL and now it actually does something sensible.
But that's another story...

ross is offline  
Old 04 April 2024, 22:17   #336
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
Quote:
Originally Posted by ross
A little too optimistic here .
With DIW fully open visible lores pixels are 376, so the first pixel is at 92 ($5c).
At this point I'm trying to pass the maximum non-blanking area, what leaves the Amiga (what I think is transfered through the cable). Cropping, such as typical monitor viewing area or non border, is then done in a 2nd step outside of the actual emulation.

Quote:
Originally Posted by ross
Operative description:
- STREQU is immediate BLANK for OCS Denise (this explain the last line blank that start early), enable master_blank
- line0 does not emit STRHOR in OCS Denise (this generate the 'ugly' extreme bottom line, shorter than normal and containing only COLOR00 like the $137SHF/$138LOF PAL
- STRHOR enable and disable blank at match positions, enable timed burst, and also immediately disable master_blank
- STRVBL is a 'reduced' version of STRHOR (it probably shares most of the gates but with one difference: it doesn't touch master_blank)
- master_blank always wins and need to be disabled if you want to re-enable view (only STRHOR can do it)
- STRLONG should be really set in a specific 'range' to be really usefull else it is 'reset' by strobes (the 'range' is after a STROBE and before dHBs)
valuable information. I'm going to integrate that the days, especially line0
PiCiJi is offline  
Old 16 April 2024, 23:27   #337
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
already mentioned ?

paula: not serviced intreq2 doesn't clear when perfin (state 3) and !AUDxON and AUDxIP, state changes to 0.
then toggle AUDxON (e.g. a few lines later ), still armed intreq2 does AUDxIR now

attached test triggers three additional level 4 interrrupts.
Attached Files
File Type: zip intreq2.zip (799 Bytes, 18 views)
PiCiJi is offline  
Old 17 April 2024, 19:16   #338
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by PiCiJi View Post
At this point I'm trying to pass the maximum non-blanking area, what leaves the Amiga (what I think is transfered through the cable). Cropping, such as typical monitor viewing area or non border, is then done in a 2nd step outside of the actual emulation.
Ross' values are correct hardwired blanking start/end points. At least if Denise output is captured from video DAC hybrid chip analog outputs. Any device that captures it earlier: undefined results.

Quote:
Originally Posted by PiCiJi View Post
already mentioned ?

paula: not serviced intreq2 doesn't clear when perfin (state 3) and !AUDxON and AUDxIP, state changes to 0.
then toggle AUDxON (e.g. a few lines later ), still armed intreq2 does AUDxIR now

attached test triggers three additional level 4 interrrupts.
Do you mean INTREQ2 is only cleared when it causes interrupt? (INTREQ changes)
Toni Wilen is offline  
Old 17 April 2024, 22:40   #339
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 403
Quote:
Originally Posted by Toni Wilen
Do you mean INTREQ2 is only cleared when it causes interrupt? (INTREQ changes)
Yes. If delayed INTREQ2 is not cleared (possible retrigger) when toggling AUDxON test results would differ to real machine.
PiCiJi 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
who can provide hardware to create ADFs of some old rare stuff like Nautilus...? Bernd support.Other 3 19 August 2011 23:41
Stuff for sale amiga a1200 plus more retro stuff blast MarketPlace 23 22 June 2010 19:05
Action Replay Undocumented Features deicidal support.Hardware 0 01 March 2010 17:15
I've got some Amiga stuff...I want your SNES stuff! Fingerlickin_B MarketPlace 14 20 February 2009 01:33
Amiga stuff for trade for Atari Stuff 8bitguy1 MarketPlace 0 12 February 2009 05:36

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 07:29.

Top

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