English Amiga Board


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

 
 
Thread Tools
Old 03 August 2020, 23:45   #41
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by buzzybee View Post
Sorry, bit OT right now – but what´s that 32k boundaries all about?
The copper list for example is sitting at $48000-$4fffff

The screens are also setup on boundaries too, but yes i suppose i meant 64k boundaries so that only the low 16 bits of the 24 bit address need to be updated.
mcgeezer is offline  
Old 03 August 2020, 23:56   #42
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
I feel the need to redo my bobsnake routine in a normal, blitter interrupt and copper blitter version as I’ve never tried those. Damn I was trying to be productive as well
Antiriad_UK is offline  
Old 04 August 2020, 03:52   #43
FSizzle
Registered User
 
Join Date: Nov 2017
Location: Los Angeles
Posts: 49
Quote:
Originally Posted by ross View Post
When copper DMA fetches instruction/data from chip-memory, data is from now inside Agnus (copper MOVE already specifies a destination).

Thanks for the explanation! I confirmed all the timing as you've said with some test code and the DMA debugger. I was not giving the copper enough credit it seems
FSizzle is offline  
Old 04 August 2020, 10:32   #44
buzzybee
Registered User
 
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
Quote:
Originally Posted by Antiriad_UK View Post
I feel the need to redo my bobsnake routine in a normal, blitter interrupt and copper blitter version as I’ve never tried those. Damn I was trying to be productive as well
Thank god copper code for Reshoot Proxima is so busy controlling the display already, that I see no chance to add blitter control – otherwise I would feel the same. Very inspiring discussion here, about one of the Amigas most technically advanced games - while being very playable too, which really is something special.

I used to implement interrupt-driven blitter controller for Reshoot R and ditched it in the end for a more traditional approach, since it gained no speed advantage and also felt unstable on 060-machines.
buzzybee is offline  
Old 06 August 2020, 16:06   #45
pink^abyss
Registered User
 
Join Date: Aug 2018
Location: Untergrund/Germany
Posts: 408
Quote:
Originally Posted by Toni Wilen View Post
I think I have already replied few times when this topic has been discussed: simple test case that fails to wait correctly if only 1 WAIT is required. (for example blit something, WAIT, poke some blitter register that causes blit to change if WAIT failed (for example destination pointer. Preferably not BLTSIZE ).

Hi Toni, thanks for all your hard work!

I tried to create a simple testcase but it wasn't possible. I needed at least 15 moving blits to reproduce the issue.
Another observation is that the issue only seem to happen when display dma is fetching while the blitter registers are written from the copper list. I have 5 planes active.
pink^abyss is offline  
Old 06 August 2020, 18:34   #46
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by pink^abyss View Post
I tried to create a simple testcase but it wasn't possible. I needed at least 15 moving blits to reproduce the issue.
It doesn't make sense if the actual number of blits per frame makes a difference - sounds more like some timing thing that you accidentally hit after 15 blits (similar to the display dma thing you mentioned).
hooverphonique is offline  
Old 08 August 2020, 10:28   #47
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
A great fit for this engine would be Operation Wolf.

I reckon AGA would do the arcade proud, I can't seem to recall what the Amiga version was like (possibly an ST port).

[ Show youtube player ]

The game resolution is 320x240, you could probably get away with fetch mode x4 for bitplanes and hw sprites. You would only really need two hardware sprites to provide a 16 colour display panel to the right so an early DDFSTART could be used ($1c maybe??) to get the full resolution with scrolling each way.

Pop the game into dual playfield mode for a 16 colour scrolling background and the copper/blitter technique here for blitting all those bobs.

I reckon it would be close to the arcade for sure.

Geezer
mcgeezer is offline  
Old 08 August 2020, 12:45   #48
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
Quote:
Originally Posted by mcgeezer View Post
The game resolution is 320x240, you could probably get away with fetch mode x4 for bitplanes and hw sprites. You would only really need two hardware sprites to provide a 16 colour display panel to the right so an early DDFSTART could be used ($1c maybe??) to get the full resolution with scrolling each way.
I recall reading a thread about using the Copper on AGA in 4x fetch mode to create two separate horizontal screen areas moving into two separate directions. I can't find it now, but it would save those two Sprites
roondar is online now  
Old 08 August 2020, 14:54   #49
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by roondar View Post
I recall reading a thread about using the Copper on AGA in 4x fetch mode to create two separate horizontal screen areas moving into two separate directions. I can't find it now, but it would save those two Sprites
http://eab.abime.net/showthread.php?t=88062
ross is offline  
Old 08 August 2020, 15:26   #50
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by mcgeezer View Post
The game resolution is 320x240, you could probably get away with fetch mode x4 for bitplanes and hw sprites. You would only really need two hardware sprites to provide a 16 colour display panel to the right so an early DDFSTART could be used ($1c maybe??) to get the full resolution with scrolling each way.
I see 2 possibilities to do it safely even using DDFSTRT=$18:
- reversing the display panel position to the left (like Banshee do)
- using a three color single sprite
The panel is divided into clearly visible horizontals stripes of different colors that can be changed with copper (you can also sync for the machine gun loader color).
To avoid the problem of transparent black just use a right DIWSTOP and use BRDSPRT=1.
ross is offline  
Old 08 August 2020, 15:44   #51
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by ross View Post
I see 2 possibilities to do it safely even using DDFSTRT=$18:
- reversing the display panel position to the left (like Banshee do)
- using a three color single sprite
The panel is divided into clearly visible horizontals stripes of different colors that can be changed with copper (you can also sync for the machine gun loader color).
To avoid the problem of transparent black just use a right DIWSTOP and use BRDSPRT=1.
But how can you reliably change the colours with the copper wait when It is busy driving the blitter? Large bobs would miss the y position with the copper which is why i went for a 16 colour attached sprite.
mcgeezer is offline  
Old 08 August 2020, 17:48   #52
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by mcgeezer View Post
But how can you reliably change the colours with the copper wait when It is busy driving the blitter? Large bobs would miss the y position with the copper which is why i went for a 16 colour attached sprite.
It's not simple but can be done :
http://eab.abime.net/showpost.php?p=...5&postcount=19

But the first option (panel to the left) it is definitely much more effective and doesn't bother you with sprites usage (even allows you to use them elsewhere).
ross is offline  
Old 08 August 2020, 19:08   #53
lmimmfn
Registered User
 
Join Date: May 2018
Location: Ireland
Posts: 672
Why bother with the panel at all? Its not in the pc engine version and doesnt need to be so big, i. e. Sprites showing 3xrocket than each rocket available.
lmimmfn is offline  
Old 08 August 2020, 20:03   #54
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by lmimmfn View Post
Why bother with the panel at all? Its not in the pc engine version and doesnt need to be so big, i. e. Sprites showing 3xrocket than each rocket available.
I would say that when making a conversion from coin-op, you want to replicate it as closely as possible
DanScott is offline  
Old 08 August 2020, 21:05   #55
lmimmfn
Registered User
 
Join Date: May 2018
Location: Ireland
Posts: 672
Quote:
Originally Posted by DanScott View Post
I would say that when making a conversion from coin-op, you want to replicate it as closely as possible
No, i agree completely, i just mean if moving the panel to the left the no panel should probably be considered also.
It is strange that op wolf used a panel as theyre quite rare in arcades, but it does make sense with the gun in the arcade cabinet.
lmimmfn is offline  
Old 09 August 2020, 19:53   #56
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by roondar View Post
Right, it is indeed hard to be exact without measurements. Perhaps I should try it myself once to see how it goes. Thanks for your views though, they certainly sound reasonable.
I've spent today playing around with this. Disappointing results so probably done something wrong. I can upload thes exes/source if anyone interested.

I did a "normal" bobsnake routine. I guess bobsnakes are a more extreme case than a game because certain things are fixed (bltsize, modulos, bltapt/bltdpt) but it's what I had to hand.
- It's a $fca cookie cut minterm so all blitter channels enabled
- BOB is 16x16 pixels in 3 bitplanes (so 16*3 high and 2 word wide blits for interleaved)
- Display in 3 bitplane mode, 320x256


For normal routine
1. Clear screen with blitter
2. Update bob positions (dual sines for x and y)
3. Finish screen clear with spare CPU
4. Draw BOBs in a tight loop:

Result, 79 BOBs.

Code:
.loop
	movem.w	(a2)+,d0-d1		;also clears top of d0 and d1 (important)

	ror.l	#4,d0			;hiword of d0 contains shift in highest nibble
	add.w	d0,d0			;loword d0 contains byte offset into screen (x / 8)
	add.w	d0,d1			;add byte offset to y offset (WARNING: possible 64k overflow)
	swap	d0			;d0.w now contains shift value in top nibble
	move.w	d0,d2			;save B shift
	or.w	d3,d0			;add minterm
	swap	d0			;d0.l=bltcon0 in high word
	move.w	d2,d0			;d0.l=bltcon0 and bltcon1
					;d1.w=byte offset into screen
	add.l	a4,d1			;Add screen ptr to offset
	move.l	d1,a3			;save d1 for movem optimization - gives an extra bob :)

	move.w	a5,dmacon-dmaconr(a6)	;Blitter nasty on
.bw2:	btst.b	d5,(a6)			;blitwait
	bne.s	.bw2
	move.w	d6,dmacon-dmaconr(a6)	;Blitter nasty off

	move.l	d0,bltcon0-dmaconr(a6)	;bltcon0/1
	movem.l	d1/a0/a1/a3,bltcpth-dmaconr(a6)
	
	move.w	d4,bltsize-dmaconr(a6)	;BLTSIZE ($58)

	dbf	d7,.loop
For copper controlled routine
1. Clear screen with blitter from copperlist
2. Update bob positions (dual sines for x and y)
3. "draw" BOBs into the copperlist (first entry has to hit before screen clr finishes)
3. Finish screen clear with spare CPU
4. Enable blit nasty to finish the frame while copper running the BOBs

Result, 63 BOBs. Yuk.

Snippet of copperlist:
Code:
	rept	BOB_NUMBOBS
	dc.w    $0001,$0000		;blitwait, ignore pos
	dc.w    $0001,$0000		;blitwait
	CMOVE	bltcon0,$0000
	CMOVE	bltcon1,$0000
	CMOVE	bltcpth,$0000
	CMOVE	bltcptl,$0000
	CMOVE	bltbpth,$0000		;static
	CMOVE	bltbptl,$0000		;static
	CMOVE	bltapth,$0000		;static
	CMOVE	bltaptl,$0000		;static
	CMOVE	bltdpth,$0000
	CMOVE	bltdptl,$0000
	CMOVE	bltsize,((BOB_HEIGHT*BOB_NUMPLANES)*64)+BOB_WORDWIDTH+1	;bltsize/null
	endr
...
...
	rsreset
CL_BLT_WAIT1		rs.w	2
CL_BLT_WAIT2		rs.w	2
CL_BLT_BLTCON0		rs.w	2
CL_BLT_BLTCON1		rs.w	2
CL_BLT_BLTCPTH		rs.w	2
CL_BLT_BLTCPTL		rs.w	2
CL_BLT_BLTBPTH		rs.w	2
CL_BLT_BLTBPTL		rs.w	2
CL_BLT_BLTAPTH		rs.w	2
CL_BLT_BLTAPTL		rs.w	2
CL_BLT_BLTDPTH		rs.w	2
CL_BLT_BLTDPTL		rs.w	2
CL_BLT_BLTSIZE		rs.w	2
CL_BLT_SIZEOF		rs.w	0
"Draw" loop. Only needs to update bltcpth, bltdpth, bltcon0/1 - all the other blt regs were setup at startup as they don't change.
Code:
.loop
	movem.w	(a2)+,d0-d1		;also clears top of d0 and d1 (important)

	ror.l	#4,d0			;hiword of d0 contains shift in highest nibble
	add.w	d0,d0			;loword d0 contains byte offset into screen (x / 8)
	add.w	d0,d1			;add byte offset to y offset (WARNING: possible 64k overflow)
	swap	d0			;d0.w now contains shift value in top nibble
	move.w	d0,d2			;save B shift
	or.w	d3,d0			;add minterm
					;d1.w=byte offset into screen
	add.l	a4,d1			;Add screen ptr to offset
	
	;d0.w = bltcon0
	;d2.w = bltcon1
	;d1.l - bltcpth/bltdpth

	move.w	d0,CL_BLT_BLTCON0+2(a0)
	move.w	d2,CL_BLT_BLTCON1+2(a0)

	move.w	d1,CL_BLT_BLTDPTL+2(a0)
	move.w	d1,CL_BLT_BLTCPTL+2(a0)
	swap	d1
	move.w	d1,CL_BLT_BLTDPTH+2(a0)
	move.w	d1,CL_BLT_BLTCPTH+2(a0)

	lea	CL_BLT_SIZEOF(a0),a0

	dbf	d7,.loop
Could of course allocate on 64k boundaries and skip the high pointers, but could also do that with the non-copper version as well so left that alone.

I would say though if you had lots of CPU game logic then I think the results would be better for the copper version. The tight loop of a bob snake is a bit extreme I may do a blitter interrupt version even though that will be even slower, just because I've never attempted this kind of thing before.

Last edited by Antiriad_UK; 09 August 2020 at 20:06.
Antiriad_UK is offline  
Old 09 August 2020, 20:10   #57
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
@Antriad_UK - Could you do a screen shot of your WinUAE with "v -2" enabled so we can see the dma use?
mcgeezer is offline  
Old 09 August 2020, 20:17   #58
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Sure. Here are the two versions attached.
Edit: actually that doesn’t look right does it. Blits not running at the bottom of the frame compared to other version.
Attached Thumbnails
Click image for larger version

Name:	001.png
Views:	169
Size:	21.6 KB
ID:	68428   Click image for larger version

Name:	002.png
Views:	168
Size:	24.9 KB
ID:	68429  

Last edited by Antiriad_UK; 09 August 2020 at 21:04.
Antiriad_UK is offline  
Old 09 August 2020, 21:26   #59
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
Quote:
Originally Posted by Antiriad_UK View Post
Sure. Here are the two versions attached.
Edit: actually that doesn’t look right does it. Blits not running at the bottom of the frame compared to other version.
Is it possible the code accidentally stops at line 256?
Edit: no, that's can't be right, it stops too low in the frame for that.
roondar is online now  
Old 09 August 2020, 22:42   #60
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by roondar View Post
Is it possible the code accidentally stops at line 256?
That's what it looks like to me. Is a PAL wait $ffdf,$fffe (or similar) required ?
DanScott 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
Mega Typhoon ECS only? Photon HOL suggestions and feedback 8 16 April 2020 21:47
EAB/Lemon Super League 2017: Round 4 - Mega Typhoon Graham Humphrey EAB's competition 50 09 April 2017 11:01
Working copy of Mega Typhoon ECS game? ImmortalA1000 request.Old Rare Games 9 04 February 2013 06:38
Mega Typhoon Trainer Version - Working! plasmatron request.Old Rare Games 1 03 July 2011 23:52
Mega Typhoon haynor666 HOL contributions 1 19 August 2008 00:37

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 21:51.

Top

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