[hatari-devel] Redirecting CON: to console

Vincent Rivière vincent.riviere at freesbee.fr
Thu Oct 7 21:00:08 CEST 2010


Eero Tamminen wrote:
> On quick look I didn't see anything like that...

Checked again with TOS 1.62.
Look at the offset 0x30 in the basepage. There are 6 signed bytes. They are 
the nonstandard handles (files or devices) associated to the standard 
handles (0 to 5).

So the standard values of these bytes are :
0 -> -1 BIOS console
1 -> -1 BIOS console
2 -> -2 serial port
3 -> -3 parallel port
4 -> -1 BIOS console
5 -> -1 BIOS console

If someone wants to hook the GEMDOS output to the console, hook all the 
output functions (Fwrite(), but also Cconws(), and even Cauxos() and others) 
and look in the above table. If the standard handle is associated to -1, it 
is an output to the console.

However, this does not solve the Fdup() problem.

Anyway, simply hooking the console output at the BIOS level should do the 
expected thing in all cases, isn't it ?

-- 
Vincent Rivière



More information about the hatari-devel mailing list