![]() |
![]() |
#1 |
Registered User
![]() Join Date: Nov 2010
Location: .
Posts: 385
|
Understanding DIWHIGH register
Hello,
yet another basic concept I cannot grasp. I "discovered" that it would be interesting to use the ECS register DIWHIGH instead of writing DIWSTRT+DIWSTOP. There's unfortunately a basic concept I cannot understand: how to set bit values in this register, as explained here. According to the documention I should distribute the usual window coordinates (DIWSTRT=$2c81, DIWSTOP=$2cc1) like the following scheme. I'm colouring the relevant bits to show where I think I should pick them from DIWSTRT+DIWSTOP and set in DIWHIGH): DIWSTRT $2c81 %0010 1100 1000 0001 VSTART,HSTART DIWSTOP $2cc1 %0010 1100 1100 0001 VSTOP,HSTOP ....................5432 1098 7654 3210 bit position DIWHIGH.......0010 0001 0010 0001 cyan = Horizontal stop, most significant bit. green = Vertical stop, most significant 3 bits. red = Horizontal start, most significant bit. Please bear with me once more and help me with this, it's driving me crazy. Am I calculating the bits correctly? (answer: no, idiot) Why do I have to put twice the 3 msb of VSTOP? I sort of expected this register to contain all 4 coordinates (vstart&vstop, hstart&hstop) Finally, is there a PDF of the AHRM, third edition? Probably I can look up a complete explaination in there. Thank you, again. Last edited by jman; 08 June 2011 at 21:49. |
![]() |
![]() |
#2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Is the DIWHIGH register not used in addition to DIWSTRT / STOP rather than instead of...?
To me, the docs at the link you posted seem to be saying that DIWHIGH either has no effect on DIWSTRT / STOP if it's not written to at all or effects DIWSTRT / STOP to work for direct start / stop positions if it's written last. That would seem to hold true taken in relation to the bit descriptions too ie. DIWHIGH defines the most significant start / stop bits for vertical (V8, V9, V10) and horizontal (H8) while DIWSTRT / STOP defines the less significant start / stop bits (V0-7 & H0-7) To put it another way, doesn't DIWHIGH just override the implied V8 & H8 = 0 for start positions or implied V8 & H8 = 1 for stop positions in DIWSTRT / STOP...? |
![]() |
![]() |
#3 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
Quote:
Note that it is also easy to get caught in hidden trap when using DIWHIGH. For example you will get unexpected result if you set DIWSTRT V0-V7 to zero and then update DIWHIGH VSTART8 = 1 if current vertical position = 0. |
|
![]() |
![]() |
#4 |
Registered User
![]() Join Date: Nov 2010
Location: .
Posts: 385
|
I have read again the register description and it is consistent with your suggestions.
However I don't understand how to use it to increase the size of the usable screen. What would be useful is probably a couple of examples. I'll note this issue as I progress and check the documentation around. Thanks. |
![]() |
![]() |
#5 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
Quote:
DIWHIGH/DIWSTRT/DIWSTOP only configures location and size of display window. If you want more scanlines or horizontal size, you need programmed screen mode (non-PAL/NTSC compatible) which is something much more complex and usually not worth the trouble. |
|
![]() |
![]() |
#6 | |
Registered User
![]() Join Date: Nov 2010
Location: .
Posts: 385
|
Quote:
Isn't it equal to say that the display size is extended? Maybe I'm using "display size" improperly, I'm talking about how many pixels of usable display I have. If I write: Code:
dc.w $2cc1,diwstrt Code:
dc.w $2ac1,diwstrt Thanks :-) |
|
![]() |
![]() |
#7 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
Quote:
Actually DIWHIGH (on PAL/NTSC modes) allows smaller display sizes than was possible on OCS machines ![]() DIWSTRT and DIWSTOP (without DIWHIGH) already allows maximum (again, PAL/NTSC) display size. |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
diwhigh/diwstart problems | Jherek Carnelia | Coders. General | 4 | 07 April 2011 19:08 |
Understanding the Copper | BippyM | Coders. Tutorials | 38 | 04 September 2010 12:18 |
Anyone like to help understanding this bootblock ??? | Joe Maroni | Coders. Tutorials | 2 | 15 February 2007 17:33 |
Understanding ASM Routine | Crackersixx | Coders. Tutorials | 13 | 10 February 2006 02:58 |
understanding the COLORXX regs... | Joe Maroni | Coders. General | 2 | 14 February 2005 07:50 |
|
|