$(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
;;; 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
--- /dev/null
+;;;
+;;; 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
.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
;;; 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
include "kernel.def"
include "../kernel09.def"
-
+ include "platform.def"
.area .data
;;; _ramtop cannot be in common, as this memory becomes per-process
;;;
;;; 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
;; return
ldx #0 ; return #0 - success
puls u,y,cc,pc ; return
-