Files
af/tools/splat/disassembler/disassembler_instance.py
T
Anghelo Carvajal ce93cd0262 Update subrepos (#19)
* git subrepo pull --force tools/asm-processor

subrepo:
  subdir:   "tools/asm-processor"
  merged:   "6dd4d3a"
upstream:
  origin:   "git@github.com:simonlindholm/asm-processor.git"
  branch:   "main"
  commit:   "6dd4d3a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull lib/ultralib --force

subrepo:
  subdir:   "lib/ultralib"
  merged:   "0417857"
upstream:
  origin:   "git@github.com:decompals/ultralib.git"
  branch:   "main"
  commit:   "0417857"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/asm-differ --force

subrepo:
  subdir:   "tools/asm-differ"
  merged:   "6d3e4c4"
upstream:
  origin:   "git@github.com:simonlindholm/asm-differ.git"
  branch:   "main"
  commit:   "6d3e4c4"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/splat --force

subrepo:
  subdir:   "tools/splat"
  merged:   "406b646"
upstream:
  origin:   "git@github.com:ethteck/splat.git"
  branch:   "master"
  commit:   "406b646"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Revert "git subrepo pull lib/ultralib --force"

This reverts commit da9fca47be.

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "7869ef2"
upstream:
  origin:   "git@github.com:ethteck/splat.git"
  branch:   "master"
  commit:   "7869ef2"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Disable asm size directive
2023-07-14 14:44:11 -04:00

27 lines
737 B
Python

from .disassembler import Disassembler
from .spimdisasm_disassembler import SpimdisasmDisassembler
from .null_disassembler import NullDisassembler
__instance: Disassembler = NullDisassembler()
__initialized = False
def create_disassembler_instance(platform: str):
global __instance
global __initialized
if platform in ["n64", "psx", "ps2"]:
__instance = SpimdisasmDisassembler()
__initialized = True
return
raise NotImplementedError("No disassembler for requested platform")
def get_instance() -> Disassembler:
global __instance
global __initialized
if not __initialized:
raise Exception("Disassembler instance not initialized")
return None
return __instance