Jump to content
IGNORED

What assembly language environment do you all use?


Recommended Posts

I am fairly knowledgable at programming in various Basic's on the PC and Atari, but I want to jump into assembly language on the Atari and try my hand at writing a centipede-like game, probably using shape tables, not players. I have a 130XE and I just got the cartridge verision of Mac/65. I do have it connected to my PC with an SIO2PC cable and APE. I'm using SpartaDos 3.2g with a 16 meg drive simulated by APE.

 

My questions are to those who program in assembly language for the Atari 8 bit computers. I am hoping for some ideas as to the best way to set my computer up to do assembly language programming using Mac/65. If you were going to write a game like centipede, would you write the code all in one big source code file? Or would you create lots of smaller libraries of routines and keep them on disk in a D1:>MAC65 subdirecetory and then .include them in a main program. Would you use macros to do repetitive tasks that take parameters, or would you instead make subroutines and keep JSR'ing to them (in which case, I guess you would grab parameters from other areas of memory?) I know the compiler expands the macro into its consituent bytes every time you put it your code, so I see that macros could eat up memory fast. I've read the Mac/65 manual, as well as books on assembly language for the Atari, but the books don't realy tell you how to set up an environment, or the best way to tackle large programs.

Link to comment
Share on other sites

first of all...i would not go for native programming...

 

on PC:

 

- using an atari specific assembler (XASM, MADS or MAC/65 compatible cross assembler)

- using atari800win plus for debugging and running the code

- text editor (code genie, notepad++ etc) which are supported by the various assemblers so syntax highlightning works

 

that's a basic tool chain imho... more additional tools / batch files can be applied depending on your usage (font editors, graphic editors, etc)

 

but i would go for PC tools for max speed while developing...

 

later you can transfer code to the native platform by sio2pc and/or ape (i am doing that testing code on my 130xe). but first of all...code runs on atari800win...

Link to comment
Share on other sites

Thank you for the reply. I'm curious why you prefer to do it that way. Isn't it easier just to use mac/65 on the Atari rather than try to coordinate 3 programs on the PC?

 

Not really, f'example i use Crimson Editor to edit source code, hitting control and 2 pulls up Xasm to assemble the file and then i can drag and drop it into Atari 800Win for testing. The main advantages are memory; if the code crashes and burns, it has no way to take out the source and, because the source, target and assembler doesn't all need to fit into memory at once, i get more RAM to use. Plus the assemble/test cycle is reduced to a matter of seconds...

 

The same environment works for different machines too; control and 1 in Crimson on my machine will assemble with C64Asm for C64, Plus/4 or other Commodore 8-bit 6502 code, control and 3 starts Dasm for when i'm playing with the VCS, control and 4 compiles with Xlang for the C64 (i'm just playing with it for now, but it's a compiled BASIC variant that really shifts!) whilst control and 5 assembles with NESAsm.

Link to comment
Share on other sites

I agree with Heaven. The reason you would go the PC route is simple...speed and shortened development cycle. You can assemble your program nearly instantly and then load it into an emulator and test it. On real hardware you have to wait on slow I/O, deal with only 40 columns, etc. Another reason I like doing cross development using a PC is that your programs can pretty much use nearly all of page zero. If you are using the real hardware you have to make sure your program doesn't use page zero locations in use by your assembler for example. You can assemble straight to disk but that's really slow. Also, if the emulator crashes you can use the built-in monitor to aid in debugging. On the real hardware you would most likely need to reboot. Using a PC increases your productivity several fold. Quite frankly, after going the PC route I feel sorry for the guys who developed for the platform originally. Of course at the time that was the best they had...

 

 

tjb

Link to comment
Share on other sites

Thaks for the responses. Cross-assemblers sound interesting. I downloaded notepad++ and crimson editor. In crimson editor, under user tools, I was able to set it up to compile using xasm. Dragging and dropping the resulting obx file onto Atari800Win Plus results in boot errors, though. What am I doing wrong? Also, the text is al monchrome (black). I guess it does not recognize 6502 syntax :) Both notepad++ and crimson editor support lots of different language syntaxes, including assembler (for x86, I guess). Is there, or has anyone set up, a good color template for one of the syntax of any of the Atari cross assemblers?

Link to comment
Share on other sites

Problem - when I load a mac/65 source file in crimson editor that was created in mac/65 on the Atari (using LIST - not SAVE), the listing comes out all on one line. The line feeds (atascii 155) are not translating to ascii carriage returns (ascii 13).

Link to comment
Share on other sites

in atari800win you can convert atasci (your atari native source code format) into ascii or another trick is that you boot atari800win. then you configure a p: patch so notepad is opened when you "print" nativly text files to p:

 

assuming you have your LISTed m65 source file available for atari800win (in ATR or on you harddisc etc)...boot a dos, make sure you have set the "P:"-patch in the configuration of atari800win... now you can copy your file directly to the p: handler.

 

in dos 2.5 you would hit C and then type D:source.m65,P:

 

your notepad will be opened including your source in PC format... ;)

 

 

for crimson editor config files and xasm check out http://xasm.atari.org for more information.

Edited by Heaven/TQA
Link to comment
Share on other sites

Hi Tyrop,

 

Just to mention, I'm currently using an extra step which is

to have a 65XE sitting on top to my desk connected to the

PC via SIO2PC (USB version) but more importantly to

have the video captured by the PC too and so shown as

another window on my desktop :)

 

In APE I have disk 1 as a plain DOS disk (MyDOS currently)

and then disk 2 is mirrored to a folder on the PC where

I build the resulting binary too, and so I can rebuild and

test quickly enough.

 

Regards,

Mark

Link to comment
Share on other sites

THanks again Heaven. That worked! Wrathchild, is video quality of your capture card good? I bought something called VGA Box to hook the Atari to a VGA monitor using the video cable, but it is a bit fuzzy, and terrible using the XEP80 80 column box.

Edited by Tyrop
Link to comment
Share on other sites

  • 2 months later...

NESHLA (The High Level, Open Source, 6502 Assembler) http://neshla.sourceforge.net/

 

NESHLA is an assembler for the Nintendo NES which gives the features of high level languages such as C without sacrificing any efficiency or speed. It structures and simplifies coding the NES, while still using assembly language. Compilers are inefficient for low end systems such as the NES. Even with optimizers, they would never produce code for fast action games or capable of tapping deep into the NES. It's the best of both worlds!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...