Skip to content

Commit

Permalink
Use Supexec() to query EdDI version. Fixes for Coldfire CPU build.
Browse files Browse the repository at this point in the history
Contributed by Miro Kropacek
  • Loading branch information
pmandin committed May 22, 2019
1 parent fb1eded commit e7ea07e
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions src/video/ataricommon/SDL_atarieddi.S
Expand Up @@ -33,10 +33,38 @@
/*--- Vector installer ---*/

_Atari_get_EdDI_version:
movel sp@(4),a0 /* Value of EdDI cookie */
#if defined(__mcoldfire__)
movel sp@(4),a0
movel a0,eddi_cookie
lea sp@(-8),sp
moveml d2/a2,sp@
#else
movel sp@(4),eddi_cookie
moveml d2/a2,sp@-
#endif

/* Supexec() to avoid crash on FreeMiNT with MP */
pea get_EdDI_version(pc)
movew #38,sp@-
trap #14
addql #6,sp

#if defined(__mcoldfire__)
moveml sp@,d2/a2
lea sp@(8),sp
#else
moveml sp@+,d2/a2
#endif
rts

get_EdDI_version:
movel eddi_cookie,a0

/* Call EdDI function #0 */
clrw d0
jsr (a0)
jmp (a0)

rts
.bss

.even
.comm eddi_cookie, 4

0 comments on commit e7ea07e

Please sign in to comment.