1 |
|
/* |
2 |
|
* audio.cpp - Audio support |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2002 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* Portions written by Marc Hellwig |
6 |
|
* |
7 |
|
* This program is free software; you can redistribute it and/or modify |
611 |
|
|
612 |
|
case siDeviceIcon: { |
613 |
|
M68kRegisters r; |
614 |
< |
static const uint16 proc[] = { |
615 |
< |
0x558f, // subq.l #2,sp |
616 |
< |
0xa994, // CurResFile |
617 |
< |
0x4267, // clr.w -(sp) |
618 |
< |
0xa998, // UseResFile |
619 |
< |
0x598f, // subq.l #4,sp |
620 |
< |
0x4879, 0x4943, 0x4e23, // move.l #'ICN#',-(sp) |
621 |
< |
0x3f3c, 0xbf76, // move.w #-16522,-(sp) |
622 |
< |
0xa9a0, // GetResource |
623 |
< |
0x245f, // move.l (sp)+,a2 |
624 |
< |
0xa998, // UseResFile |
625 |
< |
0x200a, // move.l a2,d0 |
626 |
< |
0x6604, // bne 1 |
627 |
< |
0x7000, // moveq #0,d0 |
628 |
< |
M68K_RTS, |
629 |
< |
0x2f0a, //1 move.l a2,-(sp) |
630 |
< |
0xa992, // DetachResource |
631 |
< |
0x204a, // move.l a2,a0 |
632 |
< |
0xa04a, // HNoPurge |
633 |
< |
0x7001, // moveq #1,d0 |
634 |
< |
M68K_RTS |
614 |
> |
static const uint8 proc[] = { |
615 |
> |
0x55, 0x8f, // subq.l #2,sp |
616 |
> |
0xa9, 0x94, // CurResFile |
617 |
> |
0x42, 0x67, // clr.w -(sp) |
618 |
> |
0xa9, 0x98, // UseResFile |
619 |
> |
0x59, 0x8f, // subq.l #4,sp |
620 |
> |
0x48, 0x79, 0x49, 0x43, 0x4e, 0x23, // move.l #'ICN#',-(sp) |
621 |
> |
0x3f, 0x3c, 0xbf, 0x76, // move.w #-16522,-(sp) |
622 |
> |
0xa9, 0xa0, // GetResource |
623 |
> |
0x24, 0x5f, // move.l (sp)+,a2 |
624 |
> |
0xa9, 0x98, // UseResFile |
625 |
> |
0x20, 0x0a, // move.l a2,d0 |
626 |
> |
0x66, 0x04, // bne 1 |
627 |
> |
0x70, 0x00, // moveq #0,d0 |
628 |
> |
M68K_RTS >> 8, M68K_RTS & 0xff, |
629 |
> |
0x2f, 0x0a, //1 move.l a2,-(sp) |
630 |
> |
0xa9, 0x92, // DetachResource |
631 |
> |
0x20, 0x4a, // move.l a2,a0 |
632 |
> |
0xa0, 0x4a, // HNoPurge |
633 |
> |
0x70, 0x01, // moveq #1,d0 |
634 |
> |
M68K_RTS >> 8, M68K_RTS & 0xff |
635 |
|
}; |
636 |
|
Execute68k((uint32)proc, &r); |
637 |
|
if (r.d[0]) { |