1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 22:30:15 +00:00

fixbaserom.py: Add support to v64 format and improve performance (#629)

* Add byte swap for v64 files

Signed-off-by: angie <angheloalf95@gmail.com>

* Reduce `len` function calls

Signed-off-by: angie <angheloalf95@gmail.com>

* Optimze a bit the byte-swapped v64 format

Signed-off-by: angie <angheloalf95@gmail.com>

* Strip the overdump before doing the byte-swap

The previous way wasted time by byte-swapping data that would be discarded anyway.

Signed-off-by: angie <angheloalf95@gmail.com>

* Swap twice the bytes per cycle to improve performance

Signed-off-by: angie <angheloalf95@gmail.com>

* Read and write 16 bytes at a time and specify explicit endianness

Reading more bytes per cycle allow to speed up the swapping proccess

Signed-off-by: angie <angheloalf95@gmail.com>

* Add v64 compatibility in the Readme

Signed-off-by: angie <angheloalf95@gmail.com>

* Read whole file as little endian and write it as big endian without the loop

Signed-off-by: angie <angheloalf95@gmail.com>
This commit is contained in:
Anghelo Carvajal 2021-01-14 17:14:33 -03:00 committed by GitHub
parent 65e956a272
commit 9c2ad0c60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 31 deletions

View file

@ -94,7 +94,7 @@ git clone https://github.com/zeldaret/oot.git
#### 4. Prepare a base ROM
Copy over your copy of the Master Quest (Debug) ROM inside the root of this new project directory.
Rename the file to "baserom_original.z64" or "baserom_original.n64", depending on the original extension.
Rename the file to "baserom_original.z64", "baserom_original.n64" or "baserom_original.v64", depending on the original extension.
#### 5. Setup the ROM and build process