English Amiga Board


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

 
 
Thread Tools
Old 28 December 2019, 22:47   #1
sparhawk
Registered User

sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 51
Posts: 304
Reading current color

On C64 you can easily read and write the color from $d020/21. When I try to read the color from $dff0180 I always get $FFFF in WinUAE, so I was wondering if those registers are write only on Amiga?
I haven't checked on the real machine yet.
sparhawk is offline  
Old 28 December 2019, 23:00   #2
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 174
http://amigadev.elowar.com/read/ADCD.../node0060.html
3rd column: W,R W=write-only; R=read-only
a/b is offline  
Old 30 December 2019, 09:54   #3
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,689
It is possible to read color registers but AFAIK only on AGA. There is a bit in BPLCON2 to activate this feature.
Else any attempt to read will write last value present on the bus to the color register...
meynaf is offline  
Old 30 December 2019, 10:04   #4
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,634
Regs are write only or read only. Some have a "R" & "W" version (DMACON, INTENA, INTREQ,...)

On WinUAE you can read the last written values with the debugger (shift+F12 then type "e")

On real hardware, you can read them using action replay... Or intercept the writes with MMU (whdload SNOOP mode). But no copper writes are intercepted.

What is your real problem you want to solve?
jotd is offline  
Old 30 December 2019, 11:20   #5
sparhawk
Registered User

sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 51
Posts: 304
When my program starts I wanted to take the current WB colors to start with. Preferably I would even keep the WB screen visible, but for that I would have to copy the bitplanes from the view, right? Because when the ministartup is executed it will load an empty view.
sparhawk is offline  
Old 30 December 2019, 11:40   #6
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,061
Did you think about what you're trying to achieve? I mean, why use "system takeover" if you actually want Workbench to be available while your program runs?
hooverphonique is offline  
Old 30 December 2019, 12:11   #7
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,367
Quote:
Originally Posted by sparhawk View Post
When my program starts I wanted to take the current WB colors to start with.

For that you just need to find the system copperlist (check GfxBase structure) and simply copy the color values.

Last edited by StingRay; 30 December 2019 at 17:10. Reason: "not enough coffee yet" typo fixed :)
StingRay is offline  
Old 30 December 2019, 16:20   #8
sparhawk
Registered User

sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 51
Posts: 304
I don't want the WB to be available for the user to work with. I wanted to start in such a way that it looks as if the WB screen is "melting". I look at the GfxBase to find the current view, which should hold the necessary data.
sparhawk is offline  
Old 31 December 2019, 16:07   #9
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 342
Quote:
Originally Posted by StingRay View Post
For that you just need to find the system copperlist (check GfxBase structure) and simply copy the color values.
Err, there is not necessarily a copper list. RTG graphics exist. To get the current color values, use GetRGB() and related functions. They always work.
Thomas Richter is offline  
Old 31 December 2019, 16:13   #10
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 49
Posts: 519
There is an example of cloning the screen here
http://amigadev.elowar.com/read/ADCD.../node05B2.html
alkis 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
Color Saturation and Color Tint/Hue Retro-Nerd support.WinUAE 22 02 August 2018 10:38
Reading files from current directory in assembly hukka Coders. System 29 01 January 2018 22:03
Printing in color with WinUAE on color laser source support.Apps 7 14 April 2013 00:32
screenshot of my current project ara Coders. General 10 08 October 2012 17:07
ISO true color to 256 color algorithm Lord Riton Coders. General 19 15 April 2011 17:49

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 04:49.


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