1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-27 19:30:04 +00:00
millfork/include/a8_antic.mfk

63 lines
4.7 KiB
Plaintext
Raw Normal View History

2019-10-21 20:27:50 +00:00
// Atari 8-bit ANTIC hardware
#if not(ATARI_8)
#warn a8_antic module should be used only on Atari computer-compatible targets
#endif
// ANTIC Display List Instruction Set
// THE DISPLAY LIST CANNOT CROSS A 1K BYTE MEMORY BOUNDARY UNLESS A JUMP INSTRUCTION IS USED!
const byte LMS = $40 // Load memory scan 10-bit counter, $fff boundary.
const byte DLI = $80 // Display list interrupt - Interrupt CPU at beginning of last scan line.
const byte HSCROL = $10 // Enable vertical scrolling.
const byte VSCROL = $20 // Enable horizontal scrolling.
const byte JMP = 1 // Jump command - followed by two bytes indicating the new instruction pointer for the display list.
const byte JVB = $41 // Jump and wait for Vertical Blank - suspends the display list until vertical blank and then jumps.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ colors + resolution + display mode + scan lines per row + screen memory + bytes per line + bits per pixel +
const byte MODE_2 = 2 //+ 2 + 40x24 + text + 8 + 960 B + 40 + 8 +
const byte MODE_3 = 3 //+ 2 + 40x24 + text + 10 + 760 B + 40 + 8 +
const byte MODE_4 = 4 //+ 5 + 40x24 + text + 8 + 960 B + 40 + 8 +
const byte MODE_5 = 5 //+ 5 + 40x12 + text + 16 + 480 B + 40 + 8 +
const byte MODE_6 = 6 //+ 5 + 20x24 + text + 8 + 480 B + 20 + 8 +
const byte MODE_7 = 7 //+ 5 + 20x12 + text + 16 + 240 B + 20 + 8 +
const byte MODE_8 = 8 //+ 4 + 40x24 + graphics + 8 + 240 B + 10 + 2 +
const byte MODE_9 = 9 //+ 2 + 80x48 + graphics + 4 + 480 B + 10 + 1 +
const byte MODE_A = $a //+ 4 + 80x48 + graphics + 4 + 960 B + 20 + 2 +
const byte MODE_B = $b //+ 2 + 160x96 + graphics + 2 + 1920 B + 20 + 1 +
const byte MODE_C = $c //+ 2 + 160x192 + graphics + 1 + 3840 B + 20 + 1 +
const byte MODE_D = $d //+ 4 + 160x96 + graphics + 2 + 3840 B + 40 + 2 +
const byte MODE_E = $e //+ 4 + 160x192 + graphics + 1 + 7680 B + 40 + 2 +
const byte MODE_F = $f //+ 2 + 320x192 + graphics + 1 + 7680 B + 40 + 1 +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
const byte BLANK_1 = 0
const byte BLANK_2 = $10
const byte BLANK_3 = $20
const byte BLANK_4 = $30
const byte BLANK_5 = $40
const byte BLANK_6 = $50
const byte BLANK_7 = $60
const byte BLANK_8 = $70
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2019-10-21 20:27:50 +00:00
volatile byte antic_dmactl @$D400 // direct memory access control
volatile byte antic_chactl @$D401 // character mode control
2020-09-08 23:50:44 +00:00
volatile word antic_dlist @$D402 // display list pointer
2019-10-21 20:27:50 +00:00
volatile byte antic_dlistl @$D402 // display list pointer low-byte
volatile byte antic_dlisth @$D403 // display list pointer high-byte
volatile byte antic_hscrol @$D404 // horizontal scroll enable
volatile byte antic_vscrol @$D405 // vertical scroll enable
volatile byte antic_unuse0 @$D406 // unused
volatile byte antic_pmbase @$D407 // msb of p/m base address
volatile byte antic_unuse1 @$D408 // unused
volatile byte antic_chbase @$D409 // character base address
volatile byte antic_wsync @$D40A // wait for horizontal synchronization
volatile byte antic_vcount @$D40B // vertical line counter
volatile byte antic_penh @$D40C // light pen horizontal position
volatile byte antic_penv @$D40D // light pen vertical position
volatile byte antic_nmien @$D40E // non-maskable interrupt enable
2020-09-08 22:57:12 +00:00
volatile byte antic_nmist @$D40F // (R) NMI status; holds cause for the NMI interrupt, corresponding to the same bits in NMIEN
volatile byte antic_nmires @$D40F // (W) Reset for NMIST; clears the interrupt request register