-
Notifications
You must be signed in to change notification settings - Fork 10
FAQ
When will this be finished?!
Excellent question. Short answer: years (and years!). It's pretty much just me working on it, in my spare time... and it can be quite a grind.
If this is a decompilation, why do I need to provide the ROM?
This repo only contains the (partial) source code for the game, it does not include any of the game assets such as music, textures, character models, levels etc. This is a deliberate decision with the hope that we can avoid any Copyright claims.
What about Evo's Space Adventures?
PlayStation decompilation is much less mature than N64. It would be interesting to see whether there is any shared code - there is definitely shared data, for example the language files are almost exactly the same between N64/PlayStation.
See the (very WIP) ESA Decomp. There is both shared code and data (language data + level data as a minimum)
Here is a script to extract the sv.wad
file from ESA:
import sys
import struct
CHUNK_SIZE = 32
# 00000000: 5c63 6f6c 6c64 6174 612e 7363 6400 0000 \colldata.scd...
# 00000010: 0000 0000 0000 0000 50c1 0100 0000 0000 ........P.......
# 00000020: 5c6c 6576 656c 3031 2e63 616d 0000 0000 \level01.cam....
# 00000030: 0000 0000 50c1 0100 1c01 0000 0000 0000 ....P...........
# 00000040: 5c6c 6576 656c 3031 2e63 616e 0000 0000 \level01.can....
# 00000050: 0000 0000 6cc2 0100 6400 0000 0000 0000 ....l...d.......
def trim_string(inbytes):
return ''.join([chr(b) if b else '' for b in inbytes])
def main():
with open(sys.argv[1], 'rb') as f:
data = f.read()
if len(data) < 32:
sys.exit(1)
# consume 32 bytes at a time
i = 0
files = []
bytes_read = 0
while True:
chunk = data[i*CHUNK_SIZE:i*CHUNK_SIZE+CHUNK_SIZE]
if chunk[0] == 0:
# reached the end
break
filename = trim_string(chunk[:16]).replace('\\', '')
offset = struct.unpack('<I', chunk[20:24])[0]
length = struct.unpack('<I', chunk[24:28])[0]
file = { 'filename': filename, 'offset': offset, 'length': length }
files.append(file)
bytes_read += CHUNK_SIZE
i += 1
print(f'Found {i} files.')
for file in files:
filename = file['filename']
offset = file['offset']
length = file['length']
with open(f'dump/{filename}', 'wb') as o:
to_dump = data[offset:offset+length]
bytes_read += length
o.write(to_dump)
print(f'Wrote {i} files, consumed total of {bytes_read} of {len(data)}')
if __name__ == '__main__':
main()