forums.PPSSPP.org
How are divisions by zero handled? - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: General Discussion and Announcements (/forumdisplay.php?fid=2)
+--- Thread: How are divisions by zero handled? (/showthread.php?tid=16965)



How are divisions by zero handled? - 240-185 - 11-04-2015 02:36 PM

Hi,

I was playing around with raycasting on PSP and the emulator was very useful to perform the tests.

Then, I decided to dig my PSP out of its drawer and wanted to give a try after getting a result very close to Wolfenstein 3D. I was very surprised when the demo on the real hardware merely crashed at the launch.

After several headaches, I found out that the emulator kept going after a division by zero whereas the real console cringed hard. That makes me wonder: why the emulator does not crash (or at least stopped) like the real hardware after such an error?


RE: How are divisions by zero handled? - [Unknown] - 11-07-2015 05:48 PM

Hmm, compilers normally insert a "break" instruction to check for divide by zero. Do you have "ignore illegal memory access" enabled? Have you checked the assembly to see if it has a break?

-[Unknown]