libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
114 stars 61 forks source link

24-bit memory adressing #620

Closed Vweber73 closed 1 year ago

Vweber73 commented 1 year ago

Hi,

Xenon 2 fails to load with anything else than a 68000. This game is known for using the most significant byte of 32-bit adresses for its own purposes, hence failing on 32-bit architectures. I thought it would run on the A1200 setting, since the A1200 features a 68EC020 restricted to 24-bit adresses space. But it fails too. Which makes me think that the A1200 presets defaults to 32-bit rather than 24-bit, and no override is provided, like in WinUAE. Am I right? This is not a big issue, if a program was badly coded, you can just use a 68000 preset, but there might be some cases were such a program would be optimised of the A1200, and hence be forced to use 24-bit adressing. Could this be a user setting?

Also, we can't override the Agnus and Denise types (OCS or ECS). Not really an issue as you can always select the A500 for OCS and A500+/A600 for ECS, but still. As a side note, the A2000 1mb Chip presets has the hybrid OCS/ECS config (ECS Agnus but OCS Denise). Not very useful, I can't see a case where you would want ECS Agnus but downgrade to OCS Denise, but still, this configuration was sold in both A500 and A2000, so it worth mentioning. The doc simply says ECS for this A2000 config, which is partially incorrect.

Best regards

sonninnos commented 1 year ago

I don't quite understand. WHDLoad version with A1200 and CDTV version with CD32 work just fine here with default settings. IPF version indeed does not work with A1200, but is it the same with real hardware without degraders?

Vweber73 commented 1 year ago

I'm not using whdload, I am using the adf. The Whdload slave is full of fixes, including one to remove the custom usage of the most significant byte in 32-bit adresses, hence it works on anything. I just used the floppy disk to test adressing in PUAE. Other amiga emulators with the 24-bit setting checked succeed in loading the game with 68020+ processor, hence my question about this setting - must be hardcoded to 32-bit? Again, nothing drastic, alternatives exist, just for the sake of completeness...

sonninnos commented 1 year ago

You can easily test it with saves/puae_libretro_global.uae. By default cpu_24bit_addressing is enabled with that CPU. Sysinfo shows the CPU type as expected, but Xenon 2 still fails the same.

Does it work with real hardware or not?

Vweber73 commented 1 year ago

I can't find this file in saves... Maybe because I am running Retroarch on Android? Anyway, the strange thing is that the very same adf runs in vamigaweb with no problem when I change the processor to 68020 (from a standard 512k/512k config with kick 1.3). If I do the same thing in PUAE, loading fails, whereas it works with 68000. So it has to do with the 68020 emulation...

sonninnos commented 1 year ago

Nothing to do with platform. It does not exist because it does not exist by default, because why would it: https://github.com/libretro/libretro-uae#using-configuration-files

I get the same behavior with WinUAE 5.0, so maybe it is just an accuracy thing, or perhaps some other setting affects it.

Vweber73 commented 1 year ago

Ok, many thanks! I have been trying to change the cpu accuracy from cycle-exact to more compatible to normal, with no success...

sonninnos commented 1 year ago

I guess we can close this since exposing the option wouldn't even help with this.

Vweber73 commented 1 year ago

I understand this option is only relevant for the 68020. 68000 and 68010 are 24 bit by nature. 68030+ are 32 bit by nature. Maybe only add a 68EC020 processor type, to distinguish clearly between the 2? Actually the 1200 preset is 68EC020, and you can override it with 68020, so maybe this is not even needed?