Jump to content
IGNORED

Recommended cpu architecture and platform for beginners?


luciddefender

Recommended Posts

To preface this discussion, I have very limited amounts of programming experience. Some BASIC years ago, and only a very little bit of C.

 

Which microprocessor architecture would some of you recommend to someone that doesn't have much experience with assembly language? I suppose the ideal platform would be one with good tools, documentation, and emulators/simulators for testing code. Some processors off the top of my head are the Z80, x86, 6502, 6509, 6512, 68000, ARM, and TMS9900.

 

I would imagine for a beginner, developing on a platform with a decent amount of BIOS routines would be helpful as well. Also, a platform is easy to learn, yet difficult to master to keep it interesting would be ideal as well.

 

Would any of you share your experiences and thoughts? I'm interested in both learning and having some fun as well :)

 

Thanks,

 

- Mike

Link to comment
Share on other sites

The choice of platform depends a bit on what you would like to do with it. I'm guessing that you have an interest in games and/or retro computing, since you are posting it here? If so, the 6502 is a good starting point, since it was used on a variety of different home computers and consoles (Atari, Apple, Commodore, etc). The Z80 was also used on many machines, but I personally find 6502 to be cleaner and easier to use (from an assembly language perspective). If you are looking for something more modern, then the ARM is a reasonable choice. It is used on the Nintendo GBA and DS consoles, and lots of embedded/mobile platforms. The Arm Thumb instruction set is relatively straightforward to use, and the full 32-bit instruction set can be mastered with a bit of effort.

 

Chris

Edited by cd-w
Link to comment
Share on other sites

I'd recommend ARM too. As for a compiler I've used GCC (C/C++) for nearly 15 years. It isn't that bad and its free too :). If you want to avoid Nintendo products then Olimex supply some interesting development boards with colour LCDs. I'd go for either the NXP (formerly Philips) LPCxxxx or Atmel SAM range. Both chips have active and helpful google groups.

Link to comment
Share on other sites

ARM is my favorite modern CPU, but I'm not sure that I recommend ARM assembly for beginners. A while back, I was a teaching assistant for a microprocessor interfacing course, and students complained about ARM assembly the most. Suffice it to say, I never got any work done when I set foot in the lab, as I was constantly hounded by frustrated undergrads. These were junior-level engineering students who weren't beginners at programming.

 

However, the ARM is a suitable platform for C programming, and most ARM programmers, even the professionals, never need to use assembly. Modern C compilers do fairly well for most all ARM programming purposes.

Link to comment
Share on other sites

ARM or 68000.

The 6502, Z80 and other 8 bits require more instructions to do the same thing. That means you have more quirks to learn to program them.

The 6809 is a little better but still nothing like the ARM or 68000.

ARM would probably require a cross development kit.

68000 you could buy a used Amiga or Atari ST and download an assembler.

Link to comment
Share on other sites

To preface this discussion, I have very limited amounts of programming experience. Some BASIC years ago, and only a very little bit of C.

 

Which microprocessor architecture would some of you recommend to someone that doesn't have much experience with assembly language? I suppose the ideal platform would be one with good tools, documentation, and emulators/simulators for testing code. Some processors off the top of my head are the Z80, x86, 6502, 6509, 6512, 68000, ARM, and TMS9900.

 

I would imagine for a beginner, developing on a platform with a decent amount of BIOS routines would be helpful as well. Also, a platform is easy to learn, yet difficult to master to keep it interesting would be ideal as well.

 

Would any of you share your experiences and thoughts? I'm interested in both learning and having some fun as well :)

 

Thanks,

 

- Mike

 

 

 

All of the chips you mention are pretty decent to learn on but I'd probably

go with the 6502...as far as BIOS assistance, yes you will need it to get

things done quicker but you wont learn anything using them, other than

how to use them. To get things up and running as setting up the BIOS fine,

however,while you are learning, try to do as much as you can on your own

so you really get an idea for how things get done.

 

Of course you can probably get some disassembly of some of the bioses

out there and see how they do it. The best thing to start with is writing a

bunch of tiny apps to see how the instructions work and how the system

is effected with their use.

 

The reason I pick the 6502 is that is does not have as fancy an instruction

set or as many registers as the others so you will really learn how to go

down low. Unless you are really a glutton for punishment, stay away from

the 8048 untill you get your head around the others. :)

Edited by Gorf
Link to comment
Share on other sites

If you want to change careers and its not just learning for fun then I'd choose ARM for 32 bit development and then Atmel's AVR or TI's MSP430 for the 8 bitters. I'd avoid PICs like the plague. In all three cases development tools can be had for free e.g. GCC or comercial e.g. Keil, IAR (binary output size limited evaulation versions available for free).

 

Checkout :-

Atmel AVR

Atmel ARM

NXP ARM

TI MSP430

 

Other sites of interest :-

http://www.arm.com

http://www.avrfreaks.net

http://tech.groups.yahoo.com/group/lpc2000/

http://tech.groups.yahoo.com/group/AT91SAM/

http://www.gnuarm.com

http://www.iar.com

http://www.keil.com

 

Development boards available from :-

http://www.olimex.com/dev/index.html

http://www.sparkfun.com

http://www.embeddedartists.com

Link to comment
Share on other sites

It sounded like it was for more of a hobby. I'd still go with the 6502

to learn.

 

Only 3 registers to deal with and simple instruction set. Learning on

any others would spoil him, especially the ARM. If he is really into

the finer points of assembler, the 6502 will make him work for it.

 

 

Not to mention that most of the more popular consoles run a 6502

variant of some sort.

Edited by Gorf
Link to comment
Share on other sites

Thanks for the input. The 6502 sounds like a winner. I know the NES uses it, but it's not an easy platform to develop for. Which platform would you recommend developing for to learn the cpu, but with good development and debugging tools available?

 

Thanks!

 

If you chose 6502 then look into Atari Lynx programming. It has a sound engine, a sprite engine with hardware scaling and lots of memory. The same principles that work for the Lynx will work for most modern platforms also.

 

If you use the cc65.org compiler then it has a nice feature to add C-source lines as comments withing the generated ASM file. You learn a lot of clever tricks by studying this output.

 

--

Karri

Link to comment
Share on other sites

I'd actually vote for the Commodore 64 as a starting platform. It's very well documented (even the manual that came with it shows some kind of memory map and documents all memory locations of the video and sound chips), and you don't have to do too much to make anything appear on screen, since everything is memory mapped. Also, you can start programming in BASIC and only write short assembler routines which you call from BASIC.

Link to comment
Share on other sites

hi,

 

I would recommend also a 6502 / 6510 based machine.

The Commodore 64 would be very good to start with.

It is heavly documented and the architecture is quiet simple and powerfull.

 

The Atari 800XL is good also to start , but i think the C64 architecture is simplier to begin with.

 

Other very interesting machine based on 6502 and very easy to learn is the Oric Atmos. It is also very well documented and a lovely machine (therefore less powerful than Atari 800 or C64) , but perfect machine to learn 6502 Assembler. I think the ORIC series is not very known in U.S , but was very popular in Europe (at least UK and France) in early 80's.

 

If you prefere a more modern computer, i would recommend 68000 based processeur , like Atari ST . I would go for Atari St instead of Amiga , i think for a beginner it is easiest. The Amiga has too much coprocessor to deal with for a very beginner.

 

Anyway , that is important to start, is to choose a machine you like , and a very documented one!.

 

If you prefer program in BASIC , i would recommand the Amstrad / Schneider CPC , the locomotive's basic is very very good.

Link to comment
Share on other sites

Before you run out and learn 6502 assembly because of the advice from what is a 6502 biased group, take time to look at it's limitations.

If you decide to go 6502 I suggest the Apple II series. Just be aware the standard graphics screens are odd and there are no sprites.

The II was much more hacker (original meaning) oriented than the other 6502 systems. It's ROMs are really well documented and if you get a IIgs you can branch out into 65816 programming as well as 6502. It's also the fastest off the shelf 6502 system out there.

I suggest you get a CFFA Compact Flash board which would set you back $100 and if you can find a copy, the LISA assembler is pretty good.

Atari and C64 people will tell you how terrible the II is compared to their machines but from a programming standpoint it was very well supported.

http://en.wikipedia.org/wiki/Apple_IIGS

http://a2central.com/

http://apple2.org/

http://apple2.info/

http://adtpro.sourceforge.net/index.html

http://www.applefritter.com

CFFA

http://brendan.robert.googlepages.com/applegameserver

<edit>

Assembly tutorials can be downloaded from here.

I also suggest the book Apple II Assembly Language. There is another book that works with LISA available for download on this page.

 

LISA stands for Lazer's Interactive Symbolic Assembler and it can be downloaded here. It supposedly includes a 2d graphics library. If you have a 128K machine the editor and assembler stay resident so you can jump back and forth between editing and testing code. I learned Apple assembly with it and it's pretty nice.

 

There was also a series of newsletters called Apple Assembly lines and those can be found here.

 

KEGS Emulator here.

 

And something to play with here.

Edited by JamesD
Link to comment
Share on other sites

Why spend money on a actual piece of hardware? I say get a copy of TASM

and code on any number of emulated systems right on the PC. Once you

think you can do this stuff, then invest some money for the real thing.

 

 

The apple and commodore and all those are fine but he needs to start on a

simple system where most of the work is required by the coder. Otherwise

all he will learn to do is make bios calls.

 

You wont learn the finer points of programming doing that.

Link to comment
Share on other sites

The apple and commodore and all those are fine but he needs to start on a

simple system where most of the work is required by the coder. Otherwise

all he will learn to do is make bios calls.

 

You wont learn the finer points of programming doing that.

 

If you don't want use BIOS you can also.:)

 

I think for a beginner it is less discouraging to start with a C64 than a A2600.

He will be able to have quickly something on screen and he will be motivated to do more and learn more. And then being able to study a more difficult machine with good base.

Link to comment
Share on other sites

The Odyssey 2 has some great documentation out there - for example, this.

 

I found a commodore article database, but it has over 600 something articles! I suppose I'd like documentation that goes through the registers, works you through basic BIOS calls(hey, we all need to start somewhere), collision detection, sprites, etc. I've tried finding a decent C64 programming book, but they seem to all be on BASIC vs ASM.

 

Any suggestions? Thanks for the wealth of info.

Link to comment
Share on other sites

The apple and commodore and all those are fine but he needs to start on a

simple system where most of the work is required by the coder. Otherwise

all he will learn to do is make bios calls.

 

You wont learn the finer points of programming doing that.

 

If you don't want use BIOS you can also.:)

 

I think for a beginner it is less discouraging to start with a C64 than a A2600.

He will be able to have quickly something on screen and he will be motivated to do more and learn more. And then being able to study a more difficult machine with good base.

 

 

I would not send him off to try to learn to code on a 2600 but something with a bit more of a challenge.

The C64 is actually a good one but I think the Vic-20 would be spot on.

Link to comment
Share on other sites

The Apple II has a built in monitor/disassembler/mini-assembler in ROM. http://apple2.info/wiki/index.php?title=System_Monitor

I've seen the BBC assembler source code for Elite... I wouldn't recommend it. No NTSC either.

A great resource for all 6502 machines is http://www.6502.org/

And another http://archive.6502.org/

Edited by JamesD
Link to comment
Share on other sites

A lot of excellent info has been posted here; I adore the community here.

 

I ordered myself a few old books on 6502 assembly and a general programming book.

 

Scientific Engineering Problem Solving

 

6502 Software Design

 

Also, the e-book versions of Machine Language for the Commodore 64 and Machine Language for Beginners.

 

I'll most likely start with a Commodore 64 emulator or a Vic-20 emulator. I'm going to be switching majors in school from Criminal Justice to Computer Science, and want to have a good foundation on simple microprocessors.

Link to comment
Share on other sites

Any suggestions on good starting applications to write, from your experiences as a newbie?

 

Pong is a nice game to start with. Perhaps as a single player squash variety. There you need just two objects the paddle and the ball.

 

Or sketch is also nice if you choose a platform with a framebuffer.

 

If you go with cc65.org tools and choose a platform that supports tgi graphics then you have very nice helper functions available for drawing on the screen.

 

void draw_ball(int x, int y)

{

tgi_setcolor(COLOR_WHITE);

tgi_bar(x, y, x+5, y+5);

}

 

The cc65.org also have good ways for reading the joysticks.

 

joy = joy_read(JOY_1);

if (JOY_BTN_FIRE(joy)) {

// Do something

}

 

You should read the documentation in order to understand what kind of functions are available in the tgi-library and the joy-library.

 

The good thing in using libraries for joysticks and graphics is that the code can compile on a Lynx or on Apple and your program will work on both systems. This is what makes it possible to compile the same program for different Linux or Windows systems today even if they use different chips.

--

Karri

Link to comment
Share on other sites

Any suggestions on good starting applications to write, from your experiences as a newbie?

Hello World is usually the first assembly program.

It's important to know how to print regular text to the screen in case you need to print an error message so it isn't just a waste of time.

 

Next I'd draw some simple graphics on the screen. Draw a house with a roof, windows, door and a chimney.

 

After that I'd work on breakout rather than pong.

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