driver update

- fixed gcc cross compilation linker woes by using aout instead of hunk for asm files
 - temporarily reverted to full ENC chip resets on initialization
This commit is contained in:
HenrykRichter
2019-06-06 15:30:08 +02:00
parent 906d8a902f
commit 9861a3f073
14 changed files with 139 additions and 21 deletions
+35 -7
View File
@@ -22,19 +22,45 @@
#include "device.h"
/* Enable this if you want pure C for the device. (disable compilation of romtag.asm in that case)
I personally prefer the small ASM blob to steer away from linking challenges.
I personally prefer a small ASM blob to steer away from linking challenges.
*/
#if 1
ASM LONG LibNull( void )
{
return 0;
}
extern const char DeviceName[];
extern const char DeviceVersionString[];
extern const APTR DeviceInitTab[];
/* force moveq #0,d0;rts in front of the ROMTAG */
#if 1
struct myrt0 {
ULONG ret0;
struct Resident rt;
};
/* There is a trick here:
LibNull() is actually a function returning 0
*/
const struct myrt0 LibNull =
{
0x70004E75,
{
RTC_MATCHWORD,
( struct Resident* ) ((char *)&LibNull+sizeof(ULONG)),
( struct Resident* ) ((char *)&LibNull+sizeof(ULONG)+sizeof(struct Resident)),
RTF_AUTOINIT,
DEVICEVERSION,
NT_DEVICE,
0,
(char*)DeviceName,
(char*)DeviceVersionString+6,
(APTR)DeviceInitTab
}
};
#else
/* hope that the compiler will put LibNull first */
ASM LONG LibNull( void )
{
return 0;
}
static const struct Resident _00RomTag = {
RTC_MATCHWORD,
( struct Resident* ) &_00RomTag,
@@ -49,5 +75,7 @@ static const struct Resident _00RomTag = {
};
#endif
#endif