04 December 2020, 17:03 | #1 |
Registered User
Join Date: Mar 2016
Location: Ozherele
Posts: 229
|
SetRGB4 bug on the A1200
I am curios, am only I so "lucky" that have to face this bug? The documentation about SetRGB4 claims that only 4 bits of d1-d3 registers are used. It is true for the A500 but it is not true for the A1200. I have to use
Code:
and.b #15,d1 and.b #15,d2 and.b #15,d3 I will be grateful for more clarifications about this issue. |
05 December 2020, 05:29 | #2 |
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,577
|
It's worse than you think.
For AGA graphics SetRGB4 converts the color values from 4 bit to 32 bit and then calls SetRGB32. However in KS3.0 (and 3.1, others?) the higher bits are not masked off, so some may 'leak' into the 32 bit value. The code in the ROM looks like this:- Code:
swap d1 lsl.l #8,d1 ; 4 bit value now in d1 bits 27-24 move.l d1,d4 ; copy to d4 lsl.l #4,d4 ; shift the copy into d4 bits 31-28 or.l d4,d1 ; combine to get 8 bit value in d1 bits 31-24 To prevent this you must ensure that bits 31-28 and 7-5 are cleared when calling SetRGB4. So to be safe you should do eg. Code:
moveq #15,d4 and.l d4,d1 and.l d4,d2 and.l d4,d3 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WinUae 4.4.0 - Action replay bug/ Load Config bug | Dan | support.WinUAE | 2 | 20 July 2020 07:59 |
Bug I think... | NLS | support.WinUAE | 8 | 24 July 2017 22:09 |
Bug in x64 file requester and bug in Blizzard PPC ROM filesize | headkase | support.WinUAE | 5 | 26 June 2016 14:17 |
Hardware to fix A1200 PCMCIA reset bug | Calgor | support.Hardware | 13 | 27 December 2011 14:27 |
Bug??: Sound Left/Right flipped for A1200 and setting is not saveable | rsn8887 | support.WinUAE | 3 | 03 November 2006 17:40 |
|
|