Skip to content

Commit 56fe0cc

Browse files
committed
Add README for variants
1 parent 62509e5 commit 56fe0cc

10 files changed

Lines changed: 79 additions & 12 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
![blink board](img/blink_board.jpg)
55

@@ -23,11 +23,11 @@ void loop(void)
2323

2424
### Commodore User Port
2525

26-
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
27-
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
28-
| GND |_(1)_|_(1)_|_(1)_|_(1)_|_(1)_|_(1)_|_(1)_|_(1)_|_(1)_|_(1)_| GND |
29-
| GND |_(2)_|I/O 0|I/O 1|I/O 2|I/O 3|I/O 4|I/O 5|I/O 6|I/O 7|_(2)_| GND |
30-
|**A**|**B**|**C**|**D**|**E**|**F**|**H**|**J**|**K**|**L**|**M**|**N**|
26+
| PIN_1 | PIN_2 | PIN_3 | PIN_4 | PIN_5 | PIN_6 | PIN_7 | PIN_8 | PIN_9 | PIN_10 | PIN_11 | PIN_12 |
27+
|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
28+
| GND | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | GND |
29+
| GND | _(2)_ | I/O 0 | I/O 1 | I/O 2 | I/O 3 | I/O 4 | I/O 5 | I/O 6 | I/O 7 | _(2)_ | GND |
30+
|**PIN_A**|**PIN_B**|**PIN_C**|**PIN_D**|**PIN_E**|**PIN_F**|**PIN_H**|**PIN_J**|**PIN_K**|**PIN_L**|**PIN_M**|**PIN_N**|
3131

3232
_(1)_ Pins of the upper row differ significantly between systems.
3333
Some of them can be used as additional input or output lines.

‎alternatives/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Alternatives
55
This directory contains examples written without the **blink65** library.

‎alternatives/blinkbasic64/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Blink - BASIC
55
This exapmple is written without the **blink65** library.

‎examples/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Examples
55
This directory contains examples written with the **blink65** library.

‎examples/blink/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Blink
55
The classic blink example.

‎examples/simple64/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Simple 64
55
This example uses the same sketch as the blink example,

‎examples/tones/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# blink65
2-
Write Arduino-style sketches for VIC-20 and Commodore 64.
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
33

44
## Tones
55
Using the tone() function.

‎library/c64/README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# blink65
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
3+
4+
### Commodore 64 User Port
5+
6+
| PIN_1 | PIN_2 | PIN_3 | PIN_4 | PIN_5 | PIN_6 | PIN_7 | PIN_8 | PIN_9 | PIN_10 | PIN_11 | PIN_12 |
7+
|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
8+
| GND | +5V DC | /RST | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | _(1)_ | 9V AC + | 9V AC - | GND |
9+
| GND | _(1)_ | PB0 | PB1 | PB2 | PB3 | PB4 | PB5 | PB6 | PB7 | PA2 | GND |
10+
|**PIN_A**|**PIN_B**|**PIN_C**|**PIN_D**|**PIN_E**|**PIN_F**|**PIN_H**|**PIN_J**|**PIN_K**|**PIN_L**|**PIN_M**|**PIN_N**|
11+
12+
_(1)_ Pins available via direct programming of CIA chips.
13+
14+
### Commodore 64 Variant
15+
The ```tone()``` function uses Timers A and B in free-run mode to toggle pins PB6 (**PIN_K**) and PB7 (**PIN_L**) of CIA 2,
16+
respectively, at the required frequency.
17+
18+
The supported frequency range is between 10 Hz and 65 kHz.
19+
20+
Pins must be explicitly set to output mode.

‎library/pet/README.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# blink65
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
3+
4+
### Commodore PET User Port
5+
6+
| PIN_1 | PIN_2 | PIN_3 | PIN_4 | PIN_5 | PIN_6 | PIN_7 | PIN_8 | PIN_9 | PIN_10 | PIN_11 | PIN_12 |
7+
|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
8+
| GND | _(1)_ | _(2)_ | _(2)_ | _(2)_ | _(2)_ | _(2)_ | _(2)_ | _(1)_ | _(1)_ | GND | GND |
9+
| GND | _(2)_ | PA0 | PA1 | PA2 | PA3 | PA4 | PA5 | PA6 | PA7 | CB2 | GND |
10+
|**PIN_A**|**PIN_B**|**PIN_C**|**PIN_D**|**PIN_E**|**PIN_F**|**PIN_H**|**PIN_J**|**PIN_K**|**PIN_L**|**PIN_M**|**PIN_N**|
11+
12+
_(1)_ Pins used for the video signal.
13+
_(2)_ Pins available via direct programming of PIA and CIA chips.
14+
15+
### Commodore PET Variant
16+
The ```tone()``` function uses the VIA Shift Register in free-run mode,
17+
combining the Timer 2 rate with specific Shift Register patterns to output the required frequency on pin CB2 (**PIN_M**).
18+
19+
The supported frequency range with this method is between 243 Hz and 65 kHz.
20+
21+
Pin is implicitly set to output mode.

‎library/vic20/README.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# blink65
2+
Write Arduino-style sketches with cc65 for VIC-20, PET, and Commodore 64.
3+
4+
### Commodore VIC-20 User Port
5+
6+
| PIN_1 | PIN_2 | PIN_3 | PIN_4 | PIN_5 | PIN_6 | PIN_7 | PIN_8 | PIN_9 | PIN_10 | PIN_11 | PIN_12 |
7+
|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
8+
| GND | +5V DC | /RST | PA2 | PA3 | PA4 | PA5 | PA6 | PA7 | 9V AC + | 9V AC - | GND |
9+
| GND | _(1)_ | PB0 | PB1 | PB2 | PB3 | PB4 | PB5 | PB6 | PB7 | CB2 | GND |
10+
|**PIN_A**|**PIN_B**|**PIN_C**|**PIN_D**|**PIN_E**|**PIN_F**|**PIN_H**|**PIN_J**|**PIN_K**|**PIN_L**|**PIN_M**|**PIN_N**|
11+
12+
_(1)_ Pins available via direct programming of VIA chips.
13+
14+
### Commodore VIC-20 Variant
15+
The ```tone()``` function supports two different output methods depending on the pin:
16+
- PB7 (**PIN_L**): Uses Timer 1 of the 6522 VIA in free-run mode to toggle the pin.
17+
18+
This 16-bit timer allows a very wide frequency range, clamped between 10 Hz and 65 kHz in this implementation.
19+
20+
The pin must be explicitly set to output mode.
21+
- CB2 (**PIN_M**): uses the VIA Shift Register in free-run mode,
22+
combining the Timer 2 rate with specific Shift Register patterns to output the required frequency.
23+
24+
The supported frequency range with this method is between 271 Hz and 65 kHz, on PAL systems, and between 248 Hz and 65 KHz on NTSC systems.
25+
26+
Using this method, PIN_M is implicitly set to output mode, as is PIN_B, where Timer 2 clock is emitted.

0 commit comments

Comments
 (0)