Skip to content
Permalink
Browse files

Use Supexec() to query EdDI version. Fixes for Coldfire CPU build.

Contributed by Miro Kropacek
  • Loading branch information
pmandin committed May 22, 2019
1 parent fb1eded commit e7ea07e8ce979ab3d0e6a16c06c9ca5c4dbeb7c5
Showing with 31 additions and 3 deletions.
  1. +31 −3 src/video/ataricommon/SDL_atarieddi.S
@@ -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.