English Amiga Board Copper wait
 User Name Remember Me? Password
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

 11 November 2019, 14:34 #1 geldo79 Registered User   Join Date: Oct 2019 Location: Eydelstedt / Germany Age: 39 Posts: 32 Copper wait Hi, short and maybe stupid question: Is it possible to tell the copper to change the bg color to a specific colour, but only inside my playfield? In my case the whole screen changes to the new colour. Greetings Christian
11 November 2019, 14:43   #2
deimos
Registered User

Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
 Originally Posted by geldo79 Hi, short and maybe stupid question: Is it possible to tell the copper to change the bg color to a specific colour, but only inside my playfield? In my case the whole screen changes to the new colour. Greetings Christian
You could change it at the beginning and end of each line, maybe?

 11 November 2019, 15:03 #3 geldo79 Registered User   Join Date: Oct 2019 Location: Eydelstedt / Germany Age: 39 Posts: 32 How can i do that? I thought i could only wait for a line (y position)....
11 November 2019, 15:11   #4
deimos
Registered User

Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
 Originally Posted by geldo79 How can i do that? I thought i could only wait for a line (y position)....
No, you can wait for a horizontal position too. It's just a little bit more tricky because you have to take into account the time that each move takes as well.

http://eab.abime.net/attachment.php?...0&d=1572886472

In that picture I've reused the colours on the map in the round horizon thing to give 10 colours on an 8 colour display.

Edit: Here's the code I used for that. It's C with my own macros, but you'll get the idea.

Code:
```        // this loop takes us past the rollover
for (UWORD i = 0xe4; i < 0x124; i++) {
COP_INSTR(i << 8 | 0x01, 0xfffe)
COP_INSTR(COLOR04, BLUE_RGB)
COP_INSTR(COLOR05, GREEN_RGB)

COP_INSTR(i << 8 | 0xc7, 0xfffe)
COP_INSTR(COLOR04, 0x005c)
COP_INSTR(COLOR05, 0x0731)

if (i == 0xff)
COP_INSTR(0xffdf, 0xfffe) // handle rollover
}```
You have to calculate the horizontal position to wait till, it doesn't correspond to pixels, but given that I had to change multiple colours I ended up doing it by trial and error. A smarter person might tell you how to calculate it.

Your copper code might end up with a loop rather than many lines.

Edit: Actually, thank you, I hadn't considered reusing colour 0. I'm going to try and see if I can get an extra colour on my main screen like that.

Last edited by deimos; 11 November 2019 at 15:30.

 11 November 2019, 15:12 #5 mcgeezer Registered User   Join Date: Oct 2017 Location: Sunderland, England Posts: 1,507 You can make the copper wait on horizontal positions as well. Geezer
11 November 2019, 15:54   #6
ross
Per aspera ad astra

Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,229
Quote:
 Originally Posted by deimos Edit: Actually, thank you, I hadn't considered reusing colour 0. I'm going to try and see if I can get an extra colour on my main screen like that.
Yes, it is possible, as many games did to get one more color back in the days (Beast, Agony, Lionheart, etc.).
You have to do it for every line, so used if you have lot of splits (as these games).

 11 November 2019, 16:18 #7 mcgeezer Registered User   Join Date: Oct 2017 Location: Sunderland, England Posts: 1,507 I did it in Rygar on the hi-score screen... it changes the colour for 18 lines lines at a specific start and end horizontal position. Here's the code snippet... Code: ``` moveq #\$12,d7 move.l #\$7201fffe,d2 ; Wait VPOS \$72 HPOS 01 move.l #\$7285fffe,d3 ; Wait VPOS \$72 HPOS \$85 move.l #\$72a5fffe,d4 ; Wait VPOS \$72 HPOS \$a5 move.l a1,COPPTR_HISCORE_CYCLE(a4) .cycle: move.l d2,(a1)+ ; 4 move.l #\$01900800,(a1)+ ; 8 move.l #\$01a00bbb,(a1)+ ; 12 move.l d3,(a1)+ move.l #\$019000f0,(a1)+ move.l #\$01a00f0f,(a1)+ ; 24 move.l d4,(a1)+ move.l #\$01900800,(a1)+ move.l #\$01a00bbb,(a1)+ ; 36 add.l #\$01000000,d2 add.l #\$01000000,d3 add.l #\$01000000,d4 dbf d7,.cycle```
11 November 2019, 23:04   #8
geldo79
Registered User

Join Date: Oct 2019
Location: Eydelstedt / Germany
Age: 39
Posts: 32
Quote:
 Originally Posted by ross You have to do it for every line, so used if you have lot of splits (as these games).

Thus, for waiting for a specific horizontal position, i have to insert some more moves into my copperlist....ok. But if i want to have my bg color black at both sides of the screen, and some other color in the playfield, i would have to insert a lot of moves, because i would have to change the color back to black at the right end of each line. And if i have to do that for each line as you mentioned........

Or did i miss something?

11 November 2019, 23:44   #9
ross
Per aspera ad astra

Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,229
Quote:
 Originally Posted by geldo79 Thus, for waiting for a specific horizontal position, i have to insert some more moves into my copperlist....ok. But if i want to have my bg color black at both sides of the screen, and some other color in the playfield, i would have to insert a lot of moves, because i would have to change the color back to black at the right end of each line. And if i have to do that for each line as you mentioned........ Or did i miss something?
Of course only on lines where you want a different COLOR00 in playfield.
But yes, a COLOR00 change at the left edge and a COLOR00 back to black at the right edge.

 12 November 2019, 10:18 #10 geldo79 Registered User   Join Date: Oct 2019 Location: Eydelstedt / Germany Age: 39 Posts: 32 Well, i would like to have it on every line

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 Similar Threads Thread Thread Starter Forum Replies Last Post roondar Coders. Asm / Hardware 3 12 September 2016 14:12 sandruzzo support.WinUAE 13 18 May 2016 22:54 sandruzzo Coders. Asm / Hardware 2 17 May 2016 11:30 mritter0 Coders. C/C++ 2 17 May 2014 20:14 phx Coders. Asm / Hardware 14 16 June 2013 08:26

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE         project.AmigaLive     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.EAB File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Kinky Amiga Stuff     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic     Coders. Contest         Coders. Entries Creation     Graphics         Graphics. Work In Progress         Graphics. Finished Work         Graphics. Tutorials     Music         Music. Work In Progress         Music. Finished Work         Music. Tutorials Off Topic     OT - General     OT - Entertainment     OT - Sports     OT - Technical     OT - Gaming

All times are GMT +2. The time now is 15:10.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top