Advanced 6502 Assembly Programming for the Apple II

preview_player
Показать описание
The first half contains a detailed description of the 6502 instruction set; the second half is a tutorial on writing graphical programs for the Apple II.

Production credits:
OpenShot 2.5.1 .............. Video editing and smooth animation
Audacity ............ Audio editing
LaTeX with beamer and tikz ............. Technical drawings and coarse animation
ImageMagick ........... Rasterizing PDF images
Kazam ........ Screen capture
The Gimp ..... Raster image editing
Linapple ........ Apple IIe emulation
Merlin32 ....... 6502 Cross-Assembler
Apple Commander .... Apple II Disk Image management
Apple Computer's DOS 3.3 System Disk ....... Phone List, Little Brick Out
Sirius Software Phantoms Five ..... Hires loading animation
Sega's Congo Bongo ..... Hires game splash page
Broderbund Software's Choplifter, Karateka, Lode Runner ..... Hires game images
Weekly Reader Software's Chivalry .... Hires game image
Wikipedia .... Still images
Рекомендации по теме
Комментарии
Автор

Superb video. If I had a time machine, I'd go back and show it to my teenage self!

peter.mccullagh
Автор

One of the best videos on YouTube for the retro crowd. Your summation of the 6502 instruction set was excellent.

r.d.machinery
Автор

This is very informative, explaining the instructions in logical groups is excellent.

vanhetgoor
Автор

If I had been born in those times and had known you, I would consider you my best friend. We would have been two nerds doing awesome nerd things!

gbeck
Автор

This video's place is in a museum. Woz would agree.

ericstorm
Автор

Another 6502 programmer here from Commodore 64 camp

Instruction manuals which came with the computers post 8bit continue to lack.

So hard to find books back then. Much longer distance than a click away.

randomlifts
Автор

14:16 The Nintendo 6502 decap and IC photograph show that it uses the exact the same 6502 layout as the Apple and includes all of the BCD logic however a very tiny (few gate) modification has been made to disable the Decimal mode from working. This was to avoid the patent you mentioned as they weren't exactly paying MOS appropriately for the use of the 6502.

As mentioned elsewhere, on systems like the 2600 BCD was useful to do decimal scoring in games.

djmips
Автор

I am just starting out. I am building the Ben Eater computer on a breadboard. I am using the ca65 and ld65 (assembler and linker). I am going to be watching your awesome guide lets says many many times, and taking notes. Ty for sharing.

Rich-can-do
Автор

In other 1975 events:
Linda Ronstadt had her first and only number 1 single with "You're No Good" (for one week in February 1975).
Elton John's Captain Fantastic and the Brown Dirt Cowboy and Rock of the Westies both debuted at number 1 on the Billboard 200.

ClassicTVManX
Автор

Such a clear and well done presentation!

LukeAvedon
Автор

BCD Decimal arithmetic commands we often used in apple][ games in fact! They were used just to increment/display game score in decimal. It saved dozens of bytes.

alexloktionoff
Автор

Great video! Very well explains Assembly! Thank you!

GeorgesChannel
Автор

This video is amazing. I wish I found it sooner.

adamdonovan
Автор

Despite all of its weirdness and limitations, the fact that the Apple ][ had built-in color graphics made it the first personal computer that could be a video game platform. Other 8-bit computers had much better capabilities, but they came later and were able to use custom chips.

hangonsnoop
Автор

I took lots of Apple II programming classes when I was a child back in the 80's. Why was I never taught any of this material in any of the classes?

Jeff-xyfv
Автор

Video memory addresses were often arranged in an unintuitive way - although not always as tricky as in the Apple II. The reason for this is that it was Dynamic RAM, that had to be refreshed within a certain time frame to retain its contents. To create the video output signal, the video chip had to read the RAM in a repetitive way anyway, and if the addresses were interwoven in the right manner, this continuous read operation could have been used as the DRAM refresh.

heinzk
Автор

5:56
There are actually only 3 instruction groups (according to my 1976 650x programming manual).
If bit 0 is set it is a group 1 instruction with 16 addressing modes, 8 of which have been defined. These are the Accumulator work horse instructiinsxand every instruction has every one of the 16 address modes.
If bit 0 is 0 and bit 1 is 1 it is a group 2 instruction which are the bit shifting, X and INC/DEC instructions - not all instructions can have all 8 of the possible addressing modes.
If bits 0 and 1 are both clear then it's the group 3 instructions which are the Y and the rest instructions. These have near enough the same addressing modes as group 1.

In group 1 if bit 1 is set it is one of the 8 addressing modes reserved/defined for future expansion, so group 1 can be split into 1A if bit 1 is unset and 1B if it is set. This does allow the split you gave with bits 0&1 the group:
0 - Group 3
1 - Group 1A
2 - Group 2
3 - Group 1B (all future expansion)

The 3 address mode bits are consistent in group 1A, and fairly consistent between Groups 2&3 where the moses are defined slightly differently.

Using the 3-bit, 3-bit, 2-bit model you suggest shows that some instructions have the wrong OP Code. eg TYA ought to be $88, CLV ought to be $98 (based on how the other instructions in their groups behave with the same addressing modes). DEX, DEY, INX, INY, NOP ought to be elsewhere as well.

Missing instructions can be seen where they should be in the instruction set based on the addressing modes available (eg STX Z, Y; CPY Z, X; CPY abs, X). JMP ought to be, say $40 (as that then matches the addressing mode 000 for group 3 instructions which is immediate data, instructions 0-3 use 2 bytes, 4-7 use 1 byte - BRK, RTI and RTS effectively ignore the 2 byte immediate data, and it vaguely explains BRK pushing instruction address + 2 on the stack).

cigmorfil
Автор

I use BIT to toggle soft switches. I saw it somewhere and started do it.

berighteous
Автор

This is such a cool video!! Thank you for sharing

mr_noodler
Автор

I remember struggling trying to write Assembly code in High School with no book to refer to. Was able to do things, but the concept of the interrupt was beyond me at the time. I would have loved to have had those two books you refer to. Alas, the age of the 6502 has passed.

acasualviewer