From 6a290a8c226ffe198059ce6d6ccfd5f9948f2b48 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 26 Jul 2024 10:56:05 +0200 Subject: [PATCH 1/5] fix uppercase in bash script of GetFileHashesFromISO.sh --- utils/{GetFIleHashesFromISO.sh => GetFileHashesFromISO.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename utils/{GetFIleHashesFromISO.sh => GetFileHashesFromISO.sh} (100%) diff --git a/utils/GetFIleHashesFromISO.sh b/utils/GetFileHashesFromISO.sh similarity index 100% rename from utils/GetFIleHashesFromISO.sh rename to utils/GetFileHashesFromISO.sh From ebc920fee5a8cc56f31d5d245dafe4fbd34a2fe5 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 26 Jul 2024 10:57:01 +0200 Subject: [PATCH 2/5] fix partition typo in GetFileHashesFromISO.sh --- utils/GetFileHashesFromISO.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/GetFileHashesFromISO.sh b/utils/GetFileHashesFromISO.sh index 5305f51..b647950 100755 --- a/utils/GetFileHashesFromISO.sh +++ b/utils/GetFileHashesFromISO.sh @@ -37,12 +37,12 @@ cwd="$(pwd)" partitions_on_attached_iso=$(hdiutil attach -nomount "$iso_path") echo $partitions_on_attached_iso -# MOUNT THE WINDOWS (CD9660) PORTION. +# MOUNT THE WINDOWS (CD9660) PARTITION. disk_identifier=$(echo "$partitions_on_attached_iso" | awk '{print $1}' | head -n 1) -echo "CD9660 Portion: $mount_point" +echo "CD9660 Partition: $mount_point" mount -t cd9660 "$disk_identifier" "$mount_point" -# PRINT THE HASHES OF EACH FILE IN THE WINDODWS PORTION. +# PRINT THE HASHES OF EACH FILE IN THE WINDODWS PARTITION. # This gets the hashes of all files in the root directory. for file in "$mount_point"/*; do md5sum "$file" 2> /dev/null From ffd3dd728a3e5038fb6afa3a7b89f970ccc39884 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 26 Jul 2024 11:09:33 +0200 Subject: [PATCH 3/5] add functions to the debug messages --- src/MediaStation/Assets/BitmapRle.c | 10 +++++----- src/MediaStation/Assets/ImaAdpcm.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MediaStation/Assets/BitmapRle.c b/src/MediaStation/Assets/BitmapRle.c index 8163e5f..5a2bb01 100644 --- a/src/MediaStation/Assets/BitmapRle.c +++ b/src/MediaStation/Assets/BitmapRle.c @@ -14,7 +14,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a // does not allow NULL values and does not handle embedded null bytes. It returns // a new reference to the bytes-like object. if(!PyArg_ParseTuple(args, "y#II", &compressed_image_data, &compressed_image_data_size, &width, &height)) { - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c: Failed to parse arguments."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::PyArg_ParseTuble(): Failed to parse arguments."); return NULL; } @@ -33,7 +33,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a if (uncompressed_image_data_object == NULL) { // TODO: We really should use Py_DECREF here I think, but since the // program will currently just quit it isn't a big deal. - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c: Failed to allocate uncompressed image data buffer."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::PyBytes_FromStringAndSize(): Failed to allocate uncompressed image data buffer."); return NULL; } char *uncompressed_image_data = PyBytes_AS_STRING(uncompressed_image_data_object); @@ -47,7 +47,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a PyObject *transparency_regions_list; transparency_regions_list = PyList_New(0); if (transparency_regions_list == NULL) { - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c: Failed to allocate transparency regions list."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::PyList_New(): Failed to allocate transparency regions list."); return NULL; } @@ -59,7 +59,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a Py_DECREF(uncompressed_image_data_object); Py_DECREF(transparency_regions_list); if (return_value == NULL) { - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c: Failed to build return value."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::Py_BuildValue(): Failed to build return value."); return NULL; } return return_value; @@ -172,7 +172,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a Py_DECREF(uncompressed_image_data_object); Py_DECREF(transparency_regions_list); if (return_value == NULL) { - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c: Failed to build return value."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::Py_BuildValue(): Failed to build return value."); return NULL; } return return_value; diff --git a/src/MediaStation/Assets/ImaAdpcm.c b/src/MediaStation/Assets/ImaAdpcm.c index 1934628..0aae6dd 100644 --- a/src/MediaStation/Assets/ImaAdpcm.c +++ b/src/MediaStation/Assets/ImaAdpcm.c @@ -66,7 +66,7 @@ static PyObject* decode(PyObject* self, PyObject* args) { const char *input; Py_ssize_t input_length; if (!PyArg_ParseTuple(args, "y#", &input, &input_length)) { - PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c: Failed to parse arguments."); + PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c::PyArg_ParseTuble(): Failed to parse arguments."); return NULL; } @@ -75,14 +75,14 @@ static PyObject* decode(PyObject* self, PyObject* args) { // each ADPCM sample (4 bits) expands to one 16-bit PCM sample. PyObject *output = PyBytes_FromStringAndSize(NULL, input_length * 4); if (output == NULL) { - PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c: Failed to allocate decoded audio object."); + PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c::PyBytes_FromStringAndSize(): Failed to allocate decoded audio object."); return NULL; } int16_t *output_buffer = (int16_t *)PyBytes_AS_STRING(output); if (output_buffer == NULL) { // Failure here is uncommon after a successful allocation. Py_DECREF(output); - PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c: Failed to access aecoded audio buffer."); + PyErr_Format(PyExc_RuntimeError, "ImaAdpcm.c::PyBytes_AS_STRING(): Failed to access aecoded audio buffer."); return NULL; } From 1becdb3def98d305750623be4ee51464e2771905 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Sat, 27 Jul 2024 11:34:41 +0200 Subject: [PATCH 4/5] mention v3 of GPL usage in ImaAdpcm.c --- src/MediaStation/Assets/ImaAdpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaStation/Assets/ImaAdpcm.c b/src/MediaStation/Assets/ImaAdpcm.c index 0aae6dd..ebdbf3d 100644 --- a/src/MediaStation/Assets/ImaAdpcm.c +++ b/src/MediaStation/Assets/ImaAdpcm.c @@ -4,7 +4,7 @@ // Most of the code in this file is borrowed from SoX, // specifically sox/src/adpcms.c, which is licensed -// under the GPL. +// under the GPLv3. static int const ima_steps[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, From feb06d040c4caaf524c3021f22bbcf2c21561b23 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:57:01 +0200 Subject: [PATCH 5/5] fix the tuble typo --- src/MediaStation/Assets/BitmapRle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaStation/Assets/BitmapRle.c b/src/MediaStation/Assets/BitmapRle.c index 5a2bb01..2ebba61 100644 --- a/src/MediaStation/Assets/BitmapRle.c +++ b/src/MediaStation/Assets/BitmapRle.c @@ -14,7 +14,7 @@ static PyObject *method_decompress_media_station_rle(PyObject *self, PyObject *a // does not allow NULL values and does not handle embedded null bytes. It returns // a new reference to the bytes-like object. if(!PyArg_ParseTuple(args, "y#II", &compressed_image_data, &compressed_image_data_size, &width, &height)) { - PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::PyArg_ParseTuble(): Failed to parse arguments."); + PyErr_Format(PyExc_RuntimeError, "BitmapRle.c::PyArg_ParseTuple(): Failed to parse arguments."); return NULL; }