ChibiAkumas Tutorials
Lesson H5 - Hello World on the Apple II | |
Lesson S5 - Bitmap Drawing on the Apple II | |
Lesson S14 - Joystick Reading on the Apple II | |
Lesson S24 - Sprite Clipping on the Apple II | |
Lesson A1 - Extra commands in the 65c02 (Snes,Lynx & Apple II) and 6280 (PC Engine) processor | |
|
Lesson P3 - Bitmap Functions on the Apple II |
Lesson P12 - Joystick Reading on the Apple II | |
Lesson P23 (Z80) - Sound with the 'Beeper' on the Apple II | |
Lesson P53 - Sound on the Apple II | |
Lesson P57 - Multiplatform Software tilemap on the Apple II | |
Lesson Photon3 - Apple 2 - ASM PSET and POINT for Pixel Plotting | |
Useful Documents
understanding_the_apple_ii
- Great breakdown of the Apple II hardware
Understanding_the_Apple_IIe
- Apple IIe version!
Port Map - Apple II ports
Useful Tools
CiderPress - Disk
editor
The Apple IIc memory map is pretty
typical. We'll use Graphics Mode, and Page 2 - this means for our purposes the area $0C00-$3FFF can be used for our main program code. Notice that the area $C000-$FFFF allows us to access the hardware... Each "Port" has a different purpose, but rather strangely when we want to do something like set the graphics mode, we write ANY value to the graphics port... the value makes no difference! |
|
Writing
any value to these memory addreses causes the hardware change. For example, to change the system to graphics mode: lda #0 sta $C050 ; Text off sta $C052 ; Mixed Mode off sta $c057 ; Display hires sta $C055 ; Hires screen 2 Reading from the ports will also have the same effect! |
|
Colors on the Apple II are effectively an 'Artifact' of the
screen... certain combinations of Off (0) and On (1) pixels will appear colored... this is known as Composite Artifact colors... Unlike pretty much every system in existance, 8 bits of a byte draw 7 pixels!.... the top bit is a 'Color bit'... selecting 'Palette 0 or 1 The remaining 7 bits are the 7 pixels of bitmap data... because each line is 40 bytes wide, the Apple II screen is a rather odd resolution of 280�192 The bits are BACKWARDS... The right pixel onscreen is the left bit (bit 6) in the byte, and the left pixel on the screen is the right pixel in the byte (bit 0) |
|
||||||||||||||||||||||||||||||||||||||
Because of these artifacts, a '2 color' bitmap will show colors
depending on the combination of the pixels... My Akusprite editor offers a half horizontal resolution mode, where the 4 colors will be converted to the correct bit combinations ![]() |
|
Highres Screen Mode 2 -
Memory map
Memory addresses for Screen Mode 2 is
split into 3 chunks,also, every 8 lines we effectively 'reset' our
high memory address and add $80
Pixels in Each line are in normal Left->Right format, however remember 7 pixels are defined by each byte, with 1 bit defining the color palette. We can calculate the address of the start of a line by splitting the bits of the Y line number... YPOS:
Address= Base+(AA*$0028) + (BBB*$0080) + (CC*$0400) + XPOS |
|
Analog Joystick
On the Apple 2, we'll be using Analog Joysticks... these return a
value for the X and Y axis in a range of 0-100 0,0 is Top,Left.... 100,100 is Bottom,Right We're going to read these in and convert them to Digital Values |
![]() |
||||||||||||||||||||||||||||||||||||||||
There are several ports we need to know about on the
Apple II Reading Analogs on the Apple II is a pain... we reset the analogs with $C070, then count up until bit 0 of $C064 (or one of the other analogs) becomes 1 - this value in our count is the analog position In thory the Apple II as 4 switches (0-3) but we can only easily use 0 and 1 Each Joystick will use Two Analogs, 0 & 1 for Joystick 1, and 2 & 3 for Joystick 2
|