From c17e47177fdfc12543248b8c523de82925b19e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Wed, 1 May 2013 20:07:22 +0000 Subject: [PATCH] XHDI handler doesn't get called? --- sources/xhdi_sd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sources/xhdi_sd.c b/sources/xhdi_sd.c index a5be9cb..6b35170 100644 --- a/sources/xhdi_sd.c +++ b/sources/xhdi_sd.c @@ -17,6 +17,8 @@ static xhdi_call_fun old_vector = NULL; __attribute__((__interrupt__)) xhdi_call_fun xhdi_sd_install(xhdi_call_fun ov) { old_vector = ov; + long *_drvbits = 0x4c2; + /* THIS does not work: return (xhdi_call_fun) &xhdi_call; */ __asm__ __volatile__ ( "move.l %[xhdi_call],d1\n\t" @@ -24,6 +26,9 @@ __attribute__((__interrupt__)) xhdi_call_fun xhdi_sd_install(xhdi_call_fun ov) : /* output */ : [xhdi_call]"g"(xhdi_call) : "d1","memory"); + + *_drvbits |= (1 << ('O' - 'A')); + return (xhdi_call_fun) xhdi_call; } @@ -66,7 +71,7 @@ uint32_t xhdi_eject(UINT16_T major, UINT16_T minor, UINT16_T do_eject, UINT16_T uint32_t xhdi_drivemap(void) { - uint32_t map = 1; + long map = (1 << ('O' - 'A')); return map; }