Skip to content

Instantly share code, notes, and snippets.

@JimmyDansbo
JimmyDansbo / helloworld_vera_rom_acme.asm
Created Dec 26, 2020
Hello World as a Commander X16 ROM image
View helloworld_vera_rom_acme.asm
!cpu 65c02
VERA_ADDR_L = $9F20
VERA_ADDR_M = $9F21
VERA_ADDR_H = $9F22
VERA_DATA0 = $9F23
VERA_CTRL = $9F25
VERA_DC_VIDEO = $9F29
VERA_DC_HSCALE = $9F2A
VERA_DC_VSCALE = $9F2B
VERA_DC_HSTOP = $9F2A
@JimmyDansbo
JimmyDansbo / verahello.asm
Created Dec 19, 2020
Example of writing text to screen using VERA on Commander X16
View verahello.asm
!cpu 65c02
; BASIC program ("10 SYS $0810")
*=$0801
!word $080C ; Pointer to next BASIC line
!word $000A ; Line number $000A = 10
!byte $9E ; SYS BASIC token
!pet " $810",0 ; Address where ASM starts
!word $0000 ; EOF BASIC program
*=$0810
@JimmyDansbo
JimmyDansbo / rnd.asm
Last active Dec 19, 2020
Random number between 0 and 9
View rnd.asm
*=$0801
!word $080C ; Pointer to next BASIC line
!word $000A ; Line number $000A = 10
!byte $9E ; SYS BASIC token
!pet " $810",0 ; Address where ASM starts
!word $0000 ; EOF BASIC program
*=$0810
CHROUT = $FFD2
SEED = $9F64 ; VIA timer low-byte
@JimmyDansbo
JimmyDansbo / jd-4bpp-bmp-directly-to-vram.asm
Last active Feb 14, 2021
Example of loading af 4bpp bitmap directly to VRAM by using the KERNAL API calls - R36
View jd-4bpp-bmp-directly-to-vram.asm
*=$0801
!byte $0C,$08,$0A,$00,$9E,' ','2','0','6','4',$00,$00,$00
*=$0810
VERA_BASE = $9F20
VERA_ADDR_LOW = VERA_BASE+0
VERA_ADDR_HIGH = VERA_BASE+1
VERA_ADDR_BANK = VERA_BASE+2
VERA_DATA0 = VERA_BASE+3
VERA_DATA1 = VERA_BASE+4
@JimmyDansbo
JimmyDansbo / jd-4bit-demo.asm
Created Jan 21, 2020
Short example of loading 4bpp picture into VERA
View jd-4bit-demo.asm
*=$0801
!byte $0C,$08,$0A,$00,$9E,' ','2','0','6','4',$00,$00,$00
*=$0810
VERA_BASE = $9F20
VERA_ADDR_LOW = VERA_BASE+0
VERA_ADDR_HIGH = VERA_BASE+1
VERA_ADDR_BANK = VERA_BASE+2
VERA_DATA0 = VERA_BASE+3
VERA_DATA1 = VERA_BASE+4