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
|
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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
.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 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, 0xF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FF, 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,
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
; This also displays byte's MSB pixel "for free", as the video pin is PD7 (last bit of PORTD).
|
; This also displays byte's MSB pixel "for free", as the video pin is PD7 (last bit of PORTD).
|
||||||
|
|
||||||
.include "atmega1284definition.asm"
|
.include "atmega1284definition.asm"
|
||||||
.include "cat2.asm"
|
|
||||||
|
|
||||||
; define constant
|
; define constant
|
||||||
.equ SYNC_PIN = PC0 ; Sync pin (pin 22)
|
.equ SYNC_PIN = PC0 ; Sync pin (pin 22)
|
||||||
@ -34,11 +33,12 @@ main:
|
|||||||
|
|
||||||
;*** Load data into ram ***
|
;*** Load data into ram ***
|
||||||
; Set X to 0x0100
|
; Set X to 0x0100
|
||||||
ldi r27, 0x01
|
ldi r27, high(FRAMEBUFFER<<1)
|
||||||
clr r26
|
ldi r26, low(FRAMEBUFFER<<1)
|
||||||
; Set Z to 0x1000 (cat image)
|
; Set Z to 0x1000 (cat image)
|
||||||
ldi r31, 0x10
|
ldi r31, high(CAT_IMAGE<<1)
|
||||||
clr r30
|
ldi r30, low(CAT_IMAGE<<1)
|
||||||
|
|
||||||
|
|
||||||
load_mem_loop:
|
load_mem_loop:
|
||||||
lpm r17, Z+
|
lpm r17, Z+
|
||||||
@ -82,7 +82,7 @@ v_refresh_loop:
|
|||||||
; debug
|
; debug
|
||||||
|
|
||||||
; ***************** DRAW FIRST LINE *********************
|
; ***************** DRAW FIRST LINE *********************
|
||||||
|
|
||||||
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
||||||
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
||||||
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
||||||
@ -107,7 +107,7 @@ v_refresh_loop:
|
|||||||
|
|
||||||
|
|
||||||
; ***************** DRAW SECOND LINE *********************
|
; ***************** DRAW SECOND LINE *********************
|
||||||
|
|
||||||
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
; **** start line sync: 4uS, 96 cycles @ 24Mhz
|
||||||
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
cbi PORTD, VIDEO_PIN ; video pin goes low before sync ; 2 cycles
|
||||||
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
cbi PORTC, SYNC_PIN ; sync goes low (0v) ; 2 cycle
|
||||||
@ -1506,4 +1506,7 @@ draw_line:
|
|||||||
lsl r19 ; 1 cycle
|
lsl r19 ; 1 cycle
|
||||||
out PORTD, r19 ; 1 cycle
|
out PORTD, r19 ; 1 cycle
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
.include "cat.asm"
|
Loading…
Reference in New Issue
Block a user