Scrambled image due to inverted bit order in every of the 52 line byte chunks
This commit is contained in:
parent
a86dbed7f7
commit
62e98d7fe4
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,7 @@
|
||||
.org 0x1000
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
.db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
.db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0
|
||||
CAT_IMAGE: .db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
.db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
.db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0
|
||||
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
|
@ -4,7 +4,6 @@
|
||||
; This also displays byte's MSB pixel "for free", as the video pin is PD7 (last bit of PORTD).
|
||||
|
||||
.include "atmega1284definition.asm"
|
||||
.include "cat2.asm"
|
||||
|
||||
; define constant
|
||||
.equ SYNC_PIN = PC0 ; Sync pin (pin 22)
|
||||
@ -34,11 +33,12 @@ main:
|
||||
|
||||
;*** Load data into ram ***
|
||||
; Set X to 0x0100
|
||||
ldi r27, 0x01
|
||||
clr r26
|
||||
ldi r27, high(FRAMEBUFFER<<1)
|
||||
ldi r26, low(FRAMEBUFFER<<1)
|
||||
; Set Z to 0x1000 (cat image)
|
||||
ldi r31, 0x10
|
||||
clr r30
|
||||
ldi r31, high(CAT_IMAGE<<1)
|
||||
ldi r30, low(CAT_IMAGE<<1)
|
||||
|
||||
|
||||
load_mem_loop:
|
||||
lpm r17, Z+
|
||||
@ -82,7 +82,7 @@ v_refresh_loop:
|
||||
; debug
|
||||
|
||||
; ***************** DRAW FIRST LINE *********************
|
||||
|
||||
|
||||
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
||||
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
||||
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
||||
@ -107,7 +107,7 @@ v_refresh_loop:
|
||||
|
||||
|
||||
; ***************** DRAW SECOND LINE *********************
|
||||
|
||||
|
||||
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
||||
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
||||
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
||||
@ -1506,4 +1506,7 @@ draw_line:
|
||||
lsl r19 ; 1 cycle
|
||||
out PORTD, r19 ; 1 cycle
|
||||
|
||||
ret
|
||||
ret
|
||||
|
||||
|
||||
.include "cat.asm"
|
Loading…
Reference in New Issue
Block a user