Naive SNES ROM header strip
This commit is contained in:
parent
ced909bae4
commit
08dc0d8e35
|
@ -64,6 +64,8 @@ func load_snes_audio_thread(data_and_buffer: Array):
|
||||||
SoundLoader.parse_rom(data_and_buffer[0], data_and_buffer[1])
|
SoundLoader.parse_rom(data_and_buffer[0], data_and_buffer[1])
|
||||||
|
|
||||||
func load_snes_rom_from_bytes(bytes: PoolByteArray) -> void:
|
func load_snes_rom_from_bytes(bytes: PoolByteArray) -> void:
|
||||||
|
if (len(bytes) % 1024) == 512: # Naive header strip
|
||||||
|
bytes = bytes.subarray(512, -1)
|
||||||
self.snes_bytes = bytes
|
self.snes_bytes = bytes
|
||||||
self.snes_buffer = StreamPeerBuffer.new()
|
self.snes_buffer = StreamPeerBuffer.new()
|
||||||
self.snes_buffer.data_array = bytes
|
self.snes_buffer.data_array = bytes
|
||||||
|
|
Loading…
Reference in New Issue