(filename string)
| 229 | } |
| 230 | |
| 231 | func readSRAM(filename string) ([]byte, error) { |
| 232 | file, err := os.Open(filename) |
| 233 | if err != nil { |
| 234 | return nil, err |
| 235 | } |
| 236 | defer file.Close() |
| 237 | sram := make([]byte, 0x2000) |
| 238 | if err := binary.Read(file, binary.LittleEndian, sram); err != nil { |
| 239 | return nil, err |
| 240 | } |
| 241 | return sram, nil |
| 242 | } |