You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 14
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user