diff --git a/src/test/kc/examples/atarixl/helloxl.c b/src/test/kc/examples/atarixl/helloxl.c index ef2c154b8..c6aba0305 100644 --- a/src/test/kc/examples/atarixl/helloxl.c +++ b/src/test/kc/examples/atarixl/helloxl.c @@ -21,14 +21,12 @@ char TEXT[] = "HELLO atari 8BIT" "Demonstrates ANTIC display list" ; - - // ANTIC Display List Program // https://en.wikipedia.org/wiki/ANTIC char DISPLAY_LIST[] = { - BLANK8, BLANK8, BLANK8, // 3* BLK 8 (0x70) 8 blank lines - LMS|MODE7, TEXT, // LMS TEXT 7 (0x47) Load memory address and set to charmode 7 (16/20/24 chars wide, 16 lines per char) - BLANK8, // BLK 8 (0x70) 8 blank lines - MODE2, // TEXT 2 (0x02) Charmode 2 (32/40/48 chars wide, 8 lines per char) - JVB, DISPLAY_LIST // JVB DISPLAY_LIST (0x41) jump and wait for VBLANK + BLANK8, BLANK8, BLANK8, // 3* 8 blank lines + LMS|MODE7, TEXT, // Load memory address and set to charmode 7 (16/20/24 chars wide, 16 lines per char) + BLANK4, // 4 blank lines + MODE2, // Charmode 2 (32/40/48 chars wide, 8 lines per char) + JVB, DISPLAY_LIST // Wait for VBLANK snd jump }; diff --git a/src/test/ref/examples/atarixl/helloxl.asm b/src/test/ref/examples/atarixl/helloxl.asm index f14d30de9..cead78b00 100644 --- a/src/test/ref/examples/atarixl/helloxl.asm +++ b/src/test/ref/examples/atarixl/helloxl.asm @@ -33,6 +33,8 @@ ProgramEnd: .const LMS = $40 // Jump and wait for Vertical Blank - suspends the display list until vertical blank and then jumps. This is usually used to terminate the display list and restart it for the next frame. .const JVB = $41 + // Blank 4 lines + .const BLANK4 = $30 // Blank 8 lines .const BLANK8 = $70 // OS Shadow ANTIC Direct Memory Access Control ($D400) @@ -62,4 +64,4 @@ main: { .byte 0 // ANTIC Display List Program // https://en.wikipedia.org/wiki/ANTIC - DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK8, MODE2, JVB, DISPLAY_LIST + DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK4, MODE2, JVB, DISPLAY_LIST diff --git a/src/test/ref/examples/atarixl/helloxl.log b/src/test/ref/examples/atarixl/helloxl.log index 775dfdef6..83e65abcb 100644 --- a/src/test/ref/examples/atarixl/helloxl.log +++ b/src/test/ref/examples/atarixl/helloxl.log @@ -138,8 +138,9 @@ SYMBOL TABLE SSA (byte) ATARI_POKEY_WRITE::SKREST (byte) ATARI_POKEY_WRITE::STIMER (byte) ATARI_POKEY_WRITE::UNUSED +(const nomodify byte) BLANK4 = (byte) $30 (const nomodify byte) BLANK8 = (byte) $70 -(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK8, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } +(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK4, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } (const nomodify byte) JVB = (byte) $41 (const nomodify byte) LMS = (byte) $40 (const nomodify byte) MODE2 = (byte) 2 @@ -344,6 +345,8 @@ ProgramEnd: .const LMS = $40 // Jump and wait for Vertical Blank - suspends the display list until vertical blank and then jumps. This is usually used to terminate the display list and restart it for the next frame. .const JVB = $41 + // Blank 4 lines + .const BLANK4 = $30 // Blank 8 lines .const BLANK8 = $70 // OS Shadow ANTIC Direct Memory Access Control ($D400) @@ -380,7 +383,7 @@ main: { .byte 0 // ANTIC Display List Program // https://en.wikipedia.org/wiki/ANTIC - DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK8, MODE2, JVB, DISPLAY_LIST + DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK4, MODE2, JVB, DISPLAY_LIST REGISTER UPLIFT POTENTIAL REGISTERS Statement [0] *((const nomodify byte*) SDMCTL) ← (byte) $21 [ ] ( [ ] { } ) always clobbers reg byte a @@ -442,6 +445,8 @@ ProgramEnd: .const LMS = $40 // Jump and wait for Vertical Blank - suspends the display list until vertical blank and then jumps. This is usually used to terminate the display list and restart it for the next frame. .const JVB = $41 + // Blank 4 lines + .const BLANK4 = $30 // Blank 8 lines .const BLANK8 = $70 // OS Shadow ANTIC Direct Memory Access Control ($D400) @@ -478,7 +483,7 @@ main: { .byte 0 // ANTIC Display List Program // https://en.wikipedia.org/wiki/ANTIC - DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK8, MODE2, JVB, DISPLAY_LIST + DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK4, MODE2, JVB, DISPLAY_LIST ASSEMBLER OPTIMIZATIONS Removing instruction jmp __b1 @@ -592,8 +597,9 @@ FINAL SYMBOL TABLE (byte) ATARI_POKEY_WRITE::SKREST (byte) ATARI_POKEY_WRITE::STIMER (byte) ATARI_POKEY_WRITE::UNUSED +(const nomodify byte) BLANK4 = (byte) $30 (const nomodify byte) BLANK8 = (byte) $70 -(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK8, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } +(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK4, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } (const nomodify byte) JVB = (byte) $41 (const nomodify byte) LMS = (byte) $40 (const nomodify byte) MODE2 = (byte) 2 @@ -647,6 +653,8 @@ ProgramEnd: .const LMS = $40 // Jump and wait for Vertical Blank - suspends the display list until vertical blank and then jumps. This is usually used to terminate the display list and restart it for the next frame. .const JVB = $41 + // Blank 4 lines + .const BLANK4 = $30 // Blank 8 lines .const BLANK8 = $70 // OS Shadow ANTIC Direct Memory Access Control ($D400) @@ -682,5 +690,5 @@ main: { .byte 0 // ANTIC Display List Program // https://en.wikipedia.org/wiki/ANTIC - DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK8, MODE2, JVB, DISPLAY_LIST + DISPLAY_LIST: .byte BLANK8, BLANK8, BLANK8, LMS|MODE7, TEXT, BLANK4, MODE2, JVB, DISPLAY_LIST diff --git a/src/test/ref/examples/atarixl/helloxl.sym b/src/test/ref/examples/atarixl/helloxl.sym index 31a09543f..0e818ce98 100644 --- a/src/test/ref/examples/atarixl/helloxl.sym +++ b/src/test/ref/examples/atarixl/helloxl.sym @@ -99,8 +99,9 @@ (byte) ATARI_POKEY_WRITE::SKREST (byte) ATARI_POKEY_WRITE::STIMER (byte) ATARI_POKEY_WRITE::UNUSED +(const nomodify byte) BLANK4 = (byte) $30 (const nomodify byte) BLANK8 = (byte) $70 -(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK8, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } +(const byte*) DISPLAY_LIST[] = { (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) BLANK8, (const nomodify byte) LMS|(const nomodify byte) MODE7, <(const byte*) TEXT, >(const byte*) TEXT, (const nomodify byte) BLANK4, (const nomodify byte) MODE2, (const nomodify byte) JVB, <(const byte*) DISPLAY_LIST, >(const byte*) DISPLAY_LIST } (const nomodify byte) JVB = (byte) $41 (const nomodify byte) LMS = (byte) $40 (const nomodify byte) MODE2 = (byte) 2