This leads me to believe there is something wrong with both mine and bigevilcorp's source code. But I can't figure out what that could be. Any ideas?

Moderator: AamirM
Code: Select all
VDPRegisters:
dc.b 0x20 ; 0: Horiz. interrupt on, plus bit 2 (unknown, but docs say it needs to be on)
dc.b 0x74 ; 1: Vert. interrupt on, display on, DMA on, V28 mode (40 cells vertically), + bit 2
dc.b 0x30 ; 2: Pattern table for Scroll Plane A at 0xC000 (bits 3-5)
dc.b 0x40 ; 3: Pattern table for Window Plane at 0x10000 (bits 1-5)
dc.b 0x05 ; 4: Pattern table for Scroll Plane B at 0xA000 (bits 0-2)
... and so on
Code: Select all
; ************************************
; Init VDP
; ************************************
move.l #VDPRegisters, a0 ; Load address of register table into a0
move.l #0x18, d0 ; 24 registers to write
move.l #0x00008000, d1 ; 'Set register 0' command (and clear the rest of d1 ready)
@CopyVDP:
move.b (a0)+, d1 ; Move register value to lower byte of d1
move.w d1, 0x00C00004 ; Write command and value to VDP control port
add.w #0x0100, d1 ; Increment register #
dbra d0, @CopyVDP