Nintendo GameCube Moderation Guide

From Redump Wiki

(Difference between revisions)
Jump to: navigation, search
(bca2txt)
Line 6: Line 6:
Second character in Mastering SID is a Q not an O.
Second character in Mastering SID is a Q not an O.
 +
 +
== bca2txt ==
 +
Python script for converting a .bca file to a .txt file for easy copy/pasting to Redump.
 +
 +
Save code below as bca2txt.py, and drag-and-drop .bca file onto script to produce FILE.bca.txt
 +
<pre>
 +
#!/usr/bin/env python
 +
import sys
 +
import os
 +
 +
if (len(sys.argv) != 2):
 +
print('usage: ' + os.path.basename(__file__) + ' <64-byte BCA file>')
 +
sys.exit(1)
 +
 +
bca_file_size = os.path.getsize(sys.argv[1])
 +
if (bca_file_size != 64):
 +
print("BCA file is not 64 bytes")
 +
sys.exit(1)
 +
 +
bca_file = open(sys.argv[1], 'rb')
 +
txt_file = open(sys.argv[1] + '.txt', 'w')
 +
for x in range(4):
 +
for y in range(8):
 +
val = bca_file.read(2)
 +
txt_file.write(bytes(val).hex().upper())
 +
if (y != 7):
 +
txt_file.write(' ')
 +
else:
 +
txt_file.write('\n')
 +
</pre>
[[Category:Moderation Guides]]
[[Category:Moderation Guides]]

Revision as of 14:00, 10 October 2023

WIP

<b>Internal Name</b>: Internal Name -- Can be obtained in Isobuster as volume label, in Cleanrip output, or in Dolphin.

102E2205<tab>DOL-102P-0-0X JPN<tab>S0 -- The bold character indicates Revision number. Add revision to datname and version field (Rev X)

Second character in Mastering SID is a Q not an O.

bca2txt

Python script for converting a .bca file to a .txt file for easy copy/pasting to Redump.

Save code below as bca2txt.py, and drag-and-drop .bca file onto script to produce FILE.bca.txt

#!/usr/bin/env python
import sys
import os

if (len(sys.argv) != 2):
	print('usage: ' + os.path.basename(__file__) + ' <64-byte BCA file>')
	sys.exit(1)

bca_file_size = os.path.getsize(sys.argv[1])
if (bca_file_size != 64):
	print("BCA file is not 64 bytes")
	sys.exit(1)

bca_file = open(sys.argv[1], 'rb')
txt_file = open(sys.argv[1] + '.txt', 'w')
for x in range(4):
	for y in range(8):
		val = bca_file.read(2)
		txt_file.write(bytes(val).hex().upper())
		if (y != 7):
			txt_file.write(' ')
		else:
			txt_file.write('\n')
Personal tools