[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ssystem(TOSHEADER) / Translations searched



If we provide a new function to read the OSHEADER, we should ease the use
of it. That is, for TOS 1.00 return a complete too, and fix the AHDI bug.
Is this OK?

It doesn't work at all. "arg1" is documented as an offset, bit 0 is masked
out. But then, after bit 0 is cleared, arg1 is used as index to an array of
long.

-------- 8< ---------------- 8< ---------------- 8< --------

	
	
case TOSHEADER:
	
	
	
/* We return a complete and corrected OSHEADER. */
	
	
	
sysbase = *((ulong **)(0x4f2L));
	
	
	
arg1 &= 0x000000fe;	
/* 256 bytes allowed */
	
	
	
if (((ushort *)sysbase)[1] < 0x102 && arg1 >= 0x20 && arg1 <= 0x2c) {
	
	
	
	
/* BUG: RAM-TOS before 1986 could differ! */
	
	
	
	
static const long sysbase0x100[2][4] =
	
	
	
	
     {{0x56FA, 0xE1B, 0x602C, 0},
	
	
	
	
      {0x7E0A, 0xE1B, 0x873C, 0}};
	
	
	
	
r = sysbase0x100[(((ushort *)sysbase)[14] >> 1) == 4]
	
	
	
	
                [(arg1 - 0x20) / sizeof(ulong)];
	
	
	
} else {
	
	
	
	
/* Correct a bug in TOS >= 1.02 during AUTO folder
	
	
	
	
 * or with AHDI, correcting an AHDI bug.
	
	
	
	
 * Only necessary for os_conf!
	
	
	
	
 */
	
	
	
	
if (arg1 == 0x1a) {  /* special to read os_conf */
	
	
	
	
	
sysbase = (ulong *)(sysbase[2]);
	
	
	
	
	
r = ((ushort *)sysbase)[14];
	
	
	
	
}
	
	
	
	
else if (arg1 == 0x1c) {
	
	
	
	
	
r = ((ushort *)sysbase)[15];
	
	
	
	
	
sysbase = (ulong *)(sysbase[2]);
	
	
	
	
	
r |= (ulong)(((ushort *)sysbase)[14]) << 16;
	
	
	
	
}
	
	
	
	
else
	
	
	
	
	
r = sysbase[arg1 / sizeof(ulong)];
	
	
	
}
	
	
	
break;

-------- >8 ---------------- >8 ---------------- >8 --------


Since MiNT 1.06, the messages could be multilingual, but noone translated
them. Do it now. :-)


src/debug.c:

/* uk: a normal halt() function without an error message. This function
 *     may only be called if all processes are shut down and the file
 *     systems are synced.
 */

static const char *haltmsg[MAXLANG] = {
"System halted.\r\n",
"System angehalten.\r\n",   /* German */
"System halted.\r\n",       /* French */
"System halted.\r\n",       /* UK */
"System halted.\r\n",       /* Spanish */
"System halted.\r\n"        /* Italian */
};


static const char *rebootmsg[MAXLANG] = {
"FATAL ERROR. You must reboot the system.\r\n",
"FATALER FEHLER. Das System muß neu gestartet werden.\r\n", /* German */
"FATAL ERROR. You must reboot the system.\r\n",     /* French */
"FATAL ERROR. You must reboot the system.\r\n",     /* UK */
"FATAL ERROR. You must reboot the system.\r\n",     /* Spanish */
"FATAL ERROR. You must reboot the system.\r\n"      /* Italian */
};


By, Rainer


No mail over 64 Kbyte per day!