English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 June 2016, 11:14   #1021
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
Do what you can. what I am thinking is the actual cost of different paralax techniques on Amiga.

In JIM power copper copied background sprites are using all available DMA in display area, something i find very ineffective.

In Agony, static black and white plane requies blitter copying of entire bitplane every few frames - something also resource hungry.

In Risky woods they have to use 4 bitplanes in order to use 4 bitplanes sprite paralax effect - also no DMA left in display area.

So far our Ryggar DMA usage is very low and we have the superb graphics also. It would be even better if you would FINALLY fix display resolution ;-)

As far as i can see we could also make from sprites front field on the down of the screen - something like they did in Jim Power.
I did something with resolution, now I'm working on a new joy routine, when ready, I'll upload it, and do some test with it.

Now we'ree wasting a lot of time with blitter waiting since, so far, no interleaved bitmap used.

We're doing well, a lot of spare dma cicles.

There is a bug on winuae 3.3.0 that prevent me to copy my copperlist

Last edited by sandruzzo; 15 June 2016 at 11:23.
sandruzzo is offline  
Old 16 June 2016, 00:23   #1022
ReadOnlyCat
Code Kitten
 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
Quote:
Originally Posted by Trachu View Post
In Agony, static black and white plane requies blitter copying of entire bitplane every few frames - something also resource hungry.
Note that the amount to copy is highly dependent on the image content. With a cleverly crafted image (lots of uniform areas) the cost could be reduced very significantly.
ReadOnlyCat is offline  
Old 16 June 2016, 00:26   #1023
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,016
Quote:
Originally Posted by sandruzzo View Post
I did something with resolution, now I'm working on a new joy routine, when ready, I'll upload it, and do some test with it.

Now we'ree wasting a lot of time with blitter waiting since, so far, no interleaved bitmap used.

We're doing well, a lot of spare dma cicles.

There is a bug on winuae 3.3.0 that prevent me to copy my copperlist
Prevents you copying the copperlist? How so?
Galahad/FLT is offline  
Old 16 June 2016, 00:32   #1024
ReadOnlyCat
Code Kitten
 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
Quote:
Originally Posted by Galahad/FLT View Post
Prevents you copying the copperlist? How so?
UAE also has very handy copperlist dumping debug functions which can be even more practical than a native debugger.

Cf this post from Tony: http://eab.abime.net/showpost.php?p=963797&postcount=9
ReadOnlyCat is offline  
Old 16 June 2016, 07:51   #1025
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Galahad/FLT View Post
Prevents you copying the copperlist? How so?
When I try to accesso to a file that i use to copy the copperlist, winuae crash
sandruzzo is offline  
Old 18 June 2016, 14:10   #1026
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
here My copperlist

Copper:
dc.w $01fc,0 ; slow fetch mode AGA compatibility
dc.w $0100,$5200

CopScreen:

dc.w $8E,$2c98 ; DiwStrt
dc.w $90,$f481 ; DiwStop

dc.w $8E,$2c81 ; DiwStrt
dc.w $90,$2cc1 ; DiwStop

dc.w $92,$0039 ; DdfStart
dc.w $94,$00aa ; DdfStop


dc.w $0108,$0000+4
dc.w $010a,$0000+4

dc.w $0102
CopScroll:
dc.w $0000

dc.w $0104,$0001

CopSpr:
dc.w $0120,00000
dc.w $0122,00000
dc.w $0124,00000
dc.w $0126,00000
dc.w $0128,00000
dc.w $012a,00000
dc.w $012c,00000
dc.w $012e,00000
dc.w $0130,00000
dc.w $0132,00000
dc.w $0134,00000
dc.w $0136,00000
dc.w $0138,00000
dc.w $013a,00000
dc.w $013c,00000
dc.w $013e,00000

CopBpl:
dc.w $00e0,00000
dc.w $00e2,00000
dc.w $00e4,00000
dc.w $00e6,00000
dc.w $00e8,00000
dc.w $00ea,00000
dc.w $00ec,00000
dc.w $00ee,00000
dc.w $00f0,00000
dc.w $00f2,00000

dc.w $0180
Color0: dc.w $0000

dc.w $0182,$0310,$0184,$0700,$0186,$0900
dc.w $0188,$0c00,$018a,$0c70,$018c,$0eb0,$018e,$0eed
dc.w $0190,$0eca,$0192,$0ca8,$0194,$0a87,$0196,$0864
dc.w $0198,$0444,$019a,$0577,$019c,$0799,$019e,$09bb
dc.w $01a0,$0455,$01a2,$0852,$01a4,$0c94,$01a6,$0efb
dc.w $01a8,$0852,$01aa,$0064,$01ac,$0095,$01ae,$05c8
dc.w $01b0,$0c94,$01b2,$0420,$01b4,$0520,$01b6,$0630
dc.w $01b8,$0efb,$01ba,$0840,$01bc,$0950,$01be,$0d94

SprPos: ds.w 40*ParallaxHeight

dc.w $ffff,$fffe

Here my tab used to generate copper sprite

SprPrxS:
dc.w $0140,$0048
dc.w $0148,$0050
dc.w $0150,$0058
dc.w $0158,$0060

dc.w $0160,$0068
dc.w $0168,$0070
dc.w $0170,$0078
dc.w $0178,$0080

dc.w $0140,$0088
dc.w $0148,$0090
dc.w $0150,$0098
dc.w $0158,$00a0

dc.w $0160,$00a8
dc.w $0168,$00b0
dc.w $0170,$00b8

No voodoo here..

Last edited by sandruzzo; 19 June 2016 at 12:38.
sandruzzo is offline  
Old 22 June 2016, 23:22   #1027
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
Ok, as far as I can see there is the following cost of different techniques:

1. 32 colours 5 bitplane front page - no dual paralax (only front gameplay area).
Ryggar sprite fetches 8 words per scanline 8x32=256cc

2. 26 colours 5 bitplane front page - 128x100px background sprite paralax
Ryggar is 4 bitplane BOB and fetches 3x29x32=2784cc
Sprites fetches 8x2x100=1600cc
Cooper fetches 32x100=3200cc
Total cost: 2784+1600+3200=7584cc
Using this method paralax costs us 7584-256= 7328cc (every frame)more than no paralax mode

3. 26 colours 5 bitplane front page - 64x100px background sprite 4-7 paralax
Ryggar sprite 0-3 fetches 8 words per scanline 8x32=256cc
Sprites fetches 4x2x100=800cc
Cooper fetches 64x100=6400cc
Total cost: 256+800+6400=7456cc
Using this method paralax costs us 7456-256= 7200cc (every frame)more than no paralax mode

I believe version 3 is bad idea because it actually fetches only little less colour clocks, at the cost of much smaller paralax screen. I think our approach is the most optimal in case of 5 bitplane screen.

We finally will use a 256x192 screenmode, plus 16 pixels for scrolling, resulting in bitplane DMA for 272x192. It uses 5 bitplanes. This costs (272/16)*192*5 colour clocks, or 16320 colour clocks total for bitplane DMA.

The Amiga has 226x313 colour clocks available per PAL frame, or 70738 in total.
Memory refresh costs 4 colour clocks per scanline: 313x4 = 1252.
Audio costs up to 4 colour clocks per scanline: 313x4 = 1252.
Background paralax cost = 7328

So, finally we should have 70738 - 1.252 - 1.252 - 7328 - 16320 = 44586 colour clocks left.
Each enemy bob costs also 2784, so ten of them would requie 27840 colour clocks, still plenty to deal with the rest of the game. I believe we can fit into 50Hz!!!

Last edited by Trachu; 23 June 2016 at 00:28.
Trachu is offline  
Old 23 June 2016, 06:23   #1028
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
Ok, as far as I can see there is the following cost of different techniques:

1. 32 colours 5 bitplane front page - no dual paralax (only front gameplay area).
Ryggar sprite fetches 8 words per scanline 8x32=256cc

2. 26 colours 5 bitplane front page - 128x100px background sprite paralax
Ryggar is 4 bitplane BOB and fetches 3x29x32=2784cc
Sprites fetches 8x2x100=1600cc
Cooper fetches 32x100=3200cc
Total cost: 2784+1600+3200=7584cc
Using this method paralax costs us 7584-256= 7328cc (every frame)more than no paralax mode

3. 26 colours 5 bitplane front page - 64x100px background sprite 4-7 paralax
Ryggar sprite 0-3 fetches 8 words per scanline 8x32=256cc
Sprites fetches 4x2x100=800cc
Cooper fetches 64x100=6400cc
Total cost: 256+800+6400=7456cc
Using this method paralax costs us 7456-256= 7200cc (every frame)more than no paralax mode

I believe version 3 is bad idea because it actually fetches only little less colour clocks, at the cost of much smaller paralax screen. I think our approach is the most optimal in case of 5 bitplane screen.

We finally will use a 256x192 screenmode, plus 16 pixels for scrolling, resulting in bitplane DMA for 272x192. It uses 5 bitplanes. This costs (272/16)*192*5 colour clocks, or 16320 colour clocks total for bitplane DMA.

The Amiga has 226x313 colour clocks available per PAL frame, or 70738 in total.
Memory refresh costs 4 colour clocks per scanline: 313x4 = 1252.
Audio costs up to 4 colour clocks per scanline: 313x4 = 1252.
Background paralax cost = 7328

So, finally we should have 70738 - 1.252 - 1.252 - 7328 - 16320 = 44586 colour clocks left.
Each enemy bob costs also 2784, so ten of them would requie 27840 colour clocks, still plenty to deal with the rest of the game. I believe we can fit into 50Hz!!!
If we do some modify to bobs layout we can even get some more cycles from rygar. Since I would like to use interleaved bitmap to free cpu, and if we map rygar to planes 1-3-5, with only 2 blit operations we can spare a lot of time. First, will be full coockie cut, and second will be used to make an hole into bitplane 2-4!

Who know maybe we can even try 6 planes...

Keep in mind that since I don't do the classic coockie cut way:

save screen->draw bob->restore screen.

we have a lot power to use.

I do this: draw-bob->restore screen

Last edited by sandruzzo; 23 June 2016 at 11:49.
sandruzzo is offline  
Old 23 June 2016, 14:55   #1029
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
hows it possible to restore screen in situation you dont know what it was before because you have not save it????

Considering your request i have a few questions:
1. Since it is the mask which selectes the pixels can i use all 8 coloursexcept transparent??

2, I believe in this situation what we are looking is two sets of 8 colours bobs, but one of this sets must use half bright colours hmmmm. Some bobs would use one set others would use other.
Trachu is offline  
Old 23 June 2016, 14:59   #1030
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
hows it possible to restore screen in situation you dont know what it was before because you have not save it????

Considering your request i have a few questions:
1. Since it is the mask which selectes the pixels can i use all 8 coloursexcept transparent??

2, I believe in this situation what we are looking is two sets of 8 colours bobs, but one of this sets must use half bright colours hmmmm. Some bobs would use one set others would use other.
Very simple: since I have a triple buffer, I pick up screen to restore from third buffer

1) I think so, we have to try.

2) Yes, since we use half bright, we have to do some test.
sandruzzo is offline  
Old 23 June 2016, 16:26   #1031
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
Considering Amiga architecture limitations this is what i allocated

Bitplanes - colour register
000000 - 00 copperised sprite colour 0
000001 - 01 Foreground
000010 - 02 Foreground
000011 - 03 Foreground
000100 - 04 Foreground
000101 - 05 Foreground
000110 - 06 Foreground
000111 - 07 Foreground
001000 - 08 Foreground
001001 - 09 Foreground
001010 - 10 Foreground, BOB colour set 1, colour 1
001011 - 11 Foreground, BOB colour set 1, colour 2
001100 - 12 Foreground
001101 - 13 Foreground
001110 - 14 Foreground, BOB colour set 1, colour 3
001111 - 15 Foreground, BOB colour set 1, colour 4
010000 - 16 Foreground
010001 - 17 background sprite colour 1
010010 - 18 background sprite colour 2
010011 - 19 background sprite colour 3
010100 - 20 background sprite colour 1
010101 - 21 Foreground, BOB colour set 2, colour 1
010110 - 22 Foreground
010111 - 23 Foreground, BOB colour set 2, colour 2
011000 - 24 background sprite colour 2
011001 - 25 Foreground
011010 - 26 Foreground, BOB colour set 1, colour 5
011011 - 27 Foreground, BOB colour set 1, colour 6
011100 - 28 background sprite colour 3
011101 - 29 Foreground, BOB colour set 2, colour 3
011110 - 30 Foreground, BOB colour set 1, colour 7
011111 - 31 Foreground, BOB colour set 2, colour 4, BOB colour set 1, colour 8

....
....
110101 - 53 Foreground, BOB colour set 2, colour 5 (half bright of colour 1)
110111 - 55 Foreground, BOB colour set 2, colour 6 (half bright of colour 2)
111101 - 61 Foreground, BOB colour set 2, colour 7 (half bright of colour 3)
111111 - 63 Foreground, BOB colour set 2, colour 8 (half bright of colour 4)
Trachu is offline  
Old 23 June 2016, 16:41   #1032
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
Considering Amiga architecture limitations this is what i allocated

Bitplanes - colour register
000000 - 00 copperised sprite colour 0
000001 - 01 Foreground
000010 - 02 Foreground
000011 - 03 Foreground
000100 - 04 Foreground
000101 - 05 Foreground
000110 - 06 Foreground
000111 - 07 Foreground
001000 - 08 Foreground
001001 - 09 Foreground
001010 - 10 Foreground, BOB colour set 1, colour 1
001011 - 11 Foreground, BOB colour set 1, colour 2
001100 - 12 Foreground
001101 - 13 Foreground
001110 - 14 Foreground, BOB colour set 1, colour 3
001111 - 15 Foreground, BOB colour set 1, colour 4
010000 - 16 Foreground
010001 - 17 background sprite colour 1
010010 - 18 background sprite colour 2
010011 - 19 background sprite colour 3
010100 - 20 background sprite colour 1
010101 - 21 Foreground, BOB colour set 2, colour 1
010110 - 22 Foreground
010111 - 23 Foreground, BOB colour set 2, colour 2
011000 - 24 background sprite colour 2
011001 - 25 Foreground
011010 - 26 Foreground, BOB colour set 1, colour 5
011011 - 27 Foreground, BOB colour set 1, colour 6
011100 - 28 background sprite colour 3
011101 - 29 Foreground, BOB colour set 2, colour 3
011110 - 30 Foreground, BOB colour set 1, colour 7
011111 - 31 Foreground, BOB colour set 2, colour 4, BOB colour set 1, colour 8

....
....
110101 - 53 Foreground, BOB colour set 2, colour 5 (half bright of colour 1)
110111 - 55 Foreground, BOB colour set 2, colour 6 (half bright of colour 2)
111101 - 61 Foreground, BOB colour set 2, colour 7 (half bright of colour 3)
111111 - 63 Foreground, BOB colour set 2, colour 8 (half bright of colour 4)
with this allocation we'll lost a lot of colors. Maybe for now it's better to have the oldest layout.

You did a hell of job, and they look so good! Now i'm working on buddies system. 8 colors for enemies seems to few. Do you have any test pic?
sandruzzo is offline  
Old 23 June 2016, 19:50   #1033
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
this would be the layout only for bobs':

000001 rygar color 1
000100 rygar color 2
000101 rygar color 3
010000 rygar color 4
010001 rygar color 5
010100 rygar color 6
010101 rygar color 7

enemies:

000010 enemy color 1
001000 enemy color 2
001010 enemy color 3
100000 enemy color 4
100010 enemy color 5
101000 enemy color 6
101010 enemy color 7
sandruzzo is offline  
Old 23 June 2016, 23:46   #1034
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
Quote:
Originally Posted by sandruzzo View Post
this would be the layout only for bobs':

000001 rygar color 1
000100 rygar color 2
000101 rygar color 3
010000 rygar color 4
010001 rygar color 5
010100 rygar color 6
010101 rygar color 7

enemies:

000010 enemy color 1
001000 enemy color 2
001010 enemy color 3
100000 enemy color 4
100010 enemy color 5
101000 enemy color 6
101010 enemy color 7
i want to have full 8 colours per bob, not 7
Your enemies will use bright version of colour 0 which is copperised, so the enemies could use only 6. Mine version is better,
Trachu is offline  
Old 24 June 2016, 07:05   #1035
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
i want to have full 8 colours per bob, not 7
Your enemies will use bright version of colour 0 which is copperised, so the enemies could use only 6. Mine version is better,

With interleaved two bitmaps, is that what we can do.
sandruzzo is offline  
Old 24 June 2016, 07:16   #1036
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Why do you want to limit the colours so much just to save slightly on the drawing? It seems crazy to sacrifice so many colours just so you don't have to cookie cut 5 bitplanes (assuming you're doing 3 cookie cut planes and then punching the mask into the other 2).
Codetapper is offline  
Old 24 June 2016, 07:19   #1037
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Codetapper View Post
Why do you want to limit the colours so much just to save slightly on the drawing? It seems crazy to sacrifice so many colours just so you don't have to cookie cut 5 bitplanes (assuming you're doing 3 cookie cut planes and then punching the mask into the other 2).
It was a test. I would like to free as much as I can cpu. Obviosly that current version is looking good, and I think we left it
sandruzzo is offline  
Old 24 June 2016, 10:30   #1038
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
Codetapper: Sandruzzo wants to make the Ryggar technical masterpiecie and that is why i like him
You started this thread by hipthetical question we turn back in time. Now we know ,in 1990 Sandruzzo would never finish the game LOL. This thread is becoming more than just this game, we are exploring unresearched Amiga possibilities.
Converting the sprites to 8+8 is doable however not easy as long as you want to have good quality.

Last edited by Trachu; 24 June 2016 at 10:47.
Trachu is offline  
Old 24 June 2016, 11:37   #1039
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
Quote:
Originally Posted by Trachu View Post
Codetapper: Sandruzzo wants to make the Ryggar technical masterpiecie and that is why i like him
You started this thread by hipthetical question we turn back in time. Now we know ,in 1990 Sandruzzo would never finish the game LOL. This thread is becoming more than just this game, we are exploring unresearched Amiga possibilities.
Converting the sprites to 8+8 is doable however not easy as long as you want to have good quality.
All of us is doing what we have, in order to have a masterpiecie. And exploring new way to do thing is part of the process.
sandruzzo is offline  
Old 24 June 2016, 13:18   #1040
Trachu
Registered User
 
Join Date: Dec 2015
Location: Poland
Posts: 189
considering 8c enemies this is what i have so far :P
Attached Thumbnails
Click image for larger version

Name:	rygarenemiescorrected9cBOBspritesv2.png
Views:	341
Size:	13.6 KB
ID:	48955   Click image for larger version

Name:	rygarenemiescorrected9cBOBsprites.png
Views:	173
Size:	14.1 KB
ID:	48956  
Trachu 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
rygar? Prosonic support.Games 7 09 June 2013 14:18
two more that borrow heavily from Rygar & Black Tiger NfernalNfluence Nostalgia & memories 5 30 September 2012 18:57
SCIENCE 451-RYGAR: same disks mrodfr project.TOSEC (amiga only) 0 26 December 2006 15:38
Wordworth conversion vertigo support.Apps 5 09 December 2003 14:46

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 05:18.

Top

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