Tonma (./6) :
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
Badly constructed file lists.
Asm would be :
.ascii "DEMO2.SPR"
.byte 0x00 ;* string end
.byte 0x03 ;* bank
.byte 0x00 ;* pad byte (possibly replace with .align 2)
.long 0x00 ;* address
C would be like:
const char bgspr[]="DEMO2.SPR\x00\x03\x00\x00\x00\x00\x00";
loadList(bgspr);