3D Engine Port
5 messages in this thread
I'm trying to port the code to a real time 3D engine (Wolf3D – DOOM
type engine) to the Amiga, but have come accross a number of stumbling
blocks that I could use some help with. BTW – the engine I'm trying to
port is called ACK3D.
1) I do not know either Intel or Motorola assembly code, so I
need to have the assembler source file in the ACK3D package
converted to C.
2) Not owning a PC, I'm unfamilar with the XMS library and what
it does, as well as PC graphic display modes and how they
are set up / work. I could use some help here in figuring
out what routines I need to discard and rewrite to utilize
the Amiga's native display modes.
3) Any other help or advice with this project would be appreciated! I've
tried to contact the author of the ACK3D package through CIS EMail, but I
guess that the message either got lost, or he hasn't had the time to
respond yet. If anyone else here is interested in helping to port this
code to work on Amiga's, maybe we could make it a joint project.
I also understand that there is a working port of a 3D engine with
source for the Amiga on Internet called WT. Has anyone seen this?
I have the PC source and having the Amiga executeable and source
would be very helpful in future projects.
Gary
I am also trying to port ACK 3D to the Amiga. I am making fairly slow
progress, mainly due to lack of time. I will share a few bits of info I
have picked up.
The key piece of assembler in ACK3D is the routine "draw_col2" which does
the texture mapped drawing. There is a C version of this is the Gamers
Forum, game development library.
I think the XMS library is used for extended or expanded memory
management. This is because MS-DOS runs in a mode which can only address
1M memory. PCs running MS-DOS have to use memory managers and bank
switching to use any memory outside this range. My policy so far is to
remove any references to XMS I come across.
I believe that the display mode used by ACK3D uses one byte per pixel, 320
pixels across by 200 down. Display memory starts at the top left corner
and ascending addresses go first left to right.
Good Luck !
Peter Wade
Autopiloting from London, England
Lary Myers is the guy who wrote Ack. He is Sysop in the Gamers forum. There
you will find the WT program, I understand that has already been ported to
Amiga. Lary is good about messages so I am sure you didn't get the right
address.
As far a the assembly code goes, the machine code in ack is a texture map
routine. It stretches a line of a bitmap vertically. It is based on the
Bresenham routine which is all over and graphics book. A C conversion is easy
but will be slow. The advantage you have on the Amiga is the Blitter but that
cannot stretch. So on that routine you are stuck. I suggest writting it in C
and then getting someone to convert the routine for you to Assem.
For info on the bresenham routine in 2-d, I suggest Graphic Gems III. There
is a C routine in there to stretch a bitmap to an arbitrary rect. Once you
learn a bit more and have some specific problems, let me or Lary know, we can
point you in the right direction.
Jeff Lander
Accent Media Good Luck……
Thanks for the reply.
The WT program in the Gamers forum is the PC version, I got the file
as soon as it was posted. What I would really like to do is get the
executable and source to the Amiga port of WT. This way I could look
at what sections had been re-written to make the software work on the
Amiga and that would help me with the ACK port that I'm trying to do.
As far as the Assembler code goes, I'm going to do it myself. I bought
a book on Amiga Assembler by Paul Overaa and I've found that it's really
not that difficult, at least the way he teaches it. I may even get real
ambitious and attempt to do the whole thing in assembler since speed will
be such a critical factor in this type of game.
I've got the source files (I thru 4) for Graphic Gems. Would you remember
the paticular file that has the bitmap stretching routine? BTW – I saw
the book Graphic Gems IV at a book store the other day, looking at the
read me files included with the source gives me the impression that each
one of these sets of files go with a different book (Graphic Gems I, etc)
rather than being carried over into the newest edition of the book, would
you know anything about that?
Gary
Each book has the code for all the previous books. IV has the code for I-IV.
The code for stretching a bitmap is called Bitmap.c and FastBitmap.c. The
FastBitmap code is much easier to read but it doesn't have some to the other's
flexibility. The Fastbitmap code is just a 2-d bresenham routine.
Good Luck on your code,
Jeff