From aee284c1d69cf833445e87ef60e76655d5a6fcbc Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Fri, 28 Jan 2022 08:49:21 +0100 Subject: [PATCH] Add irq autocrawler sample --- include/c64/rasterirq.c | 18 ++++++++++++------ oscar64/InterCode.cpp | 2 +- samples/memmap/easyflash.crt | Bin 114976 -> 114976 bytes samples/rasterirq/autocrawler.c | 8 ++++++-- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/c64/rasterirq.c b/include/c64/rasterirq.c index 2b76241..423741f 100644 --- a/include/c64/rasterirq.c +++ b/include/c64/rasterirq.c @@ -60,10 +60,13 @@ w1: jmp ex e2: - sta $d012 + ldx npos + stx tpos - lda npos - sta tpos + bit $d011 + bmi e1 + + sta $d012 asl $d019 jmp ex @@ -130,10 +133,13 @@ w1: jmp ex e2: - sta $d012 + ldx npos + stx tpos - lda npos - sta tpos + bit $d011 + bmi e1 + + sta $d012 jmp ex diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index 21b7842..cc7c313 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -9117,7 +9117,7 @@ void InterCodeProcedure::Disassemble(FILE* file) void InterCodeProcedure::Disassemble(const char* name, bool dumpSets) { -#if 1 +#if 0 #ifdef _WIN32 FILE* file; static bool initial = true; diff --git a/samples/memmap/easyflash.crt b/samples/memmap/easyflash.crt index 0cfff62a09cd6a6d3486806d7093953cefa1f77e..3001707616b9bd81404ae8be7f9ce5b68460ee76 100644 GIT binary patch delta 217 zcmZ3`#J-@3eS!op0~GiNJ39tVyeK`J8qZhvd8v_Hw0|tf7jI93Bn*~@mF>g+= z=VWAL*qr46mSkLjB*_BSwz;bTEX9OHYSjU-6f>sO)>DjNDHcqr?XMgla;#Y7xEdjH HY$$R72@){D delta 221 zcmZ3`#J-@3eS(A_BLf7uCKgw^gv0vi(p!vY3{&5W%6(whZX zH!*Kcu;*lCWZInN0G4D#mSh2I+uYRvmSVypwdw#^iWyUC>nTRC6bq)*_E!!NIaVxk LT#XPpHWWDkjchWe diff --git a/samples/rasterirq/autocrawler.c b/samples/rasterirq/autocrawler.c index e4ad754..56a3403 100644 --- a/samples/rasterirq/autocrawler.c +++ b/samples/rasterirq/autocrawler.c @@ -14,17 +14,21 @@ const char Text[] = RIRQCode scroll, restore; -static int x; +int x; // Loop through text __interrupt void doscroll(void) { + vic.color_border++; + // Update raster IRQ for scroll line with new horizontal scroll offset rirq_data(&scroll, 0, 7 - (x & 7)); // Copy scrolled version of text when switching over char border if ((x & 7) == 0) memcpy((char *)0x0400 + 40 * 24, Text + ((x >> 3) & 255), 40); x++; + + vic.color_border--; } int main(void) @@ -46,7 +50,7 @@ int main(void) // call scroll copy code rirq_call(&restore, 1, doscroll); // place this at the top of the screen before the display starts - rirq_set(1, 4, &restore); + rirq_set(1, 250, &restore); // sort the raster IRQs rirq_sort();