Move platform-dependent register definitions to common file. Adjust
authorNeal Andrew Crook <neal@pippaluk.org.uk>
Wed, 1 Jun 2016 19:11:12 +0000 (20:11 +0100)
committerNeal Andrew Crook <neal@pippaluk.org.uk>
Fri, 1 Jul 2016 20:38:55 +0000 (21:38 +0100)
makefile to add asm .def files as a dependency for assembly. No
functional changes.

Kernel/platform-multicomp09/Makefile
Kernel/platform-multicomp09/multicomp09.s
Kernel/platform-multicomp09/platform.def [new file with mode: 0644]
Kernel/platform-multicomp09/sdc.s
Kernel/platform-multicomp09/tricks.s
Kernel/platform-multicomp09/usermem_gime.s

index 78d4995..d58a413 100644 (file)
@@ -32,7 +32,7 @@ $(CDOBJS): %$(BINEXT): %.c
 $(DOBJS): %$(BINEXT): ../dev/%.c
        $(CROSS_CC) $(CROSS_CCOPTS) -c $<
 
-$(AOBJS): %$(BINEXT): %.s
+$(AOBJS): %$(BINEXT): %.s dw.def kernel.def platform.def ../kernel09.def
        $(CROSS_AS) $(ASOPTS) $< -o $*.o
 
 
index 2088356..e7cb0f1 100644 (file)
 ;;; registers are selecting blocks 0-7.
 ;;; map1 mapping registers are uninitialised.
 
-
-;;; multicomp09 HW registers
-MMUADR equ     $ffde
-MMUDAT equ     $ffdf
-TIMER   equ     $ffdd
-
-;;; bit-fields
-MMUADR_ROMDIS  equ $80         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_TR      equ $40         ; 0 after reset, 0 when FUZIX boots. 0=map0, 1=map1
-MMUADR_MMUEN   equ $20         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_NMI     equ $10         ; 0 after reset, 0 when FUZIX boots. Do not write 1.
-MMUADR_MAPSEL  equ $0f         ; last-written value is UNDEFINED.
-;;; the only two useful values for the upper nibble
-MMU_MAP0       equ     (MMUADR_ROMDIS|MMUADR_MMUEN)
-MMU_MAP1       equ     (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
-
-TIMER_ON        equ $02
-TIMER_OFF       equ $00
-TIMER_INT       equ $80
-
-
-            .module multicomp09
-
-            ; exported symbols
-            .globl init_early
-            .globl init_hardware
-            .globl interrupt_handler
-            .globl _program_vectors
-           .globl map_kernel
-           .globl map_process
-           .globl map_process_always
-           .globl map_save
-           .globl map_restore
-           .globl _need_resched
-           .globl _bufpool
-           .globl _discard_size
-            .globl _krn_mmu_map
-            .globl _usr_mmu_map
-           .globl curr_tr
-
-            ; exported debugging tools
-            .globl _trap_monitor
-           .globl _trap_reboot
-            .globl outchar
-           .globl _di
-           .globl _ei
-           .globl _irqrestore
-
-            ; imported symbols
-            .globl _ramsize
-            .globl _procmem
-            .globl unix_syscall_entry
-           .globl nmi_handler
-           .globl null_handler
-
-            include "kernel.def"
-            include "../kernel09.def"
-
+       .module multicomp09
+
+       ; exported symbols
+       .globl init_early
+       .globl init_hardware
+       .globl interrupt_handler
+        .globl _program_vectors
+       .globl map_kernel
+       .globl map_process
+       .globl map_process_always
+       .globl map_save
+       .globl map_restore
+       .globl _need_resched
+       .globl _bufpool
+       .globl _discard_size
+        .globl _krn_mmu_map
+        .globl _usr_mmu_map
+       .globl curr_tr
+
+       ; exported debugging tools
+        .globl _trap_monitor
+       .globl _trap_reboot
+        .globl outchar
+       .globl _di
+       .globl _ei
+       .globl _irqrestore
+
+       ; imported symbols
+        .globl _ramsize
+        .globl _procmem
+        .globl unix_syscall_entry
+       .globl nmi_handler
+       .globl null_handler
+
+        include "kernel.def"
+        include "../kernel09.def"
+       include "platform.def"
 
        .area   .buffers
 
diff --git a/Kernel/platform-multicomp09/platform.def b/Kernel/platform-multicomp09/platform.def
new file mode 100644 (file)
index 0000000..c2c185a
--- /dev/null
@@ -0,0 +1,41 @@
+;;;
+;;; Hardware definitions for Multicomp 6809 FPGA-based computer
+;;;
+
+;;; [NAC HACK 2016May03] maybe I should define these all as offsets from IOBASE..
+;;; then index any of them from a single register.
+;;; [NAC HACK 2016Jun01] or use the DP register and access them all on the direct page
+
+;;; MMU registers
+MMUADR equ     $ffde
+MMUDAT equ     $ffdf
+
+
+
+;;; MMU bit-fields
+MMUADR_ROMDIS  equ $80         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
+MMUADR_TR      equ $40         ; 0 after reset, 0 when FUZIX boots. 0=map0, 1=map1
+MMUADR_MMUEN   equ $20         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
+MMUADR_NMI     equ $10         ; 0 after reset, 0 when FUZIX boots. Do not write 1.
+MMUADR_MAPSEL  equ $0f         ; last-written value is UNDEFINED.
+;;; the only two useful values for the upper nibble
+MMU_MAP0       equ     (MMUADR_ROMDIS|MMUADR_MMUEN)
+MMU_MAP1       equ     (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
+
+
+
+;;; Timer registers
+TIMER   equ     $ffdd
+
+;;; Timer bit-fields
+TIMER_ON        equ $02
+TIMER_OFF       equ $00
+TIMER_INT       equ $80
+
+
+;;; SD Controller registers
+SDDATA         equ $FFD8
+SDCTL          equ $FFD9
+SDLBA0         equ $FFDA       ; not used here
+SDLBA1         equ $FFDB       ; not used here
+SDLBA2         equ $FFDC       ; not used here
index 878ebc8..c451840 100644 (file)
@@ -9,13 +9,7 @@
        .globl _devsd_write
        .globl _devsd_read
 
-
-;;; multicomp09 hw registers
-SDDATA         equ $FFD8
-SDCTL          equ $FFD9
-SDLBA0         equ $FFDA       ; not used here
-SDLBA1         equ $FFDB       ; not used here
-SDLBA2         equ $FFDC       ; not used here
+        include "platform.def"
 
        section .common
 
index f8b3b39..c889929 100644 (file)
@@ -2,26 +2,6 @@
 ;;; CoCo3 ghoulish tricks (boo!) ported to multicomp09
 ;;;
 
-
-;;; [NAC HACK 2016May01] want all the hw reg definitions in a common place.
-
-;;; multicomp09 HW registers
-MMUADR equ     $ffde
-MMUDAT equ     $ffdf
-
-;;; bit-fields
-MMUADR_ROMDIS  equ $80         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_TR      equ $40         ; 0 after reset, 0 when FUZIX boots. 0=map0, 1=map1
-MMUADR_MMUEN   equ $20         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_NMI     equ $10         ; 0 after reset, 0 when FUZIX boots. Do not write 1.
-MMUADR_MAPSEL  equ $0f         ; last-written value is UNDEFINED.
-;;; the only two useful values for the upper nibble
-MMU_MAP0       equ     (MMUADR_ROMDIS|MMUADR_MMUEN)
-MMU_MAP1       equ     (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
-
-
-
-
         .module tricks
 
        ;; imported
@@ -41,7 +21,7 @@ MMU_MAP1      equ     (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
 
         include "kernel.def"
         include "../kernel09.def"
-
+        include "platform.def"
 
        .area .data
 ;;; _ramtop cannot be in common, as this memory becomes per-process
index 0036746..54db90f 100644 (file)
@@ -2,29 +2,14 @@
 
 ;;;
 ;;;    6809 copy to and from userspace via
-;;;     Color Computer 3 GIME mmu
+;;;     Multicomp09 MMU which imitates a Color Computer 3 GIME mmu
 ;;;
 
-;;; multicomp09 HW registers
-;;; [NAC HACK 2016May03] maybe I should define these all as offsets from IOBASE..
-;;; then index any of them from a single register.
-MMUADR equ     $ffde
-MMUDAT equ     $ffdf
-
-;;; bit-fields
-MMUADR_ROMDIS  equ $80         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_TR      equ $40         ; 0 after reset, 0 when FUZIX boots. 0=map0, 1=map1
-MMUADR_MMUEN   equ $20         ; 0 after reset, 1 when FUZIX boots. Leave at 1.
-MMUADR_NMI     equ $10         ; 0 after reset, 0 when FUZIX boots. Do not write 1.
-MMUADR_MAPSEL  equ $0f         ; last-written value is UNDEFINED.
-;;; the only two useful values for the upper nibble
-MMU_MAP0       equ     (MMUADR_ROMDIS|MMUADR_MMUEN)
-MMU_MAP1       equ     (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
-
        include "kernel.def"
         include "../kernel09.def"
+        include "platform.def"
 
-       ;; window xfer treshhold - any user/krn space xtfers
+       ;; window xfer threshhold - any user/krn space xtfers
        ;; bigger than this will be routed to the banking/windowing
        ;; transfers, rather than the original slower routines
 WINTR  equ     256             ; window xfer threshold
@@ -339,4 +324,3 @@ a@  lda     ,u+             ; get a byte
        ;; return
        ldx     #0              ; return #0 - success
        puls    u,y,cc,pc       ; return
-