05 September 2019, 14:56 | #21 | |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
Quote:
Every time I see long sheets of code in ASM I just think "I'm too old to waste my time learning this, this is insane". Yet I keep hearing SO MUCH "You really should go for ASM" that I guess at some point I'll give in Last edited by Shatterhand; 05 September 2019 at 15:20. |
|
05 September 2019, 15:07 | #22 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Life is too short to learn all things. Pick what you want to learn and use that.
I do use assembly, but I'm just a gigantic sucker for banging the hardware of retro computers directly. Looking at what you managed to do in Blitz in such a short time, I'm kind of envious. Sure, Blitz is slower - but you got a lot done and it all works well enough. IMHO, assembly is something you should only use if you either need it (i.e. you can't manage to get the speed you want without it and you've done all you can to make the non-assembly program itself as efficient as you can), or want to use it. IIRC, Blitz actually offers a nice compromise here - you can include inline assembly easily if you want too. But you don't need to |
05 September 2019, 16:00 | #23 |
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 853
|
For AGA colours you bank in/out banks of 32 colours and upper/lower 12-bit halfs of the 24-bit colour.
Which means that on boot-up it will default to the first 32 colours and upper 12 bits. Incidently, writing to the upper 12 bits will copy the exact same value to the lower 12 bits. So write the lower 12 bits last. |
05 September 2019, 17:22 | #24 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,642
|
|
05 September 2019, 19:19 | #25 | |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,317
|
Quote:
|
|
06 September 2019, 08:17 | #26 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
|
06 September 2019, 09:32 | #27 |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,797
|
I agree with 68K asm being easier.
68K asm is almost like coding in C. x86 asm is like someone repeatingly hitting your head with a stick and laughing at you. |
06 September 2019, 10:00 | #28 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Quote:
Code:
Copper example: select bank 0: $0106,$0000 ; colours 0-31 select bank 1: $0106,$2000 ; colours 32-63 ... select bank 7: $0106,$E000 ; colours 224-255 To select whether writes to colour registers set the upper or lower colour 12 bits, register BPLCON3 is used again. Bit 9 selects upper or lower bits. Set this bit to 0 to set the upper 12 bits and set to 1 to set the lower 12 bits. This setting should be combined with the bank number. Code:
Copper example: select bank 0/upper 12 bits of colour: $0106,$0000 ; upper 12 bits of colours 0-31 select bank 0/lower 12 bits of colour: $0106,$0200 ; lower 12 bits of colours 0-31 select bank 1/upper 12 bits of colour: $0106,$2000 ; upper 12 bits of colours 32-63 select bank 1/lower 12 bits of colour: $0106,$2200 ; lower 12 bits of colours 32-63 ... select bank 7/upper 12 bits of colour: $0106,$E000 ; upper 12 bits of colours 224-255 select bank 7/lower 12 bits of colour: $0106,$E200 ; lower 12 bits of colours 224-255 *) for more information on all things AGA, including BPLCON3 settings, see: http://www.stashofcode.fr/code/affic...ndyOfComax.txt On the 68000 vs X86 topic: not sure that is on topic and I do believe this thread is already a split thread of a split thread (but I'd agree that 68000 is nicer to write ) Last edited by roondar; 06 September 2019 at 10:16. Reason: Added colour numbers |
|
22 September 2019, 11:38 | #29 |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Could someone spoon feed through my first copper list in 30 years?
I'm trying to make a split screen display, the top half being a 320x128 16 colour screen and the bottom half being a 320x128 8 colour screen. The thing I'm most troubled by are the wait instructions at the start and middle of the list, but I know there are other bits missing too. This is what I have so far: Code:
WORD copperList[] = { 0x0000, 0x0000, // wait for top of screen BPLCON0, COLORON | 4, // 4 bit planes BPL1PTH, NULL, BPL1PTL, NULL, BPL2PTH, NULL, BPL2PTL, NULL, BPL3PTH, NULL, BPL3PTL, NULL, BPL4PTH, NULL, BPL4PTL, NULL, COLOR00, 0x000, // Black COLOR01, 0x8ce, // Sky Blue COLOR02, 0xdb8, // Tan COLOR03, 0x282, // Forest Green COLOR04, 0xfff, // White COLOR05, 0xaaa, // Lightest Grey COLOR06, 0x999, // Light Grey COLOR07, 0x777, // Medium Grey COLOR08, 0x555, // Dark Grey COLOR09, 0x444, // Darkest Grey COLOR10, 0xf00, // Red COLOR11, 0x800, // Dark Red COLOR12, 0xf80, // Dark Orange COLOR13, 0xfdb, // Wheat COLOR14, 0x682, // Olive Drab COLOR15, 0x59a, // Cadet Blue 0x0000, 0x0000, // wait for middle of screen BPLCON0, COLORON | 3, // 3 bit planes BPL1PTH, NULL, BPL1PTL, NULL, BPL2PTH, NULL, BPL2PTL, NULL, BPL3PTH, NULL, BPL3PTL, NULL, COLOR00, 0x000, // Black COLOR01, 0xfff, // White COLOR02, 0x999, // Light Grey COLOR03, 0x777, // Medium Grey COLOR04, 0x555, // Dark Grey COLOR05, 0xf00, // Red COLOR06, 0x0f0, // Green COLOR07, 0x0f7, // Orange 0xffff, 0xfffe // end }; Last edited by deimos; 22 September 2019 at 11:54. |
22 September 2019, 12:51 | #30 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Code:
WORD copperList[] = { 0x01fc, 0x0000, 0x008e, 0x2c81, 0x0090, 0x2cc1, 0x0092, 0x0038, 0x0094, 0x00d0, // change it for scroll screen // wait for top of screen 0x2b07, 0xfffe, 0x0102, 0x0000, 0x0108, 0x0000, 0x010a, 0x0000, // change it if needed BPLCON0, COLORON | 4, // 4 bit planes BPL1PTH, NULL, BPL1PTL, NULL, BPL2PTH, NULL, BPL2PTL, NULL, BPL3PTH, NULL, BPL3PTL, NULL, BPL4PTH, NULL, BPL4PTL, NULL, COLOR00, 0x000, // Black COLOR01, 0x8ce, // Sky Blue COLOR02, 0xdb8, // Tan COLOR03, 0x282, // Forest Green COLOR04, 0xfff, // White COLOR05, 0xaaa, // Lightest Grey COLOR06, 0x999, // Light Grey COLOR07, 0x777, // Medium Grey COLOR08, 0x555, // Dark Grey COLOR09, 0x444, // Darkest Grey COLOR10, 0xf00, // Red COLOR11, 0x800, // Dark Red COLOR12, 0xf80, // Dark Orange COLOR13, 0xfdb, // Wheat COLOR14, 0x682, // Olive Drab COLOR15, 0x59a, // Cadet Blue // wait for middle of screen 0xabd7, 0xfffe, 0x0102, 0x0000, 0x0108, 0x0000, 0x010a, 0x0000, // change it if needed BPLCON0, COLORON | 3, // 3 bit planes BPL1PTH, NULL, BPL1PTL, NULL, BPL2PTH, NULL, BPL2PTL, NULL, BPL3PTH, NULL, BPL3PTL, NULL, COLOR00, 0x000, // Black COLOR01, 0xfff, // White COLOR02, 0x999, // Light Grey COLOR03, 0x777, // Medium Grey COLOR04, 0x555, // Dark Grey COLOR05, 0xf00, // Red COLOR06, 0x0f0, // Green COLOR07, 0x0f7, // Orange 0xffff, 0xfffe // end }; Cheers. EDIT: only C Last edited by ross; 22 September 2019 at 13:42. Reason: cleaned |
22 September 2019, 13:32 | #31 |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Thanks. I've taken your code and formatted as C, which is where I'm at at the moment. I might need some help with the bits that are "just numbers", i.e.
Code:
0x01fc, 0x0000 Code:
0x2b07, 0xfffe, Code:
0xabd7, 0xfffe, Code:
dc.l $01fc0000,$008e2c81,$00902cc1,$00920038,$009400d0 is 0x01fc, 0x0000, DIWSTRT, 0x2c81, DIWSTOP, 0x2cc1, DDFSTRT, 0x0038, DDFSTOP, 0x00d0 -- dc.l $2b07fffe,$01004200,$0108ffd8,$010affd8,$01020000 is 0x2b07, 0xfffe, BPLCON0, 0x4200, BPL1MOD, 0xffd8, BPL2MOD, 0xffd8, BPLCON1, 0x0000 -- dc.l $abd7fffe,$01020088,$01003200,$01080000,$010a0000 is 0xabd7, 0xfffe, BPLCON1, 0x0088, BPLCON0, 0x3200, BPL1MOD, 0x0000, BPL2MOD, 0x0000 |
22 September 2019, 13:49 | #32 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Disable AGA fetches.
Code:
0x2b07, 0xfffe, 07 because is the first position where COLOR00 do not appear on previous line, but you can change in case. Code:
0xabd7, 0xfffe, This way you have time to set parameters and colors before the next line, which is located in the vertical middle of the screen. Code:
BPL1MOD, 0xffd8, BPL2MOD, 0xffd8, BPLCON1, 0x0000 |
22 September 2019, 14:31 | #33 | |||
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Huh. That's new.
Quote:
Quote:
Quote:
I'll keep your explanations as comments in my code, and I'll probably be back with questions after I get all the other bits plugged in. Thanks. |
|||
22 September 2019, 16:18 | #34 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
FMODE:
http://www.winnicki.net/amiga/memmap/FMODE.html With FMODE=0 you reset to OCS/ECS 16bit fetches. Quote:
Actually when copper waits at xxnn, where nn<7, beam is still in line xx-1. So if the first MOVE after the WAIT is COLOR00 you can view the change in the far right border. If you WAIT for xx07 you're sure to have the change in the blanked part. Obviusly if you change some other register there's no problem. In the case in question the registers to be set are too many to do in the ($2c)HB so you must do it in the previous line ($2b). Setting to 07 is just a habit for me. Actually is the first screen so you can do it where you like even without the WAIT But suppose you have an overscan screen and another split between lines $1a and $2b... |
|
20 August 2021, 11:04 | #35 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,370
|
I understand it's not possible to wait until Y>255 but actually it is with "special" PAL wait.
but the "special PAL wait" part isn't clear to me. Code:
dc.w $FFDF,$FFFE when I add a color write in the copper interrupt, it still appears around 240 or such. I could draw in the VBLANK interrupt but I'd like to save a few raster lines and race the beam (specially because I'm using sprites) |
20 August 2021, 12:28 | #36 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Wait, maybe you are confusing absolute video position with relative position from the start of the screen.
Assuming that yours is a PAL screen in standard position, the first visible line is 44. This means that the wait dc.w $fffd,$fffeis at the relative line 256-44, and that you have another 44 lines visible after that And successive CWAIT restart as if it were y=0 (but really is 256). |
31 August 2021, 18:54 | #37 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 198
|
BibbyM asked in an old thread: http://eab.abime.net/showthread.php?t=21866
now this is where I start to lose understanding.. can someone explain a little more how this works (masks beam position etc) and I'll finish this off!! and it is really difficult to understand: Now I wrote a processing sketch what explains me the copper masking. (you have to entry the copper-command in line 24 and run the sketch.) (sorry, my program comments are in german) the result is on the bottom: eg. Code:
--- Copperanweisung --- für: dc.w $3019,$FFFE VP=30 dez:48 bin:00110000 ,HP=18 dez:24 bin:00011000 Bit 0=1 0=move, 1=wait oder skip VE=7F dez:127 bin:01111111 ,HE=FE dez:254 bin:11111110 Bit 0=0 0=wait, 1=skip bfd: 01 --- Alle vertikalen maskierten Positionen --- 30 00110000 dez= 48 diese wait-Position wird ausgeführt - VP ist überschritten B0 10110000 dez= 176 Position ab 0x80 kann nicht maskiert werden Das sind 2 Treffer. --- Alle horizontalen maskierten Positionen --- 18 00011000 dez= 24 19 00011001 dez= 25 Das sind 2 Treffer. under consideration of vertical and horizontal enable bits. (dc.w $3001,$FFFE, dc.w $3101,$87fe, dc.w $3001,$ff01, dc.w $0B07,$00fe,...) Last edited by Rock'n Roll; 09 July 2023 at 21:06. Reason: old file deleted |
06 July 2023, 20:56 | #38 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 198
|
I don't know how long I have been dealing with the topic of Copper Wait+Mask.
Then I had written myself a little program to understand the mask bits better. The last time I used the program, I found an error. I corrected the error and I added a graphical output to the program. for use: https://processing.org/download further more explanation on this tool. copper waits like this: dc.w $2139,$fffe it's clear but what about this: dc.w $0001,$80fe, dc.w $8001,$00fe or dc.w $9189,$6630, etc. With this tool it is possible to adjust all 4 parameters VP,HP,VE,HE over sliders and set the Wait/Skip Bit and the BFD Bit. The result is in realtime on the screen and shows the copper wait positions to the current setting and in the console. You get an imagine how the mask bit works and where the copper wait position is. Maybe nobody programs such a tool before? By the way, it's also a nice effect to watch the result. With processing it's easy to start. Program Download, Open the File and Run. It's clear every copper wait needs its own time. A next programstep could be to consider a distance between to copper waits. (not implemented yet). Also normally the last line is 313. The program shows further more, but it is easy to change and the program shows also copper waits behind $E2 till $FF. Last edited by Rock'n Roll; 09 July 2023 at 21:32. Reason: further more explanation |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UHRES? Mistery/curiosity - any explanation? | pandy71 | Coders. Asm / Hardware | 52 | 05 December 2020 15:38 |
A little explanation on GOTEK+HxC would be great.. | appiah4 | support.Hardware | 19 | 22 December 2016 13:12 |
whdload decent explanation ? | marcolau | project.WHDLoad | 5 | 01 December 2009 16:43 |
Error explanation?? | ORSM T | support.Hardware | 7 | 01 June 2007 07:36 |
code explanation | BippyM | Coders. General | 19 | 01 May 2007 14:12 |
|
|