MS-DOS Porting trouble

Search this archive.

From: Lionel Pinkhard (lionelp@worldonline.co.za)
Date: Fri 11 Aug 2000 - 19:06:02 IDT


Hi guys,

I'm busy porting a game I wrote back when I used MS-DOS to the Linux
operating system. But I have quite a few problems:

Firstly, my game uses CGA mode 4h, which it doesn't look like SVGALIB
supports, is there a way of setting this mode? I saw a function in the
source code called vga_addmode(), does this have anything to do with it?
If not, what's it for? And how can I use it? Or is it only for internal
use?

Secondly, my routine for trapping keystrokes doesn't work under Linux,
here's the code I tried:

    while (kbhit()) {
        keypressed = getch();

Why doesn't it work? Or what do I need to include?

Thirdly, my timing doesn't work, for the old DOS version, I used Interrupt
1ah, is there a way I can get the time in the same format under Linux?

Fourthly, how can I determine whether a joystick is installed? And if so,
how can I get it's axis? I have never programmed ports on Linux before,
and the outport() and inport() functions don't seem to work, or would I
have to rewrite the entire function differently? If so, how?

That's all I can think of right now, can somebody please help me out?

Ciao,

Lionel


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST