|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2020 [email protected] ! 4: // ! 5: ! 6: #include "fuserom.h" ! 7: ! 8: FuseROMDevice::FuseROMDevice() ! 9: : inherited() ! 10: { ! 11: logname = "fuserom"; ! 12: ! 13: mem = new uint8[sizeof(src) * 8]; ! 14: mask = (sizeof(src) * 8) - 1; ! 15: } ! 16: ! 17: FuseROMDevice::~FuseROMDevice() ! 18: { ! 19: delete[] mem; ! 20: } ! 21: ! 22: bool ! 23: FuseROMDevice::Init() ! 24: { ! 25: // バイトデータ ! 26: memcpy(src, "MNAME=LUNA88K", 13 + 1); ! 27: ! 28: // 1ロングワードに1ニブルずつ置いてある ! 29: uint32 *d = (uint32 *)mem; ! 30: for (int i = 0; i < sizeof(src); i++) { ! 31: *d++ = htobe32((src[i] << 24) | 0x0fffffff); ! 32: *d++ = htobe32((src[i] << 28) | 0x0fffffff); ! 33: } ! 34: return true; ! 35: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.