put setup VIC-II routine at $E5A0 for Advanced Pinball Simulator. Issue #23

This commit is contained in:
Paul Gardner-Stephen committed 2019-05-05 16:31:24 +09:30
1 parent e88f12f2ed
commit 810dfb75af
3 files changed
+27 -22

No files matched your search

+1 -16
View File
@@ -1,22 +1,7 @@
;; Function defined on pp272-273 of C64 Programmers Reference Guide ;; Function defined on pp272-273 of C64 Programmers Reference Guide
;; Compute's Mapping the 64 p215 ;; Compute's Mapping the 64 p215
cint: cint:
;; Set up default IO values (Compute's Mapping the 64 p215) jsr setup_vicii
lda #$1b ; Enable text mode
sta $d011
lda #$c8 ; 40 column etc
sta $d016
;; Compute's Mapping the 64, p156
;; We use a different colour scheme of white text on all blue
lda #$06
sta $D020
sta $D021
;; Turn off sprites
;; (observed hanging around after running programs and resetting)
lda #$00
sta $D015
;; Initialise cursor blink flags (Compute's Mapping the 64 p215) ;; Initialise cursor blink flags (Compute's Mapping the 64 p215)
lda #$00 lda #$00
+19
View File
@@ -0,0 +1,19 @@
setup_vicii:
;; Set up default IO values (Compute's Mapping the 64 p215)
lda #$1b ; Enable text mode
sta $d011
lda #$c8 ; 40 column etc
sta $d016
;; Compute's Mapping the 64, p156
;; We use a different colour scheme of white text on all blue
lda #$06
sta $D020
sta $D021
;; Turn off sprites
;; (observed hanging around after running programs and resetting)
lda #$00
sta $D015
+7 -6
View File
@@ -74,7 +74,7 @@ int main (int argc, char *argv[]) {
int collect_cycles=5000000; int collect_cycles=5000000;
// KERNAL part is actually just under 7KB // KERNAL part is actually just under 7KB
int rom_bottom=0xe4b7; int rom_bottom=0xa000;
int rom_top=0xffff; int rom_top=0xffff;
char *filename=NULL; char *filename=NULL;
@@ -199,12 +199,13 @@ int main (int argc, char *argv[]) {
if (nf==3) { if (nf==3) {
// fprintf(stdout,"%x %x %d\n",pc,sp,cycles); // fprintf(stdout,"%x %x %d\n",pc,sp,cycles);
// Detect entry into ROM via code // Detect entry into ROM via code
if (pc>=rom_bottom&&pc<=rom_top) { if (pc<0xc000||pc>=0xe000)
if (last_pc<rom_bottom||last_pc>rom_top) { if (pc>=rom_bottom&&pc<=rom_top) {
// PC has just entered the ROM if (last_pc<rom_bottom||last_pc>rom_top) {
fprintf(stdout,"$%04x called from $%04x @ cycle %d\n",pc,last_pc,cycles); // PC has just entered the ROM
fprintf(stdout,"$%04x called from $%04x @ cycle %d\n",pc,last_pc,cycles);
}
} }
}
// Detect entry into ROM via interrupt // Detect entry into ROM via interrupt
if (pc>=rom_bottom&&pc<=rom_top) if (pc>=rom_bottom&&pc<=rom_top)
if (sp==(last_sp-3)) { if (sp==(last_sp-3)) {