VT52 console output for TOS and Mint with TOSWIN2

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

czietz
Hardware Guru
Hardware Guru
Posts: 593
Joined: Tue May 24, 2016 6:47 pm

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby czietz » Wed Nov 01, 2017 12:09 pm

joska wrote:Yes I am! Sorry, I did not remember that I was using NVDI 2.51 as well. So that is probably why it works here.


One might even consider this a bug in NVDI, then. :wink:

joska wrote:Not tested, but maybe you could output the escape sequences using Cconout()? Or does Cconout expand tabs as well?


It does, as mentioned above.

joska
Hardware Guru
Hardware Guru
Posts: 3877
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby joska » Wed Nov 01, 2017 12:21 pm

czietz wrote:One might even consider this a bug in NVDI, then.


I don't see this behaviour documented anywhere, so if it hadn't been for the fact that Cconout expands TAB I'd say that NVDI behaves as TOS is documented to behave ;) But yes, this is clearly a bug in NVDI. Please note that this is with NVDI 2.51. I have not tested on more recent versions.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

czietz
Hardware Guru
Hardware Guru
Posts: 593
Joined: Tue May 24, 2016 6:47 pm

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby czietz » Wed Nov 01, 2017 1:07 pm

simonsunnyboy wrote:My efforts can be found and reviewed under https://github.com/simonsunnyboy/atarist_conio


Looks nice. I might use that in future console applications for the ST.

joska
Hardware Guru
Hardware Guru
Posts: 3877
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby joska » Wed Nov 01, 2017 1:50 pm

Indeed, this will be useful for a project I'm working on :)
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4982
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby simonsunnyboy » Wed Nov 01, 2017 2:51 pm

Glad it is of help. Ncurses is an option but links quite large while for smaler things I always ended up reimplementing something similar to this. I also came across cc65 for 6502 stuffs und saw it had conio.h as well.

So the plan to have it on the ST too, and later for other platforms too.

BTW if you find something strange please just send me a patch or so. I am open for fixes and everything.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ThorstenOtto
Captain Atari
Captain Atari
Posts: 242
Joined: Sun Aug 03, 2014 5:54 pm

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby ThorstenOtto » Thu Nov 02, 2017 1:41 am

In Pure-C there is a header file screen.h, which has similar things, most of them implement as macros, but using some propietary names. I think i never used it. kbhit() might clash with pcextlib, where it is also defined (not sure wether that one uses gemdos or bios functions)

Also you should notice that when using functions like Cconout(), your program can be terminated by pressing Ctrl-C, which is hard to catch in single-tos if you don't want that.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4982
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby simonsunnyboy » Thu Nov 02, 2017 8:51 am

I don't see a problem in interruptability via CTRL-C, on the contrary this sometimes is great to have.

On the headers I have no problems with that. If Pure-C provides a mangled conio, it is sad but not my problem..
As it originated from Borland (atleast I have seen it in PC Borland ccompilers and Turbo Pascal as well) and I always thought Pure-C is a descendant, i don't understand why they did not provide the standard.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 714
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: VT52 console output for TOS and Mint with TOSWIN2

Postby mfro » Thu Nov 02, 2017 6:20 pm

simonsunnyboy wrote:... As it originated from Borland (atleast I have seen it in PC Borland ccompilers and Turbo Pascal as well) and I always thought Pure-C is a descendant, i don't understand why they did not provide the standard.


Probably because it's non-standard. In Borland's DOS implementations, it didn't even use any DOS call at all but wrote directly to screen memory.

And, to the best of my knowledge, conio.h wasn't a Borland invention. Earlier Lattice compilers originally came up with it using int21h DOS calls.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 2 guests