Skip to content

Commit 920dfd3

Browse files
committed
A5200: Adds an Atari 5200 section to the manual.
1 parent 1a9438d commit 920dfd3

3 files changed

Lines changed: 86 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ There is a full manual with all the supported syntax in the file [manual.md](man
2727

2828
To use the cross-compiler, download from the releases and see [compiler/USAGE.md](compiler/USAGE.md) for instructions.
2929

30+
For the Atari 5200 support, read the [a5200.md](Atari 5200 manual appendix).
3031

3132
Sample files
3233
------------

a5200.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Atari 5200 console support
2+
==========================
3+
4+
*Note: This is an appendix to the main FastBasic manual.*
5+
6+
The FastBasic cross compiler supports the Atari 5200 console as a target,
7+
allowing to port programs from the Atari 8-bit computers with minor
8+
modifications.
9+
10+
11+
RAM Usage
12+
---------
13+
14+
The Atari 5200 console has only 16kb of RAM, this means that you have to
15+
minimize RAM usage in your program.
16+
17+
For compatibility with most programs, `DLI` and `DATA` statements are stored in
18+
RAM, this means that you should put big `DATA` statements in ROM by using the
19+
construct:
20+
21+
DATA mydata() BYTE ROM = 1, 2, 3, ....
22+
DATA font() BYTEFILE ROM "myfont.fnt"
23+
24+
Note that DATA in ROM can't be modified at runtime, so you must select the type
25+
appropriately.
26+
27+
28+
Operating System support
29+
------------------------
30+
31+
The Atari 5200 console lacks the OS ROM of the Atari 8-bit computers, so all
32+
the functionality that depends on the OS must be reimplemented.
33+
34+
Currently, the target lacks:
35+
36+
- Floating point support: only integer operations are supported.
37+
- Graphics modes: the included runtime only implements graphic modes 0, 1, 2, 7
38+
to 13 and 15.
39+
- Text window: the graphic modes with a text window are not implemented.
40+
- Filled lines: only PLOT and DRAWTO are implemented, there is no `FILLTO`
41+
command.
42+
- Input/Output: Only the screen output an keypad input are supported, there is
43+
no I/O channels, `OPEN` or `XIO`.
44+
45+
46+
Hardware Registers
47+
------------------
48+
49+
The Atari 5200 changes the location of hardware registers for POKEY (from $D200
50+
to $D800) and GTIA (from $D000 to $C000), so direct `POKE`s to memory must be
51+
changed.
52+
53+
Also, `DLI` support also needs to change the address of color and P/M registers,
54+
you can use this table for useful registers:
55+
56+
|Address| Register |
57+
| ----- | ------------------------- |
58+
| $C000 | Player 0 horizontal pos. |
59+
| $C001 | Player 1 horizontal pos. |
60+
| $C002 | Player 2 horizontal pos. |
61+
| $C003 | Player 3 horizontal pos. |
62+
| $C004 | Missile 0 horizontal pos. |
63+
| $C005 | Missile 0 horizontal pos. |
64+
| $C006 | Missile 0 horizontal pos. |
65+
| $C007 | Missile 0 horizontal pos. |
66+
| $C012 | Color of Player 0 |
67+
| $C013 | Color of Player 0 |
68+
| $C014 | Color of Player 0 |
69+
| $C015 | Color of Player 0 |
70+
| $C016 | Color register 0 |
71+
| $C017 | Color register 1 |
72+
| $C018 | Color register 2 |
73+
| $C019 | Color register 3 |
74+
| $C01A | Color of Background |
75+
76+
Also remember that the Atari 5200 does not have a PIA, console keys and
77+
keyboard, all controllers are analog and have a keypad.
78+
79+
FastBasic emulates the standard 8-bit joystick, so the `STICK()` and `STRIG()`
80+
functions return the same values.
81+
82+
83+

rules.mak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ $(LIB_A5200): $(A5200_OBJS) | build/compiler $(AR65_HOST)
246246
$(Q)$(AR65_HOST) a $@ $^
247247

248248
# Copy manual to compiler changing the version string.
249-
build/compiler/MANUAL.md: manual.md version.mk | build/compiler
250-
$(Q)LC_ALL=C sed 's/%VERSION%/$(VERSION)/' < $< > $@
249+
build/compiler/MANUAL.md: manual.md a5200.md | version.mk build/compiler
250+
$(Q)LC_ALL=C sed 's/%VERSION%/$(VERSION)/' $(filter %.md,$^) > $@
251251

252252
# Copy other files to compiler folder
253253
build/compiler/%: compiler/% | build/compiler

0 commit comments

Comments
 (0)