From a291c43b6c6224b9ce4b94d9a891b608ad231f3c Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Fri, 31 Aug 2018 02:26:19 +0200 Subject: [PATCH] Add tools to fill and dump memory --- python-scripts/dump_dsp.py | 39 ++++++++++++++++++++++++++++++++++++++ python-scripts/dump_ram.py | 21 ++++++++++++++++++++ python-scripts/fill_dsp.py | 28 +++++++++++++++++++++++++++ python-scripts/fill_ram.py | 27 ++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100755 python-scripts/dump_dsp.py create mode 100755 python-scripts/dump_ram.py create mode 100755 python-scripts/fill_dsp.py create mode 100755 python-scripts/fill_ram.py diff --git a/python-scripts/dump_dsp.py b/python-scripts/dump_dsp.py new file mode 100755 index 0000000..4cd9cfd --- /dev/null +++ b/python-scripts/dump_dsp.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +# Dumps the DSP memory + +from xboxpy import * +import struct + +f = open('dsp.bin', 'wb') + +data = [] + +print("GP P") +for i in range(4096): + data += [apu.read_u32(NV_PAPU_GPPMEM + i*4)] +print("GP X") +for i in range(4096): + data += [apu.read_u32(NV_PAPU_GPXMEM + i*4)] +print("GP Y") +for i in range(2048): + data += [apu.read_u32(NV_PAPU_GPYMEM + i*4)] +print("GP MIXBUF") +for i in range(1024): + data += [apu.read_u32(NV_PAPU_GPMIXBUF + i*4)] + +print("EP P") +for i in range(4096): + data += [apu.read_u32(NV_PAPU_EPPMEM + i*4)] +print("EP X") +for i in range(3072): + data += [apu.read_u32(NV_PAPU_EPXMEM + i*4)] +print("EP Y") +for i in range(256): + data += [apu.read_u32(NV_PAPU_EPYMEM + i*4)] + + +encoded = bytes(sum([list(struct.pack("