Re: [hatari-devel] DSP "running" on non-falcon |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Le 27/07/2022 à 12:05, Eero Tamminen a écrit :
if (dsp_core.running == 0) return; ----------------------------------------This is because dsp_core.running gets set only after first write to Falcon DSP CPU_HOST_TRXL IO register, which obviously can happen only on Falcon.
yes, it will be harmless on TT for example, but considering the ressources needed to run 68030+cache+mmu, all code path that can be skipped as soon as possible will speed up emulation a little
so, as soon as DSP is enabled in the GUI or with some --options, this calls DSP_Enable() in falcon/dsp.c, which sets bDspEnabled=true , even if machine is not a falcon and has no DSP at all (even an STF will report bDspEnabled=true) :(((Yeah, DSP_Enabled() seems to be called from many places based just on the DSP type.I think the reason for doing things based on specific emulation settings, instead of machine type, is that machine type can change quite late in emulation (re-)initialization (when TOS is loaded), based on the TOS version (in tos.c).
maybe ; in such case code should be checked one day, because in all accuracy when changing machine type, we should first change machine type, then re-init all depending HW such as DSP or SCC or SCSI or whatever.
Ok, you already pushed the change. I tested it and it seems to work OK. I also updated the release-notes description a bit.
As it would avoid to call DSP_Run() and I didn't see problem when testing, I thought it could go in dev version anyway.
(And fixed another issue AddressSanitizer noticed.) - Eero
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |