Difference between revisions of "HOWTO-Debug-Endian-Issues"

Jump to navigation Jump to search
Restore audio support thanks the ES1370 device from the 2014 howto. It still works for a Linux VM, the flag has just been renamed
(A bit more content in the footnotes)
(Restore audio support thanks the ES1370 device from the 2014 howto. It still works for a Linux VM, the flag has just been renamed)
Line 13: Line 13:
# '''Emulating a big-endian development system from your regular development machine''':
# '''Emulating a big-endian development system from your regular development machine''':
#* Any reasonably powerful desktop system should be able to emulate a big-endian architecture, thanks to [https://www.qemu.org QEMU].
#* Any reasonably powerful desktop system should be able to emulate a big-endian architecture, thanks to [https://www.qemu.org QEMU].
#* The main drawback is that this currently requires running some older/unmaintained Linux distributions, and, as of late 2022, audio and graphics acceleration support is missing. Since this is emulation (and not virtualization), there is also a noticeable (but usually tolerable) performance impact.
#* The main drawback is that this currently requires running some older/unmaintained Linux distributions, and, as of late 2022, graphics acceleration support is missing. Since this is emulation (and not virtualization), there is also a noticeable (but usually tolerable) performance impact.


This howto focuses on the last option, since it is the most accessible one, and it's still a way of fixing the majority of endianness issues we encounter.
This howto focuses on the last option, since it is the most accessible one, and it's still a way of fixing the majority of endianness issues we encounter.
Line 24: Line 24:


* Security support updates have been discontinued for Debian 8 in late 2018. Older cryptographic ciphers and certificates (such as in TLS or SSH) in the base system may also cause various issues. For this reason, this VM should only be run ''on a local, trusted environment''.
* Security support updates have been discontinued for Debian 8 in late 2018. Older cryptographic ciphers and certificates (such as in TLS or SSH) in the base system may also cause various issues. For this reason, this VM should only be run ''on a local, trusted environment''.
* '''Audio content will be hard to debug''' on this environment, since QEMU has no sound card support for this architecture yet<ref>Actually, PPC audio support has been added in [https://gist.github.com/akemin-dayo/0e9bdcd74b2ad7f0bcf56e0680256103 an experimental QEMU fork]. It may also be possible to force the VM to use an external USB DAC, thanks to [https://qemu-project.gitlab.io/qemu/system/devices/usb.html QEMU USB pass-through], but this requires more work and is untested.</ref>. 3D games will also have a slow framerate, since QEMU only provides a limited, unaccelerated framebuffer for PPC. Make sure that the ScummVM component you want to debug/test won't be impacted by these limitations.
* 3D games will have a slow framerate, since QEMU only provides a limited, unaccelerated framebuffer for PPC. Make sure that the ScummVM component you want to debug/test won't be impacted by these limitations.
* '''The bigger your host CPU clock rate, the better''': a 4 GHz CPU will bring some improvement over a 3 GHz CPU, which is itself much better than a 2 GHz CPU, and so on<ref>For reference, a full build of ScummVM with only the SCUMM engine takes around 26 minutes in QEMU on an Intel i7 or an Apple M1, while the same build on a native PowerPC G4 7447A takes 13 minutes (all single-threaded).</ref>. Note that QEMU emulation is mostly single-threaded, so having many CPU cores isn't really useful for this.
* '''The bigger your host CPU clock rate, the better''': a 4 GHz CPU will bring some improvement over a 3 GHz CPU, which is itself much better than a 2 GHz CPU, and so on<ref>For reference, a full build of ScummVM with only the SCUMM engine takes around 26 minutes in QEMU on an Intel i7 or an Apple M1, while the same build on a native PowerPC G4 7447A takes 13 minutes (all single-threaded).</ref>. Note that QEMU emulation is mostly single-threaded, so having many CPU cores isn't really useful for this.


Line 45: Line 45:
-m 2048 ^
-m 2048 ^
-g 1024x750x32 ^
-g 1024x750x32 ^
-device ES1370 ^
-no-reboot ^
-no-reboot ^
-boot c ^
-boot c ^
Line 61: Line 62:
-m 2048 \
-m 2048 \
-g 1024x750x32 \
-g 1024x750x32 \
-device ES1370 \
-no-reboot \
-no-reboot \
-boot c \
-boot c \
Line 115: Line 117:


=== Various options for a more convenient setup ===
=== Various options for a more convenient setup ===
==== Unmuting audio ====
If you can't hear any sound, make sure that your QEMU run script has the <code>-device ES1370</code> option.
It's also possible that the emulated audio card is muted inside the Linux VM, for some reason. To fix this, start the Applications > Multimedia > Audio Mixer program and check that no main output is muted (you can also run the <code>alsamixer</code> program in the Terminal and type <code>M</code> and then <code>Esc</code> to unmute the main output).


==== Modern IDE integration ====
==== Modern IDE integration ====
149

edits

Navigation menu