|
| 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 | + |
0 commit comments