macemu/SheepShaver/src/EthernetDriver/cpu_emulation.h
Alexei Svitkine 1cef34125c Add Etherner drive source code and CodeWarrior project file, from:
https://web.archive.org/web/20131124123749/http://gwenole.beauchesne.free.fr/sheepshaver/files/SheepShaver-Ethernet.tar.bz2

The project can be used in CodeWarrior to build a binary blob that
can then be converted into EthernetDriverFull.i by hexconv.cpp.
2015-06-06 12:15:29 -04:00

1 line
507 B
C

#ifndef CPU_EMULATION_H
#define CPU_EMULATION_H
static inline uint32 ReadMacInt32(uint32 addr) {return *(uint32 *)addr;}
static inline uint32 Host2MacAddr(uint8 *addr) {return (uint32)addr;}
static inline uint8 *Mac2HostAddr(uint32 addr) {return (uint8 *)addr;}
static inline void *Mac_memset(uint32 addr, int c, size_t n) {return memset(Mac2HostAddr(addr), c, n);}
static inline void *Mac2Host_memcpy(uint8 *dst, uint32 src, size_t n) {return memcpy(dst,Mac2HostAddr(src),n);}
#endif /* CPU_EMULATION */