From 411f75b5aa4babdcc6e37101c2767482b918d017 Mon Sep 17 00:00:00 2001 From: stid Date: Sun, 12 Jan 2020 12:57:01 -0800 Subject: [PATCH] Fix bugs --- core/init.asm | 2 -- core/keyboard.asm | 2 +- core/mem_map.asm | 2 ++ core/screen.asm | 1 - libs/memory.asm | 14 ++++++++++++-- libs/module.asm | 1 - main.asm | 5 ++++- progs/woz_shell.asm | 3 +-- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/core/init.asm b/core/init.asm index 5d5bb4b..6e6a410 100644 --- a/core/init.asm +++ b/core/init.asm @@ -9,8 +9,6 @@ .filenamespace Init - - * = * "Init Core" // ------------------------------------ diff --git a/core/keyboard.asm b/core/keyboard.asm index 129a065..a00e96d 100644 --- a/core/keyboard.asm +++ b/core/keyboard.asm @@ -1,5 +1,6 @@ #importonce #import "../libs/module.asm" +#import "../libs/memory.asm" // ------------------------------------ // MACROS @@ -7,7 +8,6 @@ .filenamespace Keyboard -#import "../libs/memory.asm" * = * "Keyboard Module" diff --git a/core/mem_map.asm b/core/mem_map.asm index 972b3ab..23679ba 100644 --- a/core/mem_map.asm +++ b/core/mem_map.asm @@ -38,6 +38,8 @@ from: .word 0 dest: .word 0 size: .word 0 + tmpX: .byte 0 + tmpY: .byte 0 } .namespace MODULE { diff --git a/core/screen.asm b/core/screen.asm index a1d5777..0ebdf00 100644 --- a/core/screen.asm +++ b/core/screen.asm @@ -97,7 +97,6 @@ toDebug: { scrollUp: { pha MemoryClone(VIDEO_ADDR+40, VIDEO_ADDR+(COLUMN_NUM*(ROWS_NUM)), VIDEO_ADDR) - // clear last line lda #32 ldx #40 diff --git a/libs/memory.asm b/libs/memory.asm index 7f416c9..fb1d33f 100644 --- a/libs/memory.asm +++ b/libs/memory.asm @@ -79,6 +79,8 @@ toDebug: { // MemMap.MEMORY.dest - Should contain the destination pointer // MemMap.MEMORY.size - Should contain the size to copy clone: { + stx MemMap.MEMORY.tmpX + sty MemMap.MEMORY.tmpY sei ldy #0 ldx MemMap.MEMORY.size @@ -99,7 +101,10 @@ clone: { dex bne md3 cli - md4: rts + md4: + ldx MemMap.MEMORY.tmpX + ldy MemMap.MEMORY.tmpY + rts } // Fill Memopry Range with byte loaded in A @@ -108,6 +113,8 @@ clone: { // MemMap.MEMORY.size - Should contain the size to copy // A - The byte to fill memory with fill: { + stx MemMap.MEMORY.tmpX + sty MemMap.MEMORY.tmpY sei ldy #0 ldx MemMap.MEMORY.size @@ -127,7 +134,10 @@ fill: { dex bne md3 cli - md4: rts + md4: + ldx MemMap.MEMORY.tmpX + ldy MemMap.MEMORY.tmpY + rts } // Clear Memory with 0 diff --git a/libs/module.asm b/libs/module.asm index 2f0b91a..7df9dbb 100644 --- a/libs/module.asm +++ b/libs/module.asm @@ -35,7 +35,6 @@ toDebug: { //------------------------------------------------------------------------------------ printVersion: { - .break sta MemMap.MODULE.versionPtr stx MemMap.MODULE.versionPtr+1 ldy #0 diff --git a/main.asm b/main.asm index 8872d74..4515b1e 100644 --- a/main.asm +++ b/main.asm @@ -1,8 +1,11 @@ -BasicUpstart2(start) +.cpu _6502 + +// BasicUpstart2(start) #import "./core/mem_map.asm" * = $8000 "Main" + //------------------------------------------------------------------------------------ .const MAIN_COLOR = $03 .const BORDER_COLOR = $05 diff --git a/progs/woz_shell.asm b/progs/woz_shell.asm index 2f93127..62d1dce 100644 --- a/progs/woz_shell.asm +++ b/progs/woz_shell.asm @@ -80,7 +80,6 @@ done: // STID Commands cmdHelp: - .break PrintLine(helpString) jmp done @@ -265,7 +264,7 @@ helpString: .byte $8e .text "r : hard reset" .byte $8e - .text "z : zero page params" + .text "v : modue versions" .byte $8e .text "----------------------" .byte $8e, 0