English Amiga Board


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

 
 
Thread Tools
Old 12 September 2021, 00:09   #1
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Best and quickest way to grab Copperlist colors as source code

Hello,


I'm looking for a quick way to grab an actual copper color list, possibly as ASM source ready to paste into code.



Any suggestion? Some WinUAE tool could be OK but if some trick for real hardware exists would be even better!


Thanks
KONEY is offline  
Old 12 September 2021, 12:12   #2
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
http://deadliners.net/gradientmaster/

Try this... it doesn't ouput the colour registers, so you can't paste straight into a copperlist

But would take 2 minutes to code a function to populate the copperlist
DanScott is offline  
Old 12 September 2021, 14:57   #3
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Thanks DanScott, that's a nice tool!

But maybe I did not explained fully so I'll start again. I wrote a small routine which inserted in a mainloop allows me to change the colors in the copper by using the joystick. This after I realized I had to change-and-compile some hundred times when coding because in graphics effect having the right shade can change everything. So I needed a kind of editor to embed during development to be able to visually adjust color values. And from here the need to quickly export the actual copper color list again back into code.

Likely options I thinked of:
some trick with asm-pro which I don't know
some trick with winuae which I don't know
copy values to registers then grab them from winuae debug
add some code so when quitting values are sent to cli output
KONEY is offline  
Old 12 September 2021, 15:11   #4
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
you could save the area of memory in the WinUAE debugger perhaps ?

create a routine somewhere that goes:

lea AddressOfColours,a0
move.w #size,d0
clr.w $100


then use the "w" command to set a memory watch breakpoint on $100

w 1 100 (i think?)


winuae will break on the "clr.w $100" and A0 will contain your address, and D0 the size

you can then use the "save memory to file" command..don't remember what it is exactly
DanScott is offline  
Old 12 September 2021, 15:11   #5
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 389
Seems to me like the easiest process would be to have your Amiga exe read a file with the copper list color values and apply them. Then hook that up to some key or button press so you can reload at any time.

After that you just need a process for updating the file. Since Winuae exposes the Amiga file system to your PC you can implement whatever you want on the PC side of things to edit that file.

I'm not sure how fragile the Amiga library file system is when you are taking over the system, but I imagine you'll have to take a little care to make sure you restore part of the system and then re-take it each time you want the file to reload.
Jobbo is offline  
Old 12 September 2021, 20:58   #6
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Quote:
Originally Posted by DanScott View Post
you can then use the "save memory to file" command..don't remember what it is exactly

Could work but I'd end up with some binary data...
KONEY is offline  
Old 13 September 2021, 16:25   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,616
Asm-Pro should support the ih command?

If you write the colors into your own Copper (or one you have a pointer to), you can use this to get Copper source after exiting (unless the memory for it is explicitly deallocated).
Photon is offline  
Old 13 September 2021, 18:47   #8
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Thanks Photon, "ih" method almost works. Just need it to output words and not bytes.
KONEY is offline  
Old 13 September 2021, 18:59   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,616
It works like the h command (and some others): append .w or .l to hexedit in words or longwords.
Photon is offline  
Old 15 September 2021, 07:59   #10
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
ih.w works and it's exactly what I needed! Thanks Photon!

Attached Thumbnails
Click image for larger version

Name:	ASM-PRO_IH_cmd.png
Views:	297
Size:	5.9 KB
ID:	73190  
KONEY 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
Quickest way to update the entire palette in Copperlist KONEY Coders. Asm / Hardware 7 13 April 2021 15:54
Old source code? anotheramigafan Amiga scene 9 29 June 2018 16:33
My old source code gemanix Coders. General 36 09 July 2017 13:33
Quickest code.... Galahad/FLT Coders. Asm / Hardware 10 01 January 2017 17:23
Source Code Thalion project.WinUAE - Kaillera 3 28 April 2006 09:55

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 20:53.

Top

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