r/Playstation2OnAndroid

Armsx3 version 0.9 has been released

​

AMSX3 0.9

What's new:

ARM64 SPU floating-point now matches desktop x86 exactly: 984 mismatched results down to zero.

ARMSX3 translates PS3 code to run on your phone's ARM64 chip, while RPCS3 upstream is written and tested on x86 desktop CPUs, and a lot of that code quietly relies on how x86 handles certain maths. On ARM64 the answer came out different: nothing crashed and nothing was logged, a number was simply wrong, and a game would hang, corrupt, or vanish minutes later with no clue why. This release closes that gap for the SPU's floating-point maths, the part that does most of a PS3 game's heavy lifting. We ran a suite of test programs that exercise one PlayStation 3 instruction at a time on both machines and compared the results line by line, which turns "something is off on ARM64" into the exact instruction and the exact numbers that differ. 984 mismatched results against desktop x86, down to zero, your phone now computes the same answers a desktop PC does. Of those, 500 were genuinely ARM64 bugs and are fixed, the other 484 turned out to be x86 taking a shortcut of its own rather than us being wrong, which was worth knowing because it stopped us chasing it. The same testing also caught the identical flaw hiding in a second place we use for debugging, which had been quietly making some of our own investigations unreliable. To be clear about what this is not: it does not make ARMSX3 more accurate than desktop RPCS3, and where RPCS3 itself still differs from a real PS3 it differs the same way on both, what changed is that ARM64 is no longer additionally wrong. Thanks to @Whatcookie for working with me on this approach and working through the results with me. These improvements have been shared with him so they will be upstream as well! I've been sharing each and every fix I do for ARMSX3, so other ARM64 RPCS3 platforms can benefit as well.

Borderlands 2 now boots, reaches the title screen and renders. It previously hung just after the logo, and once past that, died silently a minute later. Two separate ARM64 bugs, both fixed properly rather than worked around, the game runs fully compiled with no forced interpretation.

BLEACH: Soul Resurrección now reaches Story Mode, which it used to crash entering.

Spider-Man: Edge of Time no longer crashes at random.

Even more games are likely to have received improvements from the BL2 and divergence fixes.

Neither of the last two was touched directly. They were fixed by the same changes, which is the more useful way to read this release: if a game on ARM64 was closing with nothing in the log, this may be the bug that was doing it.

The two bugs:

A byte-shuffle miscompile. shufb is the SPU's workhorse for moving bytes around, and an upstream optimisation from June widened an ARM64 fast path to cover constant operands it did not handle correctly. BL2's SPURS kernel is 1446 shufb instructions and hit it constantly, the function would spin forever inside a single block, never reaching the end. Because a wrong shuffle produces wrong data rather than an obvious fault, this could equally have been showing up as graphics corruption, audio glitches or wrong game logic elsewhere.

A stack overrun with no crash report. Compiled SPU functions on ARM64 do not build their own stack frames, they share one 8 KB scratch area the gateway reserves. A function needing more than that wrote straight past it onto the guard page below the thread stack. Because a guard page is not memory the emulator owns, the fault was handed to the Android runtime, which then died reading it, producing no tombstone, nothing in the log, and no way to tell what happened. Raised to 256 KB.

Also fixed while in there: two float-to-int conversions in the SPU interpreter that carried x86 semantics onto ARM64, one in the accurate-xfloat path, and Android threads running on an eighth of the stack they get on desktop.

Controllers:

Player 2-7 now work properly. Ports 2-7 were only ever claimed when a USB device was plugged in, so a second controller connected over Bluetooth, (which is how most people connect one) did not exist to the emulator at all. Per-player button mapping looked correct because the bindings were being stored, there was simply no pad for them to drive.

Rapid presses register. A button press shorter than one guest poll was dropped entirely, so a button that worked everywhere else would do nothing during a quick-time event, and a held button like crouch would keep working while everything tapped alongside it did not. Each press and release now gets its own slot, so a mash arrives as distinct presses rather than one long hold.

L2 and R2 bind correctly now. Pads that report their triggers as analog axes rather than buttons could never have them bound previously, because the binder only listened for key events. This looked like a Player 2 problem, since a second pad of a different make fails where the first one worked.

Gyro works as it should now.

Keyboard:

Emulate USB Keyboard is now in Settings --> Network, an on-screen KBD button can be enabled in the touch layout editor, for reaching the keyboard without a spare controller button to bind the hotkey to. (For controllers, use the Hotkey). It will bring up the Android keyboard while in a game, useful for online or debug games that rely on it. A USB keyboard should work as well.

Contributions from @Zulux91

SPU: make the ARM64 uncompilable-block fallback safe to enter (#57), the mechanism that runs a block on the interpreter when it cannot be compiled. This is also what makes forced interpretation usable as a debugging tool, which is how the Borderlands 2 miscompile was isolated to a single function.

Emu: complete abandoned UE3 HD-cache install at boot (#41)

Leisure Suit Larry: Box Office Bust copies its assets to an HDD cache during a short boot window and gives up when emulated I/O is slower than a console.

cellAudio: don't let a silent port reset the untouched baseline every period (#63)

Library: a filename-derived PS3 serial gets a hyphen and loses its cover (#64)

Stop two guest polling loops from flooding the log (#62) and the H.A.W.X. 2 Bink overlay patch (#60)

Android CPU time: park the dma_manager::sync() wait, and stop re-parsing the global config every 5s (#55)

Thanks also to @DiegoBM for catching lingering PlayStation 2 naming in the side menu (#50).

reddit.com
u/Klonoa18 — 2 days ago
▲ 101 r/Playstation2OnAndroid+1 crossposts

Release ARMSX2 2.6.6.6 · ARMSX2/ARMSX2

ARMSX2 2.6.6.6

What's new:

Mali:

If you downgraded to 2.6.6.4 because of performance issues, you can come back. 2.6.6.5 put every Mali device on a slow path for any draw that reads the screen back, on an Anbernic RG 477V, Shadow of the Colossus fell from 30 fps to 7. Two separate mistakes stacked. The renderer had concluded that OpenGL's framebuffer fetch never keeps overlapping shapes in order, true of one extension, false of the one every Android Mali device actually uses, so healthy Mali hardware was being split into one draw call per shape for nothing. Separately, a workaround for one specific bad driver, which had never actually engaged before, started engaging, and turned every screen-reading draw into a full copy plus a memory flush. Both are gone. fixed by @bmdhacks

Auto now picks Vulkan instead of OpenGL. On the affected Mali driver that is 7 fps on OpenGL against about 30 on Vulkan, on the same device. The renderer choice and the driver workaround were being decided in two different places, so nothing noticed when they disagreed. Picking a renderer explicitly still wins, the only devices this moves are the ones where OpenGL is genuinely crippled. done by @bmdhacks Note the tradeoff: restoring the fast path also restores a known rendering fault on that driver in some games (Metal Gear Solid 3 is the observed one). Vulkan remains the correct-rendering choice there. The measurements said the speed was worth it.

Floating point:

All done by @psteff

60 commits, and the largest accuracy work the emulator has ever had.

The PS2's FPU is not IEEE, and ARMSX2 had been pretending it was. The console has no infinity and no NaN, and its numbers reach one whole range higher than a normal float, 0x7FFFFFFF is simply the biggest number the machine has. Every operation was folding that top range away on the way in. and folding a host infinity back into it on the way out. Add, subtract, multiply, the multiply-accumulates, the comparisons, and finally divide and reciprocal-square-root have all been taken off that clamp. Games that push into that range now get what the console gives.

Divide and square root now run the console's own algorithm. DIV.S, SQRT.S and RSQRT.S were computed with the host's divide and then nudged toward the PS2's answer, which left every operand the nudge did not reach one step off. The unit is not a rounding rule at all, it is a digit-by-digit recurrence, so it now runs the digits. Measured against silicon first to establish that the hardware is not correctly rounded.

The multiplier model from 2.6.6.4 was incomplete. That release modelled the PS2 multiplier's one-step deficit from a formula over the second operand. The formula only holds when the exact product fits, once there is a remainder below the last bit, the first operand matters too, and those cases were coming back IEEE. It is now modelled from the actual multiplier array rather than a formula over one input.

Error flags were wrong in a dozen small ways, reciprocal-square-root and square root missed the invalid flag on negative zero, divide left a previous instruction's flags standing, reciprocal square root raised divide by zero on every zero divisor, and the overflow and underflow flags were being read off host infinities and denormals rather than the PS2's own result. Underflowing adds and subtracts were also being flushed to zero, silicon does not do that.

A cache instruction could make the emulator write to an address the game chose. The data-cache tag holds a host pointer where hardware holds a guest address, and one instruction copied a guest value into it unmasked. Narrow exposure, it needed the EE cache enabled, which ships off, but it is fixed.

Performance:

All done by @psteff, on the ARM64 recompiler.

Quad shifts stop bouncing through memory, done in registers via a table lookup now, instead of the store-and-reload that only x86 needs.

Waiting threads stop flushing the CPU pipeline. Three spin loops each watch a single word of memory, but the shared helper did not know that and flushed the pipeline in batches while it waited. ARM64 can watch an address directly, so now it does.

Jump delay slots are hoisted when the instruction is independent, something the x86 recompiler has always done and the ARM64 port had never carried over.

A dead clamp removed from every MADD/MSUB pair in the VU recompiler, and the multiply predicate is down from three instructions to one.

Tests:

25 of the 60 commits are tests, pinning all of the above against captures from real PS2 hardware: the divide unit's rounding in all four modes, the VU pipeline and its memory and XGKICK wrapping, VU0 branch terminators, FCR31's flag behaviour, and cross-engine agreement between the interpreter and both recompilers. Several deliberately record known ARM64 divergences rather than hiding them, so the next person to touch this starts with a baseline instead of folklore.

Extrenal links for ARMSX2:

Github repository:

https://github.com/ARMSX2/ARMSX2

Discord :https://discord.gg/fSC6EzzFe

KoFI: https://ko-fi.com/armsx2

Patreon: https://www.patreon.com/ARMSX2?utm_campaign=creatorshare_creator

Thanks

#I am not associated with the development of the project all the credits goes to the ARMSX2 TEAM

github.com
u/Stag_----56 — 4 days ago

Alguien ?

Tengo Scarface en neather y funciona al cien

Y por más que busco una buena configuración para armsx2 no me es posible por ejemplo en este juego los árboles están dentro de la casa lo cual en el emulador neather no tuve ese problema

Alguien sabe una buena configuración?

u/Personal-Slice-8925 — 6 days ago

PS2 Classics : Devil May Cry

Devil May Cry first released on the PS2 in 2001, and it was actually one of Capcom's early games for the console. It started out as an early Resident Evil 4 prototype before becoming its own series.

I'm playing through it now and honestly really enjoying it. DMC has always been one of my favourite series, and I think every game is good in its own way. DMC 1 definitely feels old in some areas, but the combat is still so fun.

Dmc was later ported on various systems.

u/Stag_----56 — 12 days ago

Blind Rank 6 PS2 Horror Games

Rules:

Rank each game from 1 to 6 before swiping.

Don't change your ranking after moving to the next slide.

Share your final ranking in the comments.

Bonus: Post your actual top 6 after you've finished the blind ranking.

u/Stag_----56 — 14 days ago

Burnout 3 on ARMSX2: Can't get rid of this yellow lines and sun lens flare going through buildings

Any ideas on how to fix it? Changing the settings doesn't seen to do anything.

u/r4tzt4r — 13 days ago