Re: [hatari-devel] falcon crossbar and ff8932

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Salut Nicolas,

Je viens d'écrire un PRG et de le tester.

Il appelle le TRAP et affiche les valeurs en $ffff8930.w et $ffff8932.w


- sur hatari, je lis

$ffff8930.w : 0001
$ffff8932.w : 0000

- sur falcon, je lis

$ffff8930.w : 0000
$ffff8932.w : 0000

Il y a bien une différence.

Je lance le PRG directement après que mon Falcon ait booté (je n'ai pas de programmes résidents en mémoire à part le driver du disque dur).

J'ai mis le source et le PRG si tu veux controler ou modifier le programme de test.
Je peux faire d'autres tests si besoin, pas de problème.

Laurent




Le 22/09/2016 à 16:39, Nicolas Pomarède a écrit :
Le 22/09/2016 à 10:25, Nicolas Pomarède a écrit :
Le 21/09/2016 à 22:20, Laurent Sallafranque a écrit :
Hi,

When I coded the crossbar, I used another file that describes the
registers.
I haven't got any official doc for this, I did it by guessing the
behaviour and with the help of the hardware.txt file.
I don't ever think I had a Falcon by the time.

I don't think it is possible to disconnect completly the sound from the
crossbar, I'll have to check this with my Falcon.

If you look at the compendium, it gives another mapping for this
register (which seems to be wrong anyway).

I'll do some tests.

Laurent




Teaser : based on this info (but not directly related), I should be able
to provide a fix to remove the noisy / random sound under Falcon
crossbar ;-)



By the way, could you test on a real Falcon a call to xbios $8c with param=1 ? (function sndstatus).

This is supposed to reset the sound to some default values and to disconnect the crossbar matrix.

Can you read the crossbard registers af $ff89xx after this call, to see what are those default values ?

eg :

move.w    #1,-(sp)
move.w    #$8c,-(sp)
trap      #14
addq.l    #4,sp


Nicolas




Attachment: DMA_TEST.PRG
Description: Binary data

;	Test of the Falcon crossbar
;

	; supervisor mode
	pea     0
	move.w  #$20,-(sp)
	trap    #1
	addq.l  #6,sp


	; Call the crossbar
	move.w    #1,-(sp)
	move.w    #$8c,-(sp)
	trap      #14
	addq.l    #4,sp


	move.w	$ffff8930.w,d0
	lea	DMA_ff8930,a0
	jsr	PrintHexWord

	move.w	$ffff8932.w,d0
	lea	DMA_ff8932,a0
	jsr	PrintHexWord

	pea     DMA_Text
	move.w  #9,-(sp)
	trap    #1
	addq.l  #6,sp


	bsr	TestKey

	clr.w   -(sp)			; exit program
	trap    #1



TestKey
	cmp.b	#$39,$fffffc02.w
	bne.s	TestKey
.release_key
	cmp.b	#$39,$fffffc02.w
	beq.s	.release_key
	rts


;---------------------------------------------------------------
; Print hexa ascii value of D0 in the buf A0

; print a value between 0 and 15
PrintHex4bits
	move.l	d0,-(sp)
	and.w	#$f,d0

	move.b	HexTab(pc,d0.w),(a0)+

	move.l	(sp)+,d0
	rts

; print a value between 0 and 255
PrintHexByte
	movem.l	d0-d1,-(sp)
	move.b	d0,d1
	lsr.w	#4,d0
	and.w	#$f,d0
	and.w	#$f,d1

	move.b	HexTab(pc,d0.w),(a0)+
	move.b	HexTab(pc,d1.w),(a0)+

	movem.l	(sp)+,d0-d1
	rts

; print a value between 0 and 65535
PrintHexWord
	movem.l	d0-d1,-(sp)

	REPT	4
	rol.w	#4,d0
	move.b	d0,d1
	and.w	#$f,d1
	move.b	HexTab(pc,d1.w),(a0)+
	ENDR

	movem.l	(sp)+,d0-d1
	rts

HexTab
	dc.b	"0123456789abcdef"
	even





DMA_Text:	dc.b	"Falcon Crossbar test",10,13,10,13

DMA_ff8930:	dc.w	0

		dc.b	"      "

DMA_ff8932:	dc.w	0

		dc.b	10,13,0

		even


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/