Refresh 14

This commit is contained in:
n64
2021-07-12 23:17:54 -04:00
parent ecd3d152fb
commit f9982e0ef5
251 changed files with 7496 additions and 5757 deletions

View File

@@ -162,8 +162,8 @@ if len(sys.argv) != 2:
sys.exit(0)
if sys.argv[1] == "--emit-asm-macros":
print("# Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.")
print("# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc")
print("// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.")
print("// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc")
print()
def print_hword(x):
print(f" .byte {x} >> 8, {x} & 0xff")
@@ -219,7 +219,7 @@ if sys.argv[1] == "--emit-asm-macros":
print(".endm\n")
for key in ['seq', 'chan', 'layer']:
print(f"# {key} commands\n")
print(f"// {key} commands\n")
if key == 'layer':
cmds = commands['layer_large']
for op in sorted(commands['layer_small'].keys()):
@@ -267,31 +267,31 @@ if sys.argv[1] == "--emit-asm-macros":
emit_cmd(key, 0xc0, ['delay_long', 'var_long'])
emit_cmd(key, 0x40, ['note1_long', 'bits:4', 'var_long', 'u8'])
if eu_sh or us_jp or sh or non_sh:
print(".ifdef VERSION_SH\n")
print("#ifdef VERSION_SH\n")
for (op, cmd) in eu_sh:
emit_cmd(key, op, cmd)
for (op, cmd) in sh:
emit_cmd(key, op, cmd)
print(".else\n")
print("#else\n")
for (op, cmd) in non_sh:
emit_cmd(key, op, cmd)
print(".ifdef VERSION_EU\n")
print("#ifdef VERSION_EU\n")
for (op, cmd) in eu_sh:
emit_cmd(key, op, cmd)
print(".else\n")
print("#else\n")
for (op, cmd) in us_jp:
emit_cmd(key, op, cmd)
print(".endif\n")
print(".endif\n")
print("#endif\n")
print("#endif\n")
print("# envelope commands\n")
print("// envelope commands\n")
emit_env_cmd(0, ['disable', 'u16'])
emit_env_cmd(2**16-1, ['hang', 'u16:ign'])
emit_env_cmd(2**16-2, ['goto', 'u16'])
emit_env_cmd(2**16-3, ['restart', 'u16:ign'])
emit_env_cmd(None, ['line', 'u16', 'u16'])
print("# other commands\n")
print("// other commands\n")
print(".macro var_long x")
print(" .byte (0x80 | (\\x & 0x7f00) >> 8), (\\x & 0xff)")
print(".endm\n")