Jump to content
Sign in to follow this  
IBP

What's the best platform for playing with assembly language?

Recommended Posts

Apologies if this has been answered before.

 

I learned 6502 assembly at university and fancied getting back into it. What is the best machine to play about on? We used a dedicated 6502 develpment board back then.

 

I've heard mention of using the C64, is there any particular reason for this?

 

Would the BBC-B be ok, since I have good setup knocking around, or C128 of which I have one with disc drives.

 

Basically I guess my question is "What is the difference between 6502-based computers"

 

Ultimately I'd like to do a little program on the 2600, I know I'll never write a game, but doing something seems like a good challenge.

Share this post


Link to post
Share on other sites
Apologies if this has been answered before.

Often, very often... :)

 

Start with any platform except the 2600 itself. Chose any computer which has a built in BIOS and a little advanced hardware, so that you can concentrate on the Assembler language and don't have to deal with numerous hardware limitiations all the time.

 

And after that, you can switch to the 2600 for some extra challenge. :)

Share this post


Link to post
Share on other sites

I would use any Platform for which you easily can get a good assembler. I would even consider coding using an emulator for getting started, since using a cross-assembler on modern hardware is the easiest way to do it.

 

What platform you want to code for is also a question of what kind of applications you like to develop. If you want a real challenge, choose the VCS. Easy to code (in assembler) platform: use the C64 (or your C128), which has also nice gfx and great sound capabilities. No exciting gfx and sound hardware, but faster 6502: use the BBC.

 

Mentioning now all 6502 based computer systems and their strong- and weknesses would be too much here now (and would probably confuse you).

Share this post


Link to post
Share on other sites

I'd recommend either the C64 or the atari home computers. probably the C64.

 

The thing with the C64 is you can set your own limits - if you don't want to get too bogged down with limitations of hardware you've got a nice machine there with decent graphics capabilites for an 8-bit, hardware sprites that are easy enough to use and you don't have masses and masses of overhead like you do on the beeb.

 

once you've gotten the hang of that you can start playing with the other things the machine does - like border removal, FLD/FLI graphics tricks and whatever (these tricks take a bit of thinking about - but are pretty much bread & butter stuff for VCS coders :) )

 

There's also plenty of folks willing to help you and tools available. the emulators (VICE and ccs64) are pretty much spot-on so there's not much likelyhood of you doing something that breaks and emulator that works on real hardware and vice-versa.

Share this post


Link to post
Share on other sites

I grew up using the Atari hardware most, so it's the one that I feel most comfortable using. I started learning about 6502 with the AppleII in school, but it's venetian blinds graphic system was really hard to work with...and graphics was the main reason I began using computers in the first place. In retrospect, I think that the C64 might be the system that is the easiest to work with if you are an absolute beginner...and there is a wealth of material avaliable to it that is geared toward the absolute beginner. So I'd say a C64 with a freeze cart (to dump you into the machine language monitor whenever you want...really handy to study commercial programs).

Share this post


Link to post
Share on other sites

The problem is most 6502 based consoles and computers are very different from an I/O perspective. So although you can re-learn 6502 using a C64, 90% of what you will need to learn will be C64 specific.

 

And I have to disagree with Thomas, the 2600 isn't a bad console to use to learn the 6502. Although it can be difficult to program the 2600 to do many things, it is reasonably easy to get it to do something. You don't need to write very much code to persuade the TIA to start kicking out graphics. (Whereas you need a lot of code to set up the DLL used by the 7800 for example.)

Share this post


Link to post
Share on other sites

Maybe, but the 2600 won't give you many indications about what you do wrong on it either. So a learning platform that you can at least get into the machine language monitor is definately a plus. And the language itself behaves the same way that it does on the 2600 (besides the stripped addressing).

Share this post


Link to post
Share on other sites

I've heard mention of using the C64, is there any particular reason for this?

 

Would the BBC-B be ok, since I have good setup knocking around, or C128 of which I have one with disc drives.

 

Basically I guess my question is "What is the difference between 6502-based computers"

 

I would probably suggest the C64, mainly because it has nice hardware which allows you to get excellent graphics for little effort, and it has an inbuilt BASIC. I started learning 6502 after writing a game in BASIC and finding it was too slow. I slowly hand-compiled my BASIC program line by line, and it became super-quick.

 

I have used the BBC - I would not recommend this as a learning platform as there's a) not much of a user base these days and b) not much hardware support for graphics objects (eg: sprites). On the other hand, the C64 has a good-size user base and lots of support.

 

I was also the proud owner of an Atari 800 - a machine I loved at the time. This is also a good machine to learn with - but not as nice as the C64 in terms of hardware capabilities.

 

For the beginner, I would not recommend the '2600.

 

Cheers

A

Share this post


Link to post
Share on other sites
Maybe, but the 2600 won't give you many indications about what you do wrong on it either.

z26.log - yes it's huge but it give lots & lots of info. (A helper application is also being developed to make it easier to work with). I believe that PCAE alos has some tracing capabilities, along with an add-on to Stella in development.

 

The problem, IMHO, with programming other computers & consoles is you spend most of your time figuring out what BIOS calls to make instead of coding actual 6502 routines. That BIOS knowledge can't be re-used on other platforms.

Share this post


Link to post
Share on other sites

easiest thing to do with the c64 kernal (BIOS) is to flip the banking bit and use the RAM under it instead

 

the kernal won't be much help - and any decent debugging is usually on the cartridge (I recommend the action replay)

Share this post


Link to post
Share on other sites

I'd really suggest going with whatever system you like the most.

 

There's enough documentation available for any of the major consoles/computers to get you going. And while the 2600 is pretty unforgiving you actually may be better off starting with it if that's your end goal since you'll avoid any "bad habits" or any over reliance on BIOS/graphic chip type crutches from other systems. In the same way that learning a high level language and then assembly is not neccessarily the best way to go since you have to "unlearn" all kinds of high level habits.

 

In addition, a lot of people never get past the beginner stage. Working on a system you truly love is only going to help get you over the humps - Why spend 6 months or a year working with a system you're not really interested in, just so you can eventually get to the one you DO want to work with? And in the end, worst case, if you do wind up dropping it, you'd probbaly be a lot happier having some "Hello Worlds" and similar type "demos" for the system you really like than some system you were just working with because we told you to.

 

Myself, I learned assembly, back in the day, on Apple II's and quickly moved to the C64. The C64 does have the advantage of very straightforeward video hardware and copious documentation. But again, if you don't care abpout the C64 and you're in love with something else. Go with your love...

 

If you do decide to start with the C64 with an eye to moving to the 2600, pay particular attention to raster interrupts, since the Atari 2600 video output is essentially like one big full screen raster interrupt...

 

BTW - Motorola CPU's of that era tend to be very similar and the transition is pretty easy between them. For example the 6809 (Vectrex, CoCo) is very similar to 6502 with some extra registers and a bunch of new instructions. To the extent where I'd expect 6502 source code to assemble and run virtually unmodified on a 6809 (hrm, that's an interesting thought, that..)

 

Chris...

Share this post


Link to post
Share on other sites
To the extent where I'd expect 6502 source code to assemble and run virtually unmodified on a 6809 (hrm, that's an interesting thought, that..)

 

Nope, although there are a lot of similarities, there are some major (and minor) differences - starting with 16 bit X, Y & S registers.

 

Of course, what make a computer/console isn't the CPU but the other chips.

Share this post


Link to post
Share on other sites

:evil: evil thought :evil: learn the 6502 on the KIM-1, which has a six 7 segment LED display and a hex keypad.

 

Build your own KIM-1, which uses a 6532 RIOT, just like the 2600 VCS.

 

For some bizzare chance of fate, I won a KIM-1 programming book, "The First Book of KIM", at a junior high computer programming competition. I quickly figured out that the book was useless without the computer. Though it was interesting to read about some of the things they made this simple machine do - including a version of "Hunt the Wumpus".

Share this post


Link to post
Share on other sites

If you're an experience programmer, I don't think VCS is so terrible a place to learn 6502, even if you don't know much ASM. I think there's enough of a support community, and that there are so few moving parts, that with the help of the tutorial boards or my own tutorial and what not, you can get some basics going (part of the secret is to choose game designs that aren't too ambitous to begin with.)

Share this post


Link to post
Share on other sites

I'm surprized to not see more votes for the Atari 8-bit. Many of the concepts you'll learn will be useful for 2600 programming, and the 5200 is nearly identical.

 

-Bry

Share this post


Link to post
Share on other sites
I'm surprized to not see more votes for the Atari 8-bit. Many of the concepts you'll learn will be useful for 2600 programming, and the 5200 is nearly identical.

That's a very good point.

Guess I never got beyond BASIC in the good old days, for both Atari 8bits and C=64...

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...