Understanding 6502 assembly on the Commodore 64 - (4) RECAP AND DEVTOOLS INTRO

There is no greater method, to study the inner workings of the the C64 than that which was demonstrated in the previous posts.  The ability to modify memory addresses in real time simply cannot be matched.

We watched how, not a computer program, but a human being executed a series of instructions on a computer, achieved a desired output.  Lets look at our instructions in order.






HERE IS WHERE WE STARTED FOR SPRITE 0

1) MODIFY D015 :      SET TO 01

2) MODIFY D000:       SET TO AA
3) MODIFY D001:       SET TO 8F
4) MODIFY 07F8:        SET TO 0B
5) MODIFY D017:       SET TO 01
6) MODIFY D01D:      SET TO 01

7) HIT RETURN A BUNCH OF TIMES TO CLEAR THE SCREEN

8) STARTING AT 02C0 ADD THIS INTO MEMORY SEQUENTIALLY :

03 FF 00 07 FF 80 0F FF
80 1F 83 80 3E 00 80 7C
00 7F 78 00 7E F8 00 7C
F0 00 78 F0 00 70 F0 00
00 F0 00 70 F0 00 78 F8
00 7C 78 00 7E 7C 00 7F
3E 00 80 1F 83 80 0F FF
80 07 FF 80 03 FF 00 00

9) HIT RETURN A BUNCH OF TIMES TO CLEAR THE SCREEN

HERE WE HAVE A LOGO IN THE MIDDLE OF THE SCREEN

10) MODIFY D000:       SET TO FF
11) MODIFY D001:       SET TO 32
12) MODIFY 0D17:       SET TO 00
13) MODIFY 0D1D:      SET TO 00

HERE WANTED TO MOVE TO LOGO FURTHER TO THE RIGHT 

14) MODIFY D010:       SET TO 01

15) MODIFY D000:       SET TO 3B

HERE WANTED TO MAKE THE LOGO RED

14) MODIFY D027:       SET TO F2



Basically you had done everything that you wanted a machine language program to do for you.  When we've got what we want we need to write it in assembly.  While back in the day there was no other option than writing / saving / loading assembly code on the C64, today there are better options.

This is my preferred method:

1) Write the code in a development suite called RELAUNCH64
2) Relaunch compiles it with an assembler called TASS, producing a PRG file
3) RELAUNCH sends that PRG file to VICE and loads it.


Relaunch64 is great for writing code for the C64, the other advantage is that it works with Linux.  Im sure there are other programs for MAC or Windows, but since I don't run them, I don't use them.  However, I encourage you to try some of the other programs available.  The root concept between all of them is the same,  write / compile / run

I believe a well known windows program is called CBMstudio, and might be worth checking out, it looks really cool.



NEXT----->
Understanding 6502 assembly on the Commodore 64 - (5) DEVTOOLS


Table of contents



No comments:

Post a Comment