[hatari-devel] MP2 question
laurent.sallafranque at arkea.com
Fri Jan 21 13:09:30 CET 2011
I've spent some time on the DSP MPEG audio layer 2 player a few days ago to let it run under Hatari emulator.
Actually, it doesn't work because transfers between DMA and DSP (crossbar) are using a non documented function.
(A melt between handshake and non-handshake mode at the same time).
>From what I understand, datas are shifted while sent from the DMA play to the DSP receive transfer.
In the DSP code, I can read :
; Read 16 bits from DMA and
; perform special bit-shifting
; to compensate for read skewness.
bset #4,X:<<M_PCD ; Start frame sync.
_wait jclr #7,X:<<M_SR,_wait ; RDF
bclr #4,X:<<M_PCD ; Stop frame sync.
lsr A Y:DMA_r_state,x0
or x0,A #>$010000,x1
mpy x0,x1,A #>$ffff,x0
and x0,A A0,Y:DMA_r_state
First 4 instructions are waiting a sync data on the SSI port.
Last 8 instructions "compensate" an undocumented function.
I'd like to implement this undocumented transfer into Hatari's emulator to have the player running.
Could anybody tell me (with an example if possible) what exactly happens on the real hardware for this transfer mode ?
For example, if I want to transfer 3 words :
how are they received via the SSI port before the special bit shifting ?
I understand that "A1" register contains the original data which has just been decoded and DMA_r_state contains the "A0" part of the data which is used to decode the next transmitted data.
Thanks in advance.
PS : the one who wrote this is Tomas Berndtsson, <tomas at nocrew.org> from NoBrain/NoCrew
I've emailed him, but if you know him or if you think you can help me here, this would be great.
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. Tout
message etant susceptible d'alteration, l'emetteur decline toute
responsabilite au titre de ce message s'il a ete altere, deforme ou
This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised use or
dissemination is prohibited. As e-mails are susceptible to alteration,
the issuer shall not be liable for the message if altered, changed
More information about the hatari-devel