diff options
Diffstat (limited to 'src/devices/bus/isa/ne2000.cpp')
-rw-r--r-- | src/devices/bus/isa/ne2000.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/devices/bus/isa/ne2000.cpp b/src/devices/bus/isa/ne2000.cpp index efd448fe3da..452aceb55c5 100644 --- a/src/devices/bus/isa/ne2000.cpp +++ b/src/devices/bus/isa/ne2000.cpp @@ -3,6 +3,8 @@ #include "emu.h" #include "ne2000.h" +#include "multibyte.h" + DEFINE_DEVICE_TYPE(NE2000, ne2000_device, "ne2000", "NE2000 Network Adapter") @@ -23,10 +25,11 @@ ne2000_device::ne2000_device(const machine_config& mconfig, const char* tag, dev } void ne2000_device::device_start() { - char mac[7]; + uint8_t mac[6]; uint32_t num = machine().rand(); memset(m_prom, 0x57, 16); - sprintf(mac+2, "\x1b%c%c%c", (num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff); + mac[2] = 0x1b; + put_u24be(mac+3, num); mac[0] = 0; mac[1] = 0; // avoid gcc warning memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); |