[comp.sys.atari.8bit] CROSS-COMPILING WITH AN IBM-PC:HOW TO DO IT?

rvp@cbnewsh.ATT.COM (rob.v.phillips) (06/06/89)

I am a longstanding atari 8 bit enthusiast, with an interest in
writing game software. I have done so with various assemblers,
BASIC, and ACTION!

I have recently stepped into the IBM-PC world, and I am pretty
satisfied with most capabilities available, except for support for
game programming.

Rather than throw money into 8-bit hardware and software, and time into
learning their details, I believe that my most productive option for
developing 8-bit games would involve cross-compiling code on the IBM-PC,
and downloading it via the PC's serial port to my Atari 800, somehow.

It seems reasonable that one could download binary code serially to the
ATARI 800 at 9600bps using some dedicated driver for this purpose,
through the 850 interface, joystick ports, or SIO interface (whichever
is cheapest, easiest, and fastest, of course).
Therefore, An 8K program should take only 10 seconds or so to download.
At the same time, I could avail myself of the IBM-PC's speed,
cheap hardware support, to support program development.

Does anyone out there work in this type of environment?
If so, I am sure the net would be interested in the particular
software and hardware you use, on both machines, to accomplish
this type of seemingly ideal work environment. I certainly am
interested! Please share your knowledge.

If you know of source code for a 6502 cross-compiler written in 
portable C, please let me know.

I could compile the cross-compiler code on my IBM with MSC 5.0.

Thanks!
Rob Phillips      (homxc!rvp)

cfchiesa@bsu-cs.bsu.edu (Christopher Chiesa) (06/06/89)

In article <1179@cbnewsh.ATT.COM>, rvp@cbnewsh.ATT.COM (rob.v.phillips) writes:


> Rather than throw money into 8-bit hardware and software, and time into
> learning their details, I believe that my most productive option for
> developing 8-bit games would involve cross-compiling code on the IBM-PC,
> and downloading it via the PC's serial port to my Atari 800, somehow.
> 
> It seems reasonable that one could download binary code serially to the
> ATARI 800 at 9600bps using some dedicated driver for this purpose,

Assuming I had the appropriate cross-assembler that wrote its output into the
appropriate Atari-required format ($FF,$FF headers, etc.) on the PC, I would
proceed to download it from PC to Atari using MS-Kermit on the PC, Kermit65 on
the Atari, and a null-modem cable.  I've used this technique to transfer Atari
executables from my Amiga to the Atari, after downloading them from BBSs onto
the Amiga, and it works fine.  I wouldn't try just DUMPing the binary data 
from one computer to the other; I'd prefer to use some Kermit or XMODEM error-
correction protocol.  On the other hand, that's more of an issue when one is
using a telephone line, than when using a direct cable...

> Therefore, An 8K program should take only 10 seconds or so to download.

I'd say that's about right.  I was able to use 9600 baud over the null-modem
cable, through the 850 interface.

> Does anyone out there work in this type of environment?

I haven't tried cross-assembling for the 6502 since I became a CS major; I 
did try it once on an IBM mainframe around 1982 though.  Ack. 

Have you considered writing your OWN Atari-specific 6502 cross-assembler
in, say PC BASIC or whatever language you're familiar with?  There's a COMPUTE!
book in existence that contains 6502 assemblers and disassemblers, written in
BASIC, for the Commodore 64 and the Atari 800; perhaps you could use those
as a jumping-off point and "port" the concept or the information from that
program over to the PC?  I'd do it that way myself if I were going to try
it; first off, I'd need the existing program as a crutch to know what I was
doing, and second, I'd then have full control over the format of output, 
addition of features I needed (like, reading the source from a text file
that had been previously created under one's favorite text editor), etc.

> If you know of source code for a 6502 cross-compiler written in 
> portable C, please let me know.

Hmmm...  I think there's something for the Amiga that will cross-assemble 
6502 code -- with switches for "machine-specificity" for the Atari 800 among
other popular machines...  THAT might be written in C, although I don't know
how "portable" it would be...
-- 
UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!cfchiesa 
cfchiesa@bsu-cs.UUCP                                           

phil@calvin.EE.CORNELL.EDU (Phil Erickson) (06/10/89)

I noticed a few articles concerning a 6502 cross-assembler.
One DOES exist, in C - although I don't know how portable
it is.  It's written primarily for APPLE II users, so it
probably needs to be tweaked a little, but someone has done
the major work already.
  
On the InterNet, it's available by anonymous FTP from
kentucky (128.163.128.6 is the address) - login as anonymous,
with the password 'guest'.  Get the file
/pub/appleII/misc.utils/unix6502asm.tar.Z
onto your local Unix system, uncompress it, and un-tar it.
Docs are included.  
  
If you don't have access to a Unix system or can't uncompress
or un-tar, I could try to post it - but it's a few files.  
Let me know either way.
   
Hope this helps,
--------------
Phil Erickson         Space Plasma Physics    5143 Upson Hall
                      Cornell University      Ithaca, NY   14853
ARPA: phil@calvin.spp.cornell.edu
 or   phil%calvin.spp.cornell.edu@cunyvm.cuny.edu
UUCP: {rochester,cmcl2}!cornell!calvin!phil

jrd@STONY-BROOK.SCRC.SYMBOLICS.COM (John R. Dunning) (06/13/89)

    Date: 9 Jun 89 22:50:32 GMT
    From: calvin!phil@cu-arpa.cs.cornell.edu  (Phil Erickson)

    I noticed a few articles concerning a 6502 cross-assembler.
    One DOES exist, in C - although I don't know how portable
    it is.  It's written primarily for APPLE II users, so it
    probably needs to be tweaked a little, but someone has done
    the major work already.

If anybody's interested, I have a program that takes the output of that
cross-assembler and makes Atari-format executables out of it.