-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
116 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
* = $7ffe | ||
; 2-byte load address for ROM image | ||
!word $8000 | ||
; http://swut.net/c64cart-howto.html | ||
; https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image | ||
!word CartKReset ; cold start vector | ||
!word CartWStart ; warm start vector | ||
!byte $c3, $c2, $cd, $38, $30 ; "CBM80" | ||
CartKReset | ||
STX $D016 ; Turn on VIC for PAL / NTSC check | ||
JSR $FDA3 ; IOINIT - Init CIA chips | ||
JSR $FD50 ; RANTAM - Clear/test system RAM | ||
JSR $FD15 ; RESTOR - Init KERNAL RAM vectors | ||
JSR $FF5B ; CINT - Init VIC and screen editor | ||
CLI ; Re-enable IRQ interrupts | ||
CartBReset | ||
; init BASIC? | ||
!ifdef CART_INIT_BASIC { | ||
JSR $E453 ; Init BASIC RAM vectors | ||
JSR $E3BF ; Main BASIC RAM Init routine | ||
JSR $E422 ; Power-up message / NEW command | ||
LDX #$FB | ||
TXS ; Reduce stack pointer for BASIC | ||
; don't init BASIC, just NOP | ||
} else { | ||
!fill 12, $ea ; nop | ||
} | ||
CartWStart | ||
; should be * = $x025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
!src "cartheader.acme" | ||
|
||
!address { | ||
Temp = $02 | ||
} | ||
|
||
Start: | ||
sei ; turn off interrupts | ||
ldy #0 | ||
Loop: | ||
lda Message,y ; load message byte | ||
beq EOM ; 0 = end of string | ||
clc | ||
adc #$40 | ||
sta $400+41,y ; store to screen | ||
iny | ||
bne Loop ; next character | ||
EOM: | ||
|
||
Wait1: | ||
lda $d011 | ||
bmi Wait1 ; wait for line < 256 | ||
Wait2: | ||
lda $d012 ; get current scanline | ||
Wait3: | ||
cmp $d012 | ||
beq Wait3 ; wait for scanline to change | ||
lsr ; divide by 2 | ||
lsr ; divide by 2 | ||
clc | ||
adc Temp ; add to frame counter | ||
sta $d020 ; set border color | ||
lda $d011 ; get status bits | ||
bpl Wait2 ; repeat until line >= 256 | ||
sty $d020 ; reset border color | ||
dec Temp ; change frame counter | ||
jmp Wait1 ; endless loop | ||
|
||
Message: | ||
!scr "HELLO WORLD", 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters