5Fermer7
TonmaLe 10/10/2018 à 11:30
Thanks,

I tried your asm function but I have error I/O. And this time I checked twice the presence of the file. I don't know how create a correct file list.
I found this example in the wiki :
"STAGE_2.SPR" ;Name 0x02 ;Bank 0x00 ;align 0x00001600 ;Destination
With C :
void loadList(char *list); char *bgspr = "DEMO2.SPR0,$300000"; // $(bank3)(align=0)(adress=0000) if (p1e&JOY_B) { loadList(bgspr); }
With asm only :
.globl loadList loadList: move.l #ListFile, a0 movem.l d2-d7/a2-a6, -(sp) jsr 0xc00552 movem.l (sp)+, d2-d7/a2-a6 rts ListFile: .ascii "DEMO2.SPR" .byte 0x03 .byte 0x00 .long 0x00

@blastar
I tested with mame 0.202 but I have the same error. The music files are only played one time.
I use the HPMAN code to play music file n°2 with loop and leave the CDDA_FLAG to 0

__asm__ ( "move.l %0, %%d0 \n" "movem.l %%d2-%%d7/%%a2-%%a6, -(%%a7) \n" "jsr 0xc0056a \n" "movem.l (%%a7)+, %%d2-%%d7/%%a2-%%a6 \n" : :"r"(0x0402) :"d0", "d1", "a0", "a1", "cc" );