Jump to content
IGNORED

8 bit junkie needs my coding fix!


Recommended Posts

I'm a huge C64 / A8 / Apple IIe fan.

 

I have two development environments setup and only one works. One is my C64 setup with Crimson using VICE and Kick Assembler. I have a batch file that compiles and automatically launches the program into VICE. Great for rapid testing. One button press and it goes from source -> PRG disk image -> VICE autostart.

 

I want to do the same thing for the A8. I have my 130XE connected to my XP machine with a SIO adapter. I'm new to Atari so I really don't know all of the little nuances.

 

I downloaded ATasm and have it so that I can compile to a **.65o file but when I try to run that file in AtariWin800, it usually crashes. Of course, I ONLY have the two samples that come with ATasm. I don't know all of the directives for ATasm yet.

 

So what I am wondering is if someone could point me in the right direction for the following:

 

1) A SMALL simple asm tutorial that displays "Hello world!" or something with ANY compiler. ATasm, DASM, whatever. (although ATasm seems to be like Kick Assembler)

2) A fast way to deploy the compiled app to either a ATR disk image or something that can easily be launched in both AtariWin800 AND a real Atari 130XE (via APE).

 

I know that's a tall order but there is SO much out there I'm having a hard time finding my way. Between XEX, ATR, BIN, MADS, blah blah blah I am getting confused. I admit, it's much easier to get started with C64 cross platform development.

 

I love both platforms! I want to start small again with both the C64 and A8.

 

Thanks for any suggestions!

 

cbmeeks

Link to comment
Share on other sites

I forget which Assembler it was, but there's one that can assemble direct to Save State files.

 

Another option is using an assembler within the Atari emulator environment itself. Even the crusty old Atari AsmEd runs quickly in turbo mode, although of course you have the downside of losing RAM due to the source being resident.

 

What you really want is to be creating proper Binary Load (aka Executable or Xex) type files with the load/run address all nicely included.

 

Then all you need is to double-click the resulting file from Windows and it should launch a new Atari800Win+ instance and run it from there. You need the "Reuse Emulator Window" option in the emulator disabled, else it only allows one active window.

 

As for printing stuff... you can do that with CIO. The Operating System manual is one avenue to learning how to use CIO, I've uploaded it in the first post in this thread

Link to comment
Share on other sites

I'd just assemble to a XEX file, this should autostart in Atari800Win+ when launched. You can also use the PC Mirror option in APE to launch any executable files.

 

I'm not familiar with ATASM, but I'm sure it will assemble an executable file. I'm using the cc65 tool chain (C compiler, assembler and linker) for pretty much all my projects and I could certainly give an example with that if you are interested. It may not be exactly what you are looking for though.

 

http://www.atariarchives.org has tons of info on the Atari and programming for it...

Edited by Shawn Jefferson
Link to comment
Share on other sites

MADS is THE standard since for years...not Mac/65... ;)

 

http://mads.atari8.info

 

 

I am using it with Atari800win and nearly most of the new games/demos are written in MADS plus Atari800win for rapid testing.

 

I am using notepad++ but you can use crimson editor (i have done in the past, too) and launch the assembler plus Atari800 f.e.

Link to comment
Share on other sites

Yes...because most of the source code snippets you are getting nowadays from top coders are done in MADS so you would need to rewrite the source for Atasm etc for most of the time esp. when you are using special commands like macros or special syntax. I guess but that is normal.

 

MADS is modern and maintained from weeks to weeks. I would give it a try instead of another assembler. On C64 I am using DASM esp. when porting the Atari Berzerk to C64.

Link to comment
Share on other sites

Thanks...I will give MADs a try....on the C64 I use Kick Assembler....ever use that one?

 

Well, maybe I can get some coding done now...I just finished installing a new dog kennel....man, family really drains the ole' time around here! lol

 

cbmeeks

Link to comment
Share on other sites

  • 2 weeks later...

Yeah, but the ?documentation? for Madass is some weird combination of z's, y's, & w's...

 

 

Its ok, though, here is a quick English to Polish translator algorithm:

 

The first letter of the word becomes a 'Z', the third letter becomes a 'Y', and the seventh letter becomes a 'W'.

 

For example, apply the algorithm to the first word, then the following word will be equal in meaning:

 

 

UNREADABLE

 

becomes:

 

Znyeadwble

 

 

Works like a charm.

Link to comment
Share on other sites

Yeah, but the ?documentation? for Madass is some weird combination of z's, y's, & w's...

 

 

Its ok, though, here is a quick English to Polish translator algorithm:

 

The first letter of the word becomes a 'Z', the third letter becomes a 'Y', and the seventh letter becomes a 'W'.

 

For example, apply the algorithm to the first word, then the following word will be equal in meaning:

 

 

UNREADABLE

 

becomes:

 

Znyeadwble

 

 

Works like a charm.

 

 

Zayesowe!

 

Zloy

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Since mads is based upon xasm, you can start with xasm´s english manual. The mads specific and much more enhanced macro usage sure is not described there. But you can try to learn it by reading all those sources coming with the mads distribution. Macros are heavily used there.

  • Like 1
Link to comment
Share on other sites

  • 10 years later...

Appreciate this is an old thread but I found it because I am trying to solve the same problem.

I have a lot of code written in KickAssembler for the C64 which I now want to port to A8.

 

Happy to move off Kick if there is something that could let me use the same format of comments, labels etc. for both platforms as well as keeping my platform agnostic code in one place.

Link to comment
Share on other sites

3 hours ago, peckhamdatacentre said:

Appreciate this is an old thread but I found it because I am trying to solve the same problem.

I have a lot of code written in KickAssembler for the C64 which I now want to port to A8.

 

Happy to move off Kick if there is something that could let me use the same format of comments, labels etc. for both platforms as well as keeping my platform agnostic code in one place.

First up, welcome to the Atari community!

 

As for keeping some central agnostic code, I suspect that the only thing that you'll be able to do is have some form of script which converts all code to the format required at the time. I don't think I've ever seen two assemblers with the same formats. Willing to be proved wrong though.

 

I like your username, is it anywhere near Nelson Mandela House? :)

Link to comment
Share on other sites

 

17 hours ago, peckhamdatacentre said:

Appreciate this is an old thread but I found it because I am trying to solve the same problem.

I have a lot of code written in KickAssembler for the C64 which I now want to port to A8.

 

You could keep using Kickasm, output a raw binary and launch it with some boot code in MADS format... not the cleanest way perhaps but safer and quicker than porting.

 

You wouldn't get debug labels in Altirra though.

Link to comment
Share on other sites

I reverse engineered the .xex file created by lightman:

On 3/27/2009 at 9:13 PM, lightman said:

Here is my humble suggestion:

 

1. Download xasm (my assembler of choice).

 

2. Download the source code attached to this post

 

3. Compile: xasm Hello.asm -o Hello.xex

 

4. Launch emulator, load Hello.xex

 

5. Start programming

A8_Hello_World.zip 753 B · 125 downloads

Figured out what the extra bytes at the head of the file were and wrote a bit of python to convert a Commodore .prg file created by Kick to a .xex file:

https://github.com/peckhamdata/prg2xex

The difference between the two _seems_ to be a leading 0xff 0xff, then the start address then the end address.  A .prg file just has the start address.

Thanks for your help and interest folks. I enjoyed learning about display lists too. Didn't realise how cool the ANTIC chip is.

Link to comment
Share on other sites

4 hours ago, rensoup said:

That sounds like a good idea but will it work with more than 1 segment ?

It does with this trivial example:

 

937132740_Screenshot2019-12-29at17_24_24.thumb.png.8bd17f4a15492ffb60b0ef6b4cf28a3d.png

 

But it does so by padding the gaps between the segments in the object file with zeros. It wouldn't be a lot of work to replace those with the start / end point of each segment, which is what you get if you specify a new ORG in mads.

 

 

 

Edited by peckhamdatacentre
  • Like 1
Link to comment
Share on other sites

11 hours ago, peckhamdatacentre said:

The difference between the two _seems_ to be a leading 0xff 0xff, then the start address then the end address.  A .prg file just has the start address.
 

Correct, plus:

 

- there can be multiple segments in one XEX
- the vector addresses $2e0/$2e1 (RUNAD) and $2e2/$2e3 (INIAD) have special meanings when used as segments. They define where the program starts at the end of the loading (RUNAD) or at any point during loading (INIAD). The latter can be used to load a title screen, display it and then load the rest. All in a single XEX

Link to comment
Share on other sites

On 12/30/2019 at 1:54 AM, solo/ng said:

MADS+WUDSN is love; ) we use it for atari8 / atari lynx (I wonder if tebe/JAC! knows about the latter; )

I knew you were using it for Time Pilot and I'm very happy to see the IDE enables people create such great things.
But what I didn't know until now is that you are also using it for Lynx and that your are the coder behind one of my all time favorite A8 demos.
Hats-off for "Forsaken Love" - it is a master piece, mate! 

  • Like 1
Link to comment
Share on other sites

12 hours ago, potatohead said:

 

WOW!!

 

I somehow missed this one.  Great production!

Also never saw that before - however, I noticed in the YouTube comments "Program runned on Atari XE with 65816 processor."  That's even cooler.

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...