|Wrote this very simple DMC calculator
|Page 1 of 1|
|Author:||dougeff [ Fri Sep 02, 2016 10:10 am ]|
|Post subject:||Wrote this very simple DMC calculator|
I don't know if this is too simple to post, but maybe this will help somebody. It's a simple console calculator for converting DMC sample size and address. For python 3. Easily converted to python 2.
I have the length input in decimal, because this is commonly how famitracker reports the size of a dmc file.
# calculate the length and position of DMC file
length = ""
position = ""
length = input('enter length of file, in decimal : ')
position = input('enter position of file, in hex, without a 0x prefix : ')
a = int(length)
a = a >> 4
print ("DMC sample length = " + hex (a))
b = int(position, 16)
b = ((b-0xc000) >> 6)
print("DMC Sample address = " + hex(b))
|Page 1 of 1||All times are UTC - 7 hours|
|Powered by phpBB® Forum Software © phpBB Group