commit f58f40aa3fde54cc6c3a54817367f4e210b222f5 Author: giomba Date: Sun Dec 4 01:00:17 2022 +0100 First commit. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e50caec --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build/ +bin/ + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..47c3f43 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.POSIX: + +.PHONY: env + +ASM=$(wildcard src/*asm) + +vic20term.prg: env $(ASM) + dasm src/main.asm -Isrc/ -f3 -T1 -sbuild/vic20term.prg.symbols.txt -obin/vic20term.bin + +env: + mkdir -p {bin,build} + diff --git a/res/stillenacht.prg b/res/stillenacht.prg new file mode 100644 index 0000000..bb391dd Binary files /dev/null and b/res/stillenacht.prg differ diff --git a/src/main.asm b/src/main.asm new file mode 100644 index 0000000..775c147 --- /dev/null +++ b/src/main.asm @@ -0,0 +1,64 @@ + processor 6502 + + org $a000 + + WORD .coldstart + WORD .warmstart + BYTE #$41, #$30, #$c3, #$c2, #$cd + +.coldstart: + cld + sei + ;jmp .coldstart + jsr $fd8d + jsr $fd52 + jsr $fdf9 + jsr $e518 + lda $0288 + sta $0294 + jsr $e45b + jsr $e3a4 + jsr $e404 + cli + +.warmstart: + lda #$02 + ldx #$00 +clear_color_ram: + sta $9400,x + sta $9500,x + sta $9600,x + sta $9700,x + dex + bne clear_color_ram + + ldx #$00 +print: + lda message,x + beq .end + sec + sbc #$40 + sta 7724,x + sta 7746,x + sta 7768,x + sta 7790,x + inx + jmp print + +.end: + + +restart: + ldx #$00 +loop: + stx 7680 + dex + bne loop + jmp restart + + +message: + BYTE "CIAO DEVELER BY GIOMBA",#$0 + +. = $bfff + BYTE #$ff