+ uint32_t t;
+
+ if (!improved) {
+ /* get plant's inclination and azimuth */
+ t = m68k_read_memory_16(0x42C70) & 0x3ff;
+ *inclination = (double)t / 0x400 * 2 * M_PI;
+ t = m68k_read_memory_16(0x42C6c) & 0x3ff;
+ *azimuth = -(double)t / 0x400 * 2 * M_PI;
+ } else {
+ /* inclination depends on north/south position */
+ t = m68k_read_memory_32(DS_0+0x1E42) >> 2; /* get position */
+ t += 0x01000000;
+ t &= 0x03ffffff;
+ *inclination = (double)t / 0x04000000 * 2 * M_PI;
+ /* azimuth depends on east/west position and planet's rotation */
+ t = m68k_read_memory_32(DS_0+0x1E2E); /* get planet index */
+ t = m68k_read_memory_32(22362 + t); /* get rotation of planet */
+ t += m68k_read_memory_32(DS_0+0x1E3A) >> 2; /* add position */
+ t &= 0x03ffffff;
+ *azimuth = -(double)t / 0x04000000 * 2 * M_PI;