MCPcopy
hub / github.com/fogleman/nes / readSRAM

Function readSRAM

ui/util.go:231–242  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

229}
230
231func 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}

Callers 1

loadMethod · 0.85

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected