Check out my 6502 Assembly source for a cool game! :D

I wrote all of this just in my plain old 64-bit text editor on Windows 7 today; it took me almost six hours to do so, but check it out!

The source needs to be assembled with an 8-bit assembler targeted at the MOS Technology 6502 machine code for the chip.

Here's the source if you want to test it yourself, modify it, learn from it, etc.:

http://www.filedropper.com/test_30


(Click "Download This File" on the lower area of the page as it loads, enter the CAPCHA, then you're done)

PS: Total file size is 1 megabyte.
Last edited on
That's definitely 6502. But what machine are you targetting? There were a dozen that used a 6502. Is this NES? Commodore?

What assembler are you using?
I don't understand what you mean by what "machine" I am targetting.

I am targetting the 6502 8-bit microprocessor.

NES? Commodore?

Those are not "machines", those are names of computer systems that used MOS Technology's 6502.

EDIT: I mentioned what assembler to use in my original post.
Last edited on
I am targetting the 6502 8-bit microprocessor.


A microprocessor doesn't do anything by itself. You have to have some form of IO with the user. How you do IO depends on what other hardware is attached to the machine. And all hardware has it's own memory map and register settings, so coding for each of them is different.

You have to pick one. Which did you pick? How are you doing IO?

I mentioned what assembler to use in my original post.


No you didn't. All you said was "an 8-bit assembler targeted at the MOS Technology 6502 machine code".

Off the top of my head I can name at least 6 different 6502 assemblers that have conflicting syntax (x816, ca65, nesasm, tasm, xkas, asm6). Code that assembles in one of those would not assemble in another.



EDIT:

Sorry, I don't mean to sound like a wiseass. I'm just genuinely curious about this. I did a lot of 6502 back in the day.
Last edited on
Oh, you meant what hardware system I was targetting(e.g. For graphics purposes specifically).

I was targetting the Commodore 64's basic graphics chip:
http://en.wikipedia.org/wiki/MOS_Technology_VIC-II

Also, it is worthy to note that although the microprocessor ends up with almost nothing itself, it is basically what gets everything going in the first place.

But although the 6502's microarchitecture didn't change much, most assemblers would target adequate ISA opcodes regardless. My point being that although the hardware for the graphics can change per hardware system, the machine code implemented on the chip is purely consistent.
Last edited on
I was targetting the Commodore 64's basic graphics chip:


Very nice.

Also, it is worthy to note that although the microprocessor ends up with almost nothing itself, it is basically what gets everything going in the first place.


I didn't mean to say the processor doesn't do anything. I was just saying it's only one part of a larger machine. But yes, you are correct.

But although the 6502's microarchitecture didn't change much, most assemblers would target adequate ISA opcodes regardless


The opcodes, yes. But other syntax like operators (such as < for low byte, > for high byte), assembler directives (such as dcb), and other things are largely specific to certain assemblers. Each assembler has their own, slightly different way to handle that stuff.
Last edited on
Can you put game onto mediafire.com?

Can't go to filedropper...
Topic archived. No new replies allowed.