Jump to content
IGNORED

What's the best system on which to learn ASM?


MantaNZ

Recommended Posts

Hey guys,

 

I'm looking at getting into retro game dev. I've been a game developer for the last five years and am fairly proficient in C/C++ (although I've used Unity and JS/C# for all of my game projects) but assembly is completely new to me.

 

I understand you need to really get to know the hardware (something Unity doesn't require - lol) and my school of thought was that a simpler machine would be simpler to learn... or is there more to it than that?

 

I was thinking of starting on the C64 and working my way up to 68k asm so I can make stuff for the Mega Drive, but where would you guys suggest starting?

 

Cheers!

Link to comment
Share on other sites

I started directly with 68K ASM, since you are a developer it might not be such a rough transition for you. There is a lot of reading involved and you sometimes can't just google an answer. ( I used to do C# dev and remember stack overflow being the holy ground for C# answers )

 

I initially wrote simple ASM programs and ran them with GDB sim and Qemu. If you are a Linux user it is fairly trivial to set up a cross compiler and get things moving rather quickly.

 

If you're interested in setting up a cross compiler check this link.

 

To run the build binaries in QEMU check out this.

Link to comment
Share on other sites

Yes, the 68K is very orthogonal and used to be a popular CPU to learn assembly language for CS students, although in practise you would've had more use in learning X86 assembly. I don't know if the Megadrive is a nice target, or if you'd be better off fiddling in the land of either Amiga or Atari ST, but quite possibly you could be well off going directly into Sega territory.

 

I don't know how the situation is for C compilers targetting the Megadrive, but given there are C compilers for other 68K systems including cross-compilers, perhaps you would investigate the possibility to use a cross compiler at first and then by hand optimize sections of your program in assembly code? Or at least that would be an option for later, once you got 68K running and you want to save some development time.

 

The C64 also is a good starting platform for 6502, and it has plenty of online resources and a mostly friendly programming community if you get stuck.

Link to comment
Share on other sites

Thanks for the replies, guys :)

 

I've decided to go with C64. It's my all time fave computer, so why not start there? I have a book by Jim Butterfield, which is really good so far. I'd even go so far as to say assembly looks to be a bit easier to learn than C++. So far! Lol.

 

As for C on the Mega Drive, I've messed about with eth SGDK and it's pretty cool but it is lacking in certain areas. Plus, I really want to learn assembly. I really like the idea of getting to know the machine inside and out :)

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I found that it depends entirely on the material you have available. Once you know one ASM, it's pretty easy to learn others. Back in '91 I managed to learn 68000 in a week thanks to a book by Glentop publishing that made things ultra easy. I also had a copy of Atari ST Internals, which helped me understand the machine.

 

I'd owned a copy of Lance A Leventhal's book on 6502 assembly for a few years prior to that but found the book not to be much use to beginners. It's only after figuring out 68000 assembly that the 6502 book started to make sense and I was able to learn 6502 a week later.

 

If you have the right reading and reference material for your chosen machine then the rest falls into place.

Link to comment
Share on other sites

I ended up going with C64.

 

I've set up Relaunch 64 in OS X and am using ACME as the compiler. Works really well!

 

I have a few books but I've found one which jumps into the fun stuff, graphics and sound. Most of the other books are all quite, well, boring. Lol. I like to be able to see stuff working and learn by doing.

 

The book I'm using is called Assembly Language for Kids. Haha. If it's for kids, I must be really stupid!

 

Getting there though. Got the basics down, loops etc. It seems to be easier than I remember C++ being at the beginning. I assume C++ would be easier after learning assembly, too.

 

One funny thing, I always hated pointers. Took me so long to get my head around them. In assembly, it's pretty much only pointers and I really like it! Haha.

Link to comment
Share on other sites

  • 3 weeks later...

I recommend using NASM as your first assembler, because it is open source and cross platform (works in Windows, Linux, and even Mac OS X)

 

Now, that you wrote a primitive "Hello world" bootloader, search for more complex examples. Don't worry if you find them in a slightly different syntax (MASM, FASM, etc). It is more important to get the very idea and implement it yourself. If you don't succeed at first, StackOverflow or Daniweb will help you:)

 

Also, if you find yourself to like NASM, here is a great book to look at: Assembly Language: Step-by-step.

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