Jump to content
  • Advertisement
Sign in to follow this  
piper123

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

This topic is 1105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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?

 

Regards!

Edited by piper123

Share this post


Link to post
Share on other sites
Advertisement

If the goal is just to use ASM then I think straight x86 is the easiest.. has a lot of tools and you can easily use it on your desktop.

 

I'm sure it's a lot of fun to learn on an older machine, but it will be more difficult.

Edited by Erik Rufelt

Share this post


Link to post
Share on other sites

I much preferred the 68k style of assembly over x86 just feels cleaner and nicer to work with but as Eric said, you have an x86/x64 machine so easier to play with.

 

That said in the modern world it is far harder to get to the metal than it was when I played with assembly so getting an old machine emulator and using that would be a good in.

 

For a gentile introduction in playing at a low level you could explore the old nerd classic that is http://www.corewars.org/ is is a pseudo assembly language where two programs get loaded into an "address space" and have to locate and destroy the other before they get killed :)

Share this post


Link to post
Share on other sites

I'll put in a vote for 68k.  

z80 is also a nice processor.

 

One of them is probably already in a calculator near you, ready to be developed for smile.png

 

A good thing with these simpler CPUs is that their instruction set is way more limited then x86.

x86 is a big pile of layer of layer of decades of development... not really beginner friendly.

An 8 bit z80 is beautifully clean in comparison, which makes the basics so much clearer.

But the limitations of an 8 bit environment is not for everyone... With a 68k you have a lot more freedom, without the instruction set getting hugely complex.

 

I might be biased because those two cpus where the ones I started out with so long ago smile.png

 

C64 hardware is like a school book of basic computer architecture, so not a bad choice either IMO

Edited by Olof Hedman

Share this post


Link to post
Share on other sites

I'm not sure what the goal is, but if it's learning ASM then both unrestricted hardware access as well as instruction set complexity are irrelevant. Easiest way to start learning x86 ASM is inline ASM in Visual Studio, then concepts can be added one at a time.

 

Unless you actually want to get to know a hardware well, which can be great in itself, but quite a small subset of it is required to learn ASM.

Share this post


Link to post
Share on other sites

I much preferred the 68k style of assembly over x86 just feels cleaner and nicer to work with but as Eric said, you have an x86/x64 machine so easier to play with.

 

That said in the modern world it is far harder to get to the metal than it was when I played with assembly so getting an old machine emulator and using that would be a good in.

 

For a gentile introduction in playing at a low level you could explore the old nerd classic that is http://www.corewars.org/ is is a pseudo assembly language where two programs get loaded into an "address space" and have to locate and destroy the other before they get killed smile.png

 

Its not that hard to kick an asm function even from x64 code, the only thing that has gotten hard is that the C++ compiler no longer allows for inline ASM.

Is a good series on getting started with x64 asm in VS2010, he shows you how to call an asm function and then moves on to explaining what all the instructions do.

 

I learned ASM on a 8088 like board with MASM as the compiler this looked so much like x86 asm that moving to PC was only getting used to the new register names like EAX and stuff.
 

The other thing you can do is write a simple function in C/C++ and see what the compiler transforms that into on PC in a debug build. You will want to do this in a debug build because in that case the compiler will actual transform all of your code in to ASM.

Edited by NightCreature83

Share this post


Link to post
Share on other sites

If you're going retro I vote for the 6502.

 

It's a very simple instruction set, with only three registers plus stack pointer and flags.

 

You could probably learn it in a week if you're already programming in C or similar, and it serves as a great starting off point for x86 (which IMHO is a horrid bloated instruction set designed these days for compilers not humans and assemblers).

 

I cut my teeth on the BBC micro which is an 8 bit machine cheaply available in the UK. It's also the same hardware as the NES (famicom) so it has lots of retro uses.

 

Have fun! :)

Share this post


Link to post
Share on other sites

I vote 68000 but I vote for Commodore Amiga not Megadrive.  C64 with 6502 isn't a bad choice either.  The reason for computer instead of videogame system is that you'll most likely find more resources on the web for programming them and they both had demo scenes IIRC.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!