diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1=pwuc1_derefidx_vbuxx.asm b/src/main/fragment/mos6502-common/_deref_pwuz1=pwuc1_derefidx_vbuxx.asm new file mode 100644 index 000000000..b43c58513 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1=pwuc1_derefidx_vbuxx.asm @@ -0,0 +1,6 @@ +ldy #0 +lda {c1},x +sta ({z1}),y +iny +lda {c1}+1,x +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuc1_derefidx_vbuxx.asm b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuc1_derefidx_vbuxx.asm new file mode 100644 index 000000000..453ebbacf --- /dev/null +++ b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuc1_derefidx_vbuxx.asm @@ -0,0 +1,5 @@ +lda {c1},x +sta ({z1}),y +iny +lda {c1}+1,x +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuc1.asm b/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuc1.asm new file mode 100644 index 000000000..870c06e6a --- /dev/null +++ b/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuc1.asm @@ -0,0 +1,2 @@ +ldy #{c1}+1 +lda ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuyy.asm b/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuyy.asm new file mode 100644 index 000000000..c6e58848c --- /dev/null +++ b/src/main/fragment/mos6502-common/vbuaa=_hi_pwuz1_derefidx_vbuyy.asm @@ -0,0 +1,2 @@ +iny +lda ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vbuaa=_lo_pwuz1_derefidx_vbuyy.asm b/src/main/fragment/mos6502-common/vbuaa=_lo_pwuz1_derefidx_vbuyy.asm new file mode 100644 index 000000000..93fe0de55 --- /dev/null +++ b/src/main/fragment/mos6502-common/vbuaa=_lo_pwuz1_derefidx_vbuyy.asm @@ -0,0 +1 @@ +lda ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vbuaa=pbuz1_derefidx_vbuyy_minus_1.asm b/src/main/fragment/mos6502-common/vbuaa=pbuz1_derefidx_vbuyy_minus_1.asm new file mode 100644 index 000000000..034f3d5ef --- /dev/null +++ b/src/main/fragment/mos6502-common/vbuaa=pbuz1_derefidx_vbuyy_minus_1.asm @@ -0,0 +1,3 @@ +sec +lda ({z1}),y +sbc #1 diff --git a/src/main/java/dk/camelot64/kickc/KickC.java b/src/main/java/dk/camelot64/kickc/KickC.java index 859a6afbd..c5269882d 100644 --- a/src/main/java/dk/camelot64/kickc/KickC.java +++ b/src/main/java/dk/camelot64/kickc/KickC.java @@ -480,7 +480,7 @@ public class KickC implements Callable { String emuOptions = ""; if(emulator.equals("C64Debugger")) { Path viceSymbolsPath = outputDir.resolve(outputFileNameBase + ".vs"); - emuOptions = "-symbols " + viceSymbolsPath + " -wait 2500" + " "; + emuOptions = "-symbols " + viceSymbolsPath + " -autojmp -prg "; } // The program names used by VICE emulators List viceEmus = Arrays.asList("x64", "x64sc", "x128", "x64dtv", "xcbm2", "xcbm5x0", "xpet", "xplus4", "xscpu64", "xvic"); diff --git a/src/main/kc/lib/conio-mega65.c b/src/main/kc/lib/conio-mega65.c index 4640a2497..32191cfe8 100644 --- a/src/main/kc/lib/conio-mega65.c +++ b/src/main/kc/lib/conio-mega65.c @@ -1,6 +1,7 @@ // MEGA65 conio.h implementation #include #include +#include <6502.h> // The screen width #ifdef __MEGA65_C64__ @@ -27,18 +28,9 @@ const char CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE; // Enable 2K Color ROM void conio_mega65_init() { // Disable BASIC/KERNAL interrupts - asm { - sei - } + SEI(); // Map memory to BANK 0 : 0x00XXXX - giving access to I/O - asm { - lda #0 - tax - tay - taz - map - eom - } + memoryRemap(0,0,0); // Enable the VIC 4 *IO_KEY = 0x47; *IO_KEY = 0x53; diff --git a/src/main/kc/lib/multiplexer.c b/src/main/kc/lib/multiplexer.c index 66b41cabf..33e9136c9 100644 --- a/src/main/kc/lib/multiplexer.c +++ b/src/main/kc/lib/multiplexer.c @@ -136,6 +136,6 @@ inline char plexFreeNextYpos() { // Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines. inline void plexFreeAdd(char ypos) { - PLEX_FREE_YPOS[plex_free_next] = ypos+21; + PLEX_FREE_YPOS[plex_free_next] = ypos+22; plex_free_next = (plex_free_next+1)&7; } \ No newline at end of file